tomee-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Manu T George (JIRA)" <j...@apache.org>
Subject [jira] Created: (OPENEJB-747) pre-destroy callbacks not getting called on throwing a RuntimeException in the business method of a stateless session bean.
Date Mon, 07 Jan 2008 09:29:34 GMT
pre-destroy callbacks not getting called on throwing a RuntimeException in the business method
of a stateless session bean.
---------------------------------------------------------------------------------------------------------------------------

                 Key: OPENEJB-747
                 URL: https://issues.apache.org/jira/browse/OPENEJB-747
             Project: OpenEJB
          Issue Type: Bug
          Components: container system
    Affects Versions: 3.0-beta-1
         Environment: Win XP Sun JDK 5
            Reporter: Manu T George
            Assignee: Manu T George
             Fix For: 3.0-beta-2


  In the case of stateless beans, if a system execption is thrown
during the execution of an ejb business method, the instance is not
getting destroyed. There is already a test for this in
StatelessLocalBusinessIntfcTests and it is commented out.

       Section: 4.5.3 of the EJB core spec says

A RuntimeException that is not an application exception thrown from
any method of the enterprise
bean class (including the business methods and the lifecycle callback
interceptor methods invoked by
the container) results in the transition to the "does not exist" state.

If you see the State diagram of the Lifecycle of a Stateless Session
Bean the transition from the method ready state to the does not exist
state involves the invocation of the PreDestroy callbacks.

So my understanding here is that the preDestroy method should be called.

But there is more in the spec which is given below

>From the client perspective, the session object continues to exist.
The client can continue accessing the
session object because the container can delegate the client's
requests to another instance.

So this means that the proxy should not be invalidated and the
preDestroy callbacks called.



-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message