• Post Reply Bookmark Topic Watch Topic
  • New Topic

Composite Entity CMR

 
sam Andy
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello all,
I need to tree model into EJB
Cat1
-sub Cat 2
---sub cat 3
---- sub cat 4
------ Prod 1
------ Prod 2

Cat2
-sub Cat 5
--sub cat 6
--- Prod 3
--- Prod 4

So there can be infinite sub categories under each category and under each category there can be products associated to that category/sub category.

How will I model it in EJB? . I was looking at Composite Entity pattern listed under the GOF. But in CMP, it is not recomended to use this pattern as it mentions that it was created with EJB 1.x.
So I am stuck and really would like some inputs from you all

Sammy
 
Nathaniel Stoddard
Ranch Hand
Posts: 1258
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The Composite Entity pattern was around long before EJBs. Just do the same thing but adapt the pattern to the technology if you need to.
 
sam Andy
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The Composite Entity pattern was around long before EJBs. Just do the same thing but adapt the pattern to the technology if you need to.

--------------------

Nathaniel Stodard
SCJP, SCJD, SCWCD, SCBCD

Nathaniel,
So you are saying that I could use Composite entity patter in EJB 2.0. I was thinking of having only one Entity EJB( CategoryEJB) and have a CMR to itself.
any different ideas?
Are there any sample code where I can refer to?.
Sammy
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!