Hello Guys,
I want to know whether the Design I have done is good or not... Suggessions are welcome.
I want to design a J2EE system and my approach is :
1. a Screen Preferably JSP: User clicks add Customer
2. Request goes to MaintainCustomerServlet which gets respective Business Delegate and
3. Business Delegate Calls Entity Bean.
Now other approach is Business Delegate calls Session Facade to Entity Bean.
I am using EJB 2.0 Spec. Remote Interface for Entity Beans
Which approach is Good?
Please advice.
Regards,
Raj
-
Design: JSP->Servlet-> BusinessDelegate / Session - >Entity Flow (5 messages)
- Posted by: Raj S
- Posted on: October 23 2002 06:33 EDT
Threaded Messages (5)
- Design: JSP->Servlet-> BusinessDelegate / Session - >Entity Flow by Raj S on October 23 2002 06:49 EDT
- Design: JSP->Servlet-> BusinessDelegate / Session - >Entity Flow by Henrik G?ttig on October 23 2002 07:00 EDT
-
Design: JSP->Servlet-> BusinessDelegate / Session - >Entity Flow by Raj S on October 23 2002 08:03 EDT
-
Design: JSP->Servlet-> BusinessDelegate / Session - >Entity Flow by Jyot Singh on October 23 2002 09:41 EDT
- Design: JSP->Servlet-> BusinessDelegate / Session - >Entity Flow by Raj S on October 30 2002 08:55 EST
-
Design: JSP->Servlet-> BusinessDelegate / Session - >Entity Flow by Jyot Singh on October 23 2002 09:41 EDT
-
Design: JSP->Servlet-> BusinessDelegate / Session - >Entity Flow by Raj S on October 23 2002 08:03 EDT
- Design: JSP->Servlet-> BusinessDelegate / Session - >Entity Flow by Henrik G?ttig on October 23 2002 07:00 EDT
-
Design: JSP->Servlet-> BusinessDelegate / Session - >Entity Flow[ Go to top ]
- Posted by: Raj S
- Posted on: October 23 2002 06:49 EDT
- in response to Raj S
I forgot to add ServiceLocator pattern after Business Delegate as a step. BD will get Entity home from ServiceLocator.
Regards, Raj -
Design: JSP->Servlet-> BusinessDelegate / Session - >Entity Flow[ Go to top ]
- Posted by: Henrik G?ttig
- Posted on: October 23 2002 07:00 EDT
- in response to Raj S
I would definately go with the Facade pattern. First of all it abstracts the access to the Entity Beans, actually making a system boundary to your persistent object model.
Furthermore...if you had other clients (than JSPs) you could access the exact same Facade.
I have done this in a real-life application and it works like a charm. I this application I have another "client", a WebService, in front of Facade and BusinessDelegate...
Think of the Facade as a system boundary, an inteface.
Cheers. -
Design: JSP->Servlet-> BusinessDelegate / Session - >Entity Flow[ Go to top ]
- Posted by: Raj S
- Posted on: October 23 2002 08:03 EDT
- in response to Henrik G?ttig
Can I use Business Delegate as well as Session Bean? e.g. Business Delegate talks to Session facade and then Facade talks to Entity Bean. Will it create over head?
What do you say?
-
Design: JSP->Servlet-> BusinessDelegate / Session - >Entity Flow[ Go to top ]
- Posted by: Jyot Singh
- Posted on: October 23 2002 09:41 EDT
- in response to Raj S
Using the idea of loose coupling have one more layer between servlet and business delegate- A handler which handles appropriate events or actions.This way your servlet just acts as a controller.
It is highly recommended to have business delegate and Session facade (SLSB) before persistence layer or business controller.Delegate caches the lookups to facade(avoiding expensive JNDI lookups) and facade acting as a boundry of abstraction,provides high scalabality.The facade now passes the control to another handler, which then calls Session bean -> entity bean or DAO as per your requirement.
Thanks
Jyot@DataConcepts -
Design: JSP->Servlet-> BusinessDelegate / Session - >Entity Flow[ Go to top ]
- Posted by: Raj S
- Posted on: October 30 2002 08:55 EST
- in response to Jyot Singh
Hi Jyot,
Thanks for the Comments and Suggessions..
Regards,
Raj