Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Can a CMP EJB be a CMP field inside another CMP EJB  RSS feed

 
Sanjeev Verma
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all
Lets say there is a Person CMP EJB and a Address CMP EJB.
1. Can the person EJB have a cmp field as Address EJB? (In EJB 1.1)
2. If yes, what will be the create statement for the table that will hold the person data look like. I basically mean to ask the data type of the Address column.
3. If this was with reference to EJB 2.0, can I still have point 1? I DO NOT mean/want to use <cmr-field>.
Thanx
Sanjeev
 
Tim Holloway
Bartender
Posts: 18662
71
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You'd do better to use an Entity bean acting as facade for 2 distinct CMP beans. In the case of CMP, your DBMS is not going to properly handle serialization of and embedded EJB into the DBMS.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!