Can a Session Bean do all of the following
- Posted by: Narayanan Jayaratchagan
- Posted on: December 13 2001 12:28 EST
1. Maintain Client State
2. Act as Session Facade
3. Act as Value Object Assembler
If not, why?
- State + Session Facade + Value Object Assembler in One EJB by Charles Hodgson on December 13 2001 16:07 EST
- State + Session Facade + Value Object Assembler in One EJB by a a on December 14 2001 19:41 EST
- State + Session Facade + Value Object Assembler in One EJB by Venket Raman on December 17 2001 17:29 EST
FYI it's called the facade pattern.
Yes, you can absolutely do all the three.
The Better approach is the code will not be scalable and may have performance issue. The Better approach is maintain the state in one class and VOA as a seperate class so the re-usability is there. Thus if another Ssession Bean method require to do operation on the same value object or do similar operation we need to have duplication of the code.