• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Composite Entity CMR

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 1258
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
reply
    Bookmark Topic Watch Topic
  • New Topic