• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Composite Entity and Distributed EJBs

 
jane parker
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here is a paragraph from the blueprints document

Before EJB 2.0 existed, a common strategy for composite entity implementations was to use a Remote Entity Bean for the parent and use Java objects instead of remote entity beans for the dependent objects in a parent-child relationship. This also meant that the parent usually used Bean-managed persistence so it had to write the code to manage the relationships to the other objects also. But with the introduction of local entity beans in EJB 2.0, the strategy of using local entity beans to model fine-grained entities and dependent objects is recommended. An additional benefit of this strategy is that since all the objects in this strategy are Entity beans, you can efficiently use container-managed persistence and avoid writing code to manage the relationships.

My question is can I use CMP Entity beans with dependant objects also being CMP Entity beans with the EJBS being distaributed ( not co-loacted with the web tier), so can you have CMR relationships defined in a distributed environmnet between parent and dependant EJBs? When the blueprints recommends 'using local entity beans to model fine-grained entities and dependent objects' , does it mean that the parent and dependants are local to each other or do all the EJBs have to be local to the web container components that is calling the parent EJB?
Thanks
 
jane parker
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think I found the answer myself. Thank you.
 
Greg Mandel
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for sharing your findings!
 
Lann Lu
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Composite Entity(parent) and its child entities can both be remote to the calling client.

Child entities can be remote to its parent. but both parent and children can not go beyond the same logical unit, the boundary is circled by "ejb-jar.xml".

Please let me know your thought.
Thanks,

Tao
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic