Hi,
I am trying to implement Session Facade design pattern. Here my stateless session bean(SLSB) delegate call to CMPs.
Do I need to use separate SLSB for each CMP or what if I have one SLSB which delegate to all CMP's? Please let me know which is better performance wise.
Thanks in advance
Prasanna
-
Session Facade (2 messages)
- Posted by: Prasanna Kumar
- Posted on: November 18 2003 03:55 EST
Threaded Messages (2)
- Session Facade by sergiu truta on November 18 2003 08:07 EST
- Session Facade by Paul Strack on November 18 2003 08:09 EST
-
Session Facade[ Go to top ]
- Posted by: sergiu truta
- Posted on: November 18 2003 08:07 EST
- in response to Prasanna Kumar
It depends on the jobs you want to implement. In general you can call from a Session Bean several Entity Beans in case these are responsible for related data. You can look for an example inside Floyd Marinescu's EJB Design Patterns, chapter "From Requirements to Pattern-Driven Design" where you will see that each Session Bean implements a specific job and these Session Beans call the Entity Beans. -
Session Facade[ Go to top ]
- Posted by: Paul Strack
- Posted on: November 18 2003 08:09 EST
- in response to Prasanna Kumar
You can organize your session facades in any way logical for your application. Performance-wise, it does not make much difference how many methods are assigned to a particular session bean. Group methods into different session beans based on which operations make logical sense together. These methods can use a handful of CMP or a bunch of CMP.