File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Architect Certification (SCEA/OCMJEA) and the fly likes BusinessDelegate pattern Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Certification » Architect Certification (SCEA/OCMJEA)
Reply Bookmark "BusinessDelegate pattern" Watch "BusinessDelegate pattern" New topic
Author

BusinessDelegate pattern

Francesco Marchioni
author
Ranch Hand

Joined: Sep 22, 2003
Posts: 175
Hi all scea users,
I have a doubt about the BusinessDelegate pattern.
I have implemented it to search route flights (Prepare Itinerary).
Should I implement with the Service Locator Pattern ? or the BusinessDelegate contacts directly the Service (holding the Lookup Service)?

In the latter scenario the objects in the sequence diagrams are
UserUI---Business Delegate---Segment---Flight

Thanks
Francesco


JBoss AS 5 Development
JBoss Tutorials
Lars Behnke
Ranch Hand

Joined: May 09, 2006
Posts: 76
I think there is nothing wrong with using the ServiceLocator Pattern in combination with BusinessDelegate. In fact, I did the same.
Francesco Marchioni
author
Ranch Hand

Joined: Sep 22, 2003
Posts: 175
Hi Lars,
thanks for your reply.
So you agree the "prepare itinerary" sequence should be like this:

ClientUI->BusinessDelegate->Service Locator->Segment->Flight

do you agree ?
Thanks
Francesco
Lars Behnke
Ranch Hand

Joined: May 09, 2006
Posts: 76
Hi Francesco,
The ServiceLocator should be independent of any business classes,
for instance:

 
I agree. Here's the link: http://zeroturnaround.com/jrebel
 
subject: BusinessDelegate pattern
 
Similar Threads
Where to put the Business Delegate?
BusinessDelegate
Only one object instance - ServletContextListener, JNDI
confused over use of Web Service Broker
how to use Struts and JDO