This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes EJB and other Java EE Technologies and the fly likes container managed relationship? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Reply Bookmark "container managed relationship?" Watch "container managed relationship?" New topic
Author

container managed relationship?

pradeep arum
Ranch Hand

Joined: Oct 01, 2003
Posts: 130
If I have 2 tables that represent 2 beans and and they are in 1:N relationship, i do not have to mention the relation field in the ejbCreate(),but how is the mapping done to the database ,can anybody please explain?
for more reference please go through this
I am stuck with this part of CMRelationship...
what I understand from page 396, HFEJB is-> in the ejbcreate()I have 5 fields of which 4 are inserted into the database and for the 5th one I wait till ejbPostCreate() and do a setDirector(dir)....by doing so what did the database get as the 5th field( ie how did the directorID get into the database ?)
HOW IS THE FOREIGN KEY PROCESSING DONE?
THROW SOME LIGHT ...PLEASE
thanks
Pradeep


SCJP1.4,SCBCD
Failure is not when you fall down; its only when you fail to get up again.
Harsha Huddar
Greenhorn

Joined: Oct 03, 2003
Posts: 23
You have to mention the relationship in the ejb-jar.xml the configuration file for your EJB's
Sergiu Truta
Ranch Hand

Joined: Dec 16, 2003
Posts: 121
You have to set all the fields inside ejbCreate(), except for the CMR field. This is the field defining the relationship and the field specified inside the deployment descriptor as the CMR field.
You have to create first the bean and only then set the relationship, that is why the CMR fields are set inside ejbPostCreate().


...watch me...as I'm walking the path...
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: container managed relationship?
 
Similar Threads
container managed relationship?
Transaction in ejbCreate() and ejbPostCreate()
how the CMR runs?
WebSphere V5 CMP create problem
ejbCreate