geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dain Sundstrom <d...@iq80.com>
Subject Re: Summary?
Date Tue, 14 Mar 2006 05:10:23 GMT
On Mar 13, 2006, at 6:54 PM, David Blevins wrote:

> On Mar 9, 2006, at 5:59 AM, Jules Gosnell wrote:
>
>> Is it possible for one client to pass the handle of an SFSB to  
>> another ? Does the spec touch on this ? Does it ever happen ?
>
> I know that per spec, the client identity cannot change mid- 
> transaction.  Aside from that we allow it.

My experience is that a SFSB is almost always tied to a single client  
(e.g. user).  I have seen a few weird pieces of code that passed  
SFSBs between clients, but the reason I was looking at them was  
because that didn't work reliably.  This is largely due to  
EJB2.1:7.5.8 which states:

Clients are not allowed to make concurrent calls to a stateful  
session object. If a client-invoked business method is in progress on  
an instance when another client-invoked call, from the same or  
different client, arrives at the same instance of a stateful session  
bean class, the container may throw the java.rmi.RemoteException to  
the second client[7] if the client is a remote client, or the  
javax.ejb.EJBException if the client is a local client. This  
restriction does not apply to a stateless session bean because the  
container routes each request to a different instance of the session  
bean class.

For the weird cases, we could add an option in the EJB container to  
not keep a specific SFSB deployment in the client session.

-dain

Mime
View raw message