Win a copy of Bad Programming Practices 101 (e-book) this week in the Beginning Java forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

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

 
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
 
Bartender
Posts: 19542
90
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.
 
I miss the old days when I would think up a sinister scheme for world domination and you would show a little emotional support. So just look at this tiny ad:
Why should you try IntelliJ IDEA ?
https://coderanch.com/wiki/696337/IntelliJ-IDEA
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!