I was also wondering about this. Of course since the webcontroller is not an EJB it is allowed to use the otherwise banned synchronized keyword!
Guy. > -----Original Message----- > From: The elephantwalker [mailto:[EMAIL PROTECTED]] > Sent: 21 March 2002 04:48 > To: Orion-Interest > 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 > > > > > > > > DISCLAIMER - The preceding e-mail message (including any attachments) contains information that may be confidential, may be protected by the attorney-client or other applicable privileges, or may constitute non-public information. It is intended to be conveyed only to the designated recipient(s) named above. If you are not an intended recipient of this message, or have otherwise received it in error, please notify the sender by replying to this message and then delete all copies of it from your computer system. Any use, dissemination, distribution, or reproduction of this message by unintended recipients is not authorized and may be unlawful. The contents of this communication do not necessarily represent the views of this company.
