Persisting dependent objects as part of a CMP entity bean
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?
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL