Forums Register Login

Multiple Session Facades?

+Pie Number of slices to send: Send
Hello,
why would we use more then one session facade?
Is it for performance?
Can a session facade be a bottle neck?(I dont think so)
Or per use case, one session facade?
Thanks,
Roul
+Pie Number of slices to send: Send
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
+Pie Number of slices to send: Send
And it doesn't got anything to do with performence?
It is just about having a better overview, by grouping them by use case.
+Pie Number of slices to send: Send
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.
Replace the word "snake" with "danger noodle" in all tiny ads.
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 687 times.
Similar Threads
Facade Pattern
Secure an Entity bean from writing
Command pattern Vs Session Facade.
Stereotypes for Java components
General Architect Question
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 06:22:30.