There should be a java.rmi.NoSuchObjectException:
<ejb-2.0-spec, page 79>
When the client calls remove on the home or component interface to remove
the session
object, the container issues ejbRemove() on the bean instance. This ends the
life of the session
bean instance and the associated session object. Any subsequent attempt by
its client to
invoke the session object causes the java.rmi.NoSuchObjectException to be
thrown
if the client is a remote client, or the
javax.ejb.NoSuchObjectLocalException if
the client is a local client. (The java.rmi.NoSuchObjectException is a
subclass of
the java.rmi.RemoteException; the javax.ejb.NoSuchObjectLocalException
is a subclass of the javax.ejb.EJBException). The ejbRemove() method
cannot be called when the instance is participating in a transaction. An
attempt to remove a
session object while the object is in a transaction will cause the container
to throw the
javax.ejb.RemoveException to the client. Note that a container can also
invoke the
ejbRemove() method on the instance without a client call to remove the
session object
after the lifetime of the EJB object has expired.
<ejb-2.0-spec>
xxxxxxxxxxxxxxxxxxxxxxxx
Scott Stark
Chief Technology Officer
JBoss Group, LLC
xxxxxxxxxxxxxxxxxxxxxxxx
----- Original Message -----
From: "Jason Dillon" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, May 21, 2002 7:35 PM
Subject: [JBoss-dev] EJBObject.remove() on a removed SFSB


Should calling EJBObject.remove() on a SFSB which has been removed already
throw an exception or should the request be silently ignored?

I was running into a problem which was due to one of my finializers removing
a
SFSB, which I had previously removed and forgot to null.  Currently when
this
happens an erronious activation exception is thrown, since there is no state
file for the bean (having been removed already).

I think it would be a good idea to throw a meaningful exception in
StatefulSessionContainer.remove() to indicate the illegal state... unless
the
spec says we should ignore this.  I have not checked the spec.   The Javadoc
for EJBObject.remove() does not provide any insight either.

Does anyone know what the behavior should be, exception or non-exception?
And
if it is an exception what flavor?

--jason




_______________________________________________________________

Don't miss the 2002 Sprint PCS Application Developer's Conference
August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm

_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to