Results 1 to 3 of 3
- 03-07-2013, 03:06 AM #1
Member
- Join Date
- Mar 2013
- Posts
- 2
- Rep Power
- 0
Business Delegate and Session Facade usage.
Hi guys.
I am new to JavaEE and I recently learnt the Business Delegate and Session Facade design patterns. The tutorials from Oracle did gave me a basic idea of what they are and why they are used, but the example didn't really answer all my questions. So I decided to use a real life scenario here and put my question in to it. Any help is appreciated.
Assume I want to create a search employee page for my company, the employees are categorized by his or her department and the province he or she is in. I have in the database a look up table for department and province. (as shown in the image below)

http://oi46.tinypic.com/idvpsl.jpg
So I create three JPA entities, one for each table. Now I am stuck with what is the proper way to design the session facade design pattern. I know that I will need the to access all three entities in my page. (to get the drop down list for Provinces and Departments, and to retrieve list of Employees based on the selection) So should I create a Stateless Session Bean as session facade to access all three JPA Entities or should I create three separate Stateless Session Bean to manage one Entity each?
I came up three component diagram in the below picture.
The first one has one Stateless Session Bean as session facade and manages all three Entities.
The second one has a session facade to manage the relationship between business objects such as ProvinceManagerEJB and DepartmentManagerEJB which will manage the corresponding Entities.
The last one has three Stateless Session Beans that will manage one Entity each, all three Stateless Session Beans can be looked up via the Business Delegate pattern.

http://oi46.tinypic.com/10pqets.jpg
Please let me know if any one of them is the proper way to use business delegate and session facade. or none of them is correct. (which I assume might happen)
Again, thank you so much for your help.
Cheers
- 03-07-2013, 04:20 AM #2
Re: Business Delegate and Session Facade usage.
Cross posted
https://forums.oracle.com/forums/thr...readID=2507816
dbWhy do they call it rush hour when nothing moves? - Robin Williams
- 03-07-2013, 04:43 AM #3
Member
- Join Date
- Mar 2013
- Posts
- 2
- Rep Power
- 0
Similar Threads
-
facade and collections
By Danieldcc in forum New To JavaReplies: 12Last Post: 03-31-2012, 10:47 PM -
does java have delegate like c#
By trathanhcao in forum New To JavaReplies: 5Last Post: 01-17-2012, 08:21 PM -
does java have delegate like c#
By trathanhcao in forum AWT / SwingReplies: 2Last Post: 01-17-2012, 07:28 AM -
facade pattern
By hannes in forum AWT / SwingReplies: 6Last Post: 02-09-2010, 11:28 PM -
Delegate Control from one Application to another
By saikumarkomati in forum Advanced JavaReplies: 4Last Post: 01-24-2009, 03:19 AM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks