Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

composite entity pattern

 
Giju George
Ranch Hand
Posts: 333
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
How can I implement the composite entity pattern in EJB 2.0, OR has it become obsolete in EJB 2.0 because of the local interfaces??

Say for eg I have 5 tables...

category--- prodcat-----product---storeProduct---Store
-------1----*-----*-----1-----1---*----------*---1

Category, Product and Store are the main tables.
prodcat and storeproduct are the link tables between these 3.
(the relationships are shown below the table names, like category to prodcat is 1 to many .....)


What's the best way to design this in EJB using CMP ?. Should I create 5 entity beans (one for each table) with local interfaces and relationships between them as shown.
OR
Should I create Category, Product and Store as Entity beans and prodcat and storeProduct as dependent object ???
[ February 21, 2005: Message edited by: Giju George ]
 
Giju George
Ranch Hand
Posts: 333
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Got some hints from this site :-
http://java.sun.com/blueprints/patterns/CompositeEntity.html

to create each one as seperate entity beans.

But then, will there be too many entity beans lying in the container, (consider this as a big application) ???
 
Giju George
Ranch Hand
Posts: 333
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
guys...any comments ???
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic