Java Mailing List Archive

http://www.junlu.com/

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

Re: Business Delegate v/s Session Facade

Maciek Z.ywno

2003-09-05

Replies:

Alok_Band wrote:

>I seek clarification about Business Delegate pattern.
>
>If business services is implemented as normal class then user must start
>Transaction Explicitly. But then why should not one use Session Facade
>pattern as container would take care of transaction boundaries.
>
>Can anybody please elaborate how Business Delegate is different then Session
>Facade?
>
>
One is not to decide whether to use either session facade or business
delegate.
Actually business delegate should be used with a session facade, usually
in a mapping 1 delegate - 1 session facade.
Normally methods from a facade are "rewritten" to business delegate.

So what is business delegate about?
- tt hides from a client all complexity connected with network calls,
i.e. a client invokes some method on a delegate which is a normal java
object, and delegate uses lookup services to find a target session facade
- it can catch "network" exceptions and show a client "business"
exceptions so that a client e.g. does not have to know anything about
the service distribution

that's what I can help :)

regards

maciek zywno

====================================================================
Companion Site: http://www.corej2eepatterns.com
J2EE BluePrints: http://java.sun.com/blueprints/corej2eepatterns
List Archive: http://archives.java.sun.com/archives/j2eepatterns-interest.html
Unsubscribing: email "signoff J2EEPATTERNS-INTEREST" to listserv@(protected)


©2008 junlu.com - Jax Systems, LLC, U.S.A.