Discussions

My database schema has a customer and address table. the address is dependent on the customer so i think i need to make the address a dependent object of the customer entity bean. Firstly is this a correct assumption.

secondly if this is correct, how do i persist the customers address details.

Your assumption is correct. If you want to see how this is done and want a complete workable code example, see the article I wrote in the resources section called "Course Grained BMP beans with Dependent Value Objects".

<p>
In the example at http://www.theserverside.com/patterns/depbmp.jsp, if the job entry DVO was to itself contain a collection class (let's say that a job entry could contain a dependant list of "projects" that the applicant worked on during the job, where project is another DVO).

<p>
Would this scheme extend to arbitrary nested collections of dependant objects ?

I think ejb2.0 would tackel this problem more accurately and easily.
I have read in ejb 2.0 specification that dependent Objects( as here address dependent on Customer )are handled by specifing relationship in deployment descriptor.

TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations technology projects - with its network of technology-specific websites, events and online magazines.