ello,

What if the application is deployed in a cluster (even the web tier)? Would
that nullify the synchronised effect?

cheers
romen

----- Original Message -----
From: "The elephantwalker" <[EMAIL PROTECTED]>
To: "Orion-Interest" <[EMAIL PROTECTED]>
Sent: Thursday, March 21, 2002 3:47 PM
Subject: RE: Concurrent calls to Session bean methods


> John,
>
> Here is the offending class, compliments of the Sun Blueprint team:
>
> public class ShoppingClientControllerWebImpl implements
WebClientController
> {
>
>     private ShoppingClientControllerLocal sccEjb;
>     private HttpSession session;
>
>     public ShoppingClientControllerWebImpl() {
>     }
>
> //   ... stuff...
> //
>
> // the important bit ...
>
>     public synchronized EventResponse handleEvent(Event ev)
>         throws EventException {
>             return sccEjb.processEvent(ev);
>     }
>
> }
>
> So you see that the webcontroller is the _only_ access to the sfsb. And
the
> only call is synchronized, thus preventing cocurrent calls to the stateful
> session bean.
>
> regards,
>
> the elephantwalker
> www.elephantwalker.com
>
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of
> [EMAIL PROTECTED]
> Sent: Wednesday, March 20, 2002 12:05 PM
> To: Orion-Interest
> Subject: RE: Concurrent calls to Session bean methods
>
>
>
> I haven't seen the history on this issue, but it interests me.  I had a
> quick look at the ShoppingClientControllerEJB class that is given as an
> example by Sun in the Session Facade design pattern, but couldn't see
where
> they are synchronizing calls.  Can you provide some more clues?
>
> Thanks,
>
> John H.
>
>
>
>                     "The elephantwalker"
>                     <[EMAIL PROTECTED]>       To:
> [EMAIL PROTECTED]
>                     Sent by:                         cc:
>                     owner-orion-interest@orion       Subject:     RE:
> Concurrent calls to Session bean methods
>                     server.com
>
>
>                     03/19/02 10:31 PM
>                     Please respond to
>                     Orion-Interest
>
>
>
>
>
>
> Vani,
>
> You can use the petstore trick. Use a facade class which sychronizes each
> call to your session bean. That should do the trick.
>
> This is a _famous_ problem with session beans.
>
> regards,
>
> the elephantwalker
> www.elephantwalker.com
>
>
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of Vani H.S.
> Sent: Wednesday, March 20, 2002 12:04 AM
> To: Orion-Interest
> Subject: Concurrent calls to Session bean methods
>
>
> Hello All,
>
>   I have been trying to deploy an application consisting of session beans
> and mdbs onto orion1.5.4.
>   But I seem to run into deadlocks, because my session bean gets called
> concurrently. Please can anybody can tell me if there is a setting to
allow
> concurrent calls so that, when a session bean method is called at one
time,
> the EJB container blocks the concurrent method call and allows it to
> proceed
> when the previous call has completed?
>   If not, how should this problem of concurrent calls be handled in orion?
>   Please help.
> Thanks,
> Vani
>
>
>
>
>
> The allow-concurrent-calls element specifies whether a stateful session
> bean
> instance allows concurrent method calls. By default,
> allows-concurrent-calls
> is false. However, when this value is set to true, the EJB container
blocks
> the concurrent method call and allows it to proceed when the previous call
> has completed.
>
>
>
>
>
> _________________________________________________________________
> Join the world's largest e-mail service with MSN Hotmail.
> http://www.hotmail.com
>
>
>
>
>
>
>
>
>


Reply via email to