• 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

Help -- Composite Enitity Pattern vs EJB 2

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,

Should one still use Composite Enitity Pattern (j2ee pattern) when designing application in EJB2? or is the pattern no long valid since EJB2 now support Local client view (EJBLocalHome, EJBLocalObject) and one could just implement bunch of fine-grained local entity beans with Session Facade pattern.

Any reply/suggestion is greatly appreciated

Thank you
 
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The fact that EJB 2.0 supports local interfaces does not mean that all calls to beans would be through local interfaces only. There would be situations where you might have to deal with remote interfaces (especially when your EJB container is clustered and the client/bean are not in the same VM).

With the advent of local interfaces, Session Facade still retains its value as a business layer to consolidate calls to entity beans. Though you have local interfaces, I think coarse grained objects are still a better way to send information from the facade to the client.

You would have to make a call on whether you want to use composite entity pattern or not. There is no wrong way, choose what you feel is appropriate for the situation.
 
Ali balawala
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you for the reply.
If I understand you correctly, does it mean that if I usese Session Facade pattern (as business layer and implements the session bean as REMOTE), all the entity beans can be designed as Local ? --- even if it is in the clustered environment (since all calls will go through the session bean and the session bean is REMOTE)

Thank you
 
reply
    Bookmark Topic Watch Topic
  • New Topic