-
Persisting dependent objects as part of a CMP entity bean
hello:
I was just reading "Enterprise JavaBeans" published by O'Reilly Press and
I have a qustion about Chapter 9. The chapter discusses "Design Strategies"
and one subsection discusses "Passing Objects by Value." The author defines
dependent objects as "objects that only have meaning within the context of
another object." The example given is of an address object that could contain
four fields: street, city, state, zip. My question is this:
If a CMP Entity Bean has a data member that is a custom class object (like
the Address class for example), then how is that data persisted to the database?
Does the container examine the contents of the Address class and then persist
those as individual fields, or is the entire object serialized and then persisted?
Also, what must be done in the deployment descriptor to map the data contained
in the Address class?
Thanks.
-
Re: Persisting dependent objects as part of a CMP entity bean
"Elyk" <scullywoman@hotmail.com> wrote:
>
>hello:
>
>I was just reading "Enterprise JavaBeans" published by O'Reilly Press and
>I have a qustion about Chapter 9. The chapter discusses "Design Strategies"
>and one subsection discusses "Passing Objects by Value." The author defines
>dependent objects as "objects that only have meaning within the context
of
>another object." The example given is of an address object that could contain
>four fields: street, city, state, zip. My question is this:
>
>If a CMP Entity Bean has a data member that is a custom class object (like
>the Address class for example), then how is that data persisted to the database?
>Does the container examine the contents of the Address class and then persist
>those as individual fields, or is the entire object serialized and then
persisted?
>Also, what must be done in the deployment descriptor to map the data contained
>in the Address class?
>
>Thanks.
If a CMP Entity Bean has a data member that is a custom class object (like
the Address class for example), then how is that data persisted to the database?
you need to persiste the value for this class on it own, and later on you
need to link this class to the other class by using findbyprmarykey
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Development Centers
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center
|