Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » J2EE Pattern »

Re: Pattern BusinessDeligation

James Hicks

2003-07-31


Message
The idea behind the business delegate pattern is to hide the implementation of your business services from your client.  It can also implement error handling for network outages, remote lookup of services, etc.  If you implement the business delegate as an RMI server, you just defeated the main reason for using the pattern.  The client now needs to implement the code that the business delegate was designed to do.
 
You can place a Factory between the client and the delegate.  During testing of the client, the factory can return a test delegate that does not actually lookup the remote services, but uses mock objects.  Another benefit to the factory is that you can change the implementation of your business services, from remote to local or to web services, and only have to create a new delegate and modify how the factory determines which delegate to instantiate.
 
To answer the question: Place the business delegate - and any related classes (Factory and delegate implementations), EJB stubs, and common utility classes in a separate jar - common.jar.  Your ejb jar should reference this jar in the class path of the manifest file.  Your client should also reference this jar in the class path.
 
James Hicks
-----Original Message-----
From: Giovani Salvador [mailto:giovani-salvador@PROCERGS.RS.GOV.BR]
Sent: Thursday, July 31, 2003 8:36 AM
To: J2EEPATTERNS-INTEREST@JAVA.SUN.COM
Subject: Re: Pattern BusinessDeligation

well, that´s not so simple but you could make your businness delegate an rmi server. But the stubs must be in the client application
 
Giovani Salvador
 
----- Original Message -----
From: Pradeep Kumar
To: J2EEPATTERNS-INTEREST@JAVA.SUN.COM
Sent: Thursday, July 31, 2003 10:15 AM
Subject: Re: Pattern BusinessDeligation

In that case, will you be doing a JNDI look up for Business delegate classes instead of home interface of EJB?

 

-----Original Message-----
From: Giovani Salvador [mailto:giovani-salvador@PROCERGS.RS.GOV.BR]
Sent: Thursday, July 31, 2003 6:31 PM
To: J2EEPATTERNS-INTEREST@JAVA.SUN.COM
Subject: Re: Pattern BusinessDeligation

 

Are you talknig about businness delegate design pattern? AFAIK, you put businness delegate in front of your businness components, the ejb components in your case. I think it´s more clear to put your businness delegate in the same environment that your ejb´s are.

Imagine that your ejb components will be called now from a swing application and not from a web client. You will not distribute your businness delegate component with each client that will access your businness components, ok?

 

Giovani Salvador

 

----- Original Message -----

From: Madhu V

To: J2EEPATTERNS-INTEREST@JAVA.SUN.COM

Sent: Thursday, July 31, 2003 8:09 AM

Subject: Pattern BusinessDeligation

 

Hi All,

 

When implementing business deligation in J2EE Application where my jar of Enterprise JavaBeans (EJB's) will be deployed in one system and my war file will be deployed in other system, where exactly i put my businessdelegate classes?. Am i right if i put those classes in .war file?

 

Can anybody clarify my Question

 

Thanks in Advance

Madhu V

==================================================================== Community Web Site (Core J2EE Patterns Catalog - Online Version): http://java.sun.com/blueprints/corej2eepatterns Getting Started (Beta Version): http://developer.java.sun.com/developer/technicalArticles/J2EE/patterns/ Get the book: http://www.amazon.com/exec/obidos/ASIN/0130648841/corej2eepatte-20 List Archive: http://archives.java.sun.com/archives/j2eepatterns-interest.html Unsubscribing: email "signoff J2EEPATTERNS-INTEREST" to listserv@java.sun.com

DISCLAIMER:
This message (including attachment if any) is confidential and may be privileged. Before opening attachments please check them for viruses and defects. MindTree Consulting Private Limited (MindTree) will not be responsible for any viruses or defects or any forwarded attachments emanating either from within MindTree or outside. If you have received this message by mistake please notify the sender by return e-mail and delete this message from your system. Any unauthorized use or dissemination of this message in whole or in part is strictly prohibited. Please note that e-mails are susceptible to change and MindTree shall not be liable for any improper, untimely or incomplete transmission. ==================================================================== Community Web Site (Core J2EE Patterns Catalog - Online Version): http://java.sun.com/blueprints/corej2eepatterns Getting Started (Beta Version): http://developer.java.sun.com/developer/technicalArticles/J2EE/patterns/ Get the book: http://www.amazon.com/exec/obidos/ASIN/0130648841/corej2eepatte-20 List Archive: http://archives.java.sun.com/archives/j2eepatterns-interest.html Unsubscribing: email "signoff J2EEPATTERNS-INTEREST" to listserv@java.sun.com ==================================================================== Community Web Site (Core J2EE Patterns Catalog - Online Version): http://java.sun.com/blueprints/corej2eepatterns Getting Started (Beta Version): http://developer.java.sun.com/developer/technicalArticles/J2EE/patterns/ Get the book: http://www.amazon.com/exec/obidos/ASIN/0130648841/corej2eepatte-20 List Archive: http://archives.java.sun.com/archives/j2eepatterns-interest.html Unsubscribing: email "signoff J2EEPATTERNS-INTEREST" to listserv@java.sun.com

==================================================================== Community Web Site (Core J2EE Patterns Catalog - Online Version): http://java.sun.com/blueprints/corej2eepatterns Getting Started (Beta Version): http://developer.java.sun.com/developer/technicalArticles/J2EE/patterns/ Get the book: http://www.amazon.com/exec/obidos/ASIN/0130648841/corej2eepatte-20 List Archive: http://archives.java.sun.com/archives/j2eepatterns-interest.html Unsubscribing: email "signoff J2EEPATTERNS-INTEREST" to listserv@java.sun.com
==================================================================== Community Web Site (Core J2EE Patterns Catalog - Online Version): http://java.sun.com/blueprints/corej2eepatterns Getting Started (Beta Version): http://developer.java.sun.com/developer/technicalArticles/J2EE/patterns/ Get the book: http://www.amazon.com/exec/obidos/ASIN/0130648841/corej2eepatte-20 List Archive: http://archives.java.sun.com/archives/j2eepatterns-interest.html Unsubscribing: email "signoff J2EEPATTERNS-INTEREST" to listserv@java.sun.com
©2008 junlu.com - Jax Systems, LLC, U.S.A.