This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
You usually use several session beans as a facade between the client code and the entity beans. One session bean contains usecases(methods) which implement related work. So for each group of related usecases you implement a session bean. You shouldn't use a master session bean, one which contains all the facade code, because this will quickly become very large, hard to understand and maintain. For example if you implement an an on-line application for renting cars, you will have one session bean which contains the methods related to registering users, another session bean for all the operations which provide information about the available cars, another session bean for the operations needed for renting a car, and many other like these. I hope you got the point
...watch me...as I'm walking the path...
Joined: Mar 16, 2004
And it doesn't got anything to do with performence? It is just about having a better overview, by grouping them by use case.
Hi, It does not impact performance much. But in cases where there is functionalities implemented in different session beans and u need to call more than 1 session bean for ur functionality you can have a Session Facade which will wrap the calls for those two or more session beans and make this a coarse grained access. instead of fine grain access by calling each session bean independently. since the EJB's usually is in a Distributed environment and ur client maybe on the presentation tier. hope this helps.
Thanks<br /> <br />Kiran <br /> <br />SCEA, SCJP 1.4,<br /> <br />"First they ignore u, then they laugh at u, then they fight u, <br />then u will win<br /> <br />Mahatma Gandhi"