Return-Path: Delivered-To: apmail-openejb-commits-archive@www.apache.org Received: (qmail 32448 invoked from network); 7 Jan 2008 09:29:58 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 7 Jan 2008 09:29:58 -0000 Received: (qmail 10999 invoked by uid 500); 7 Jan 2008 09:29:46 -0000 Delivered-To: apmail-openejb-commits-archive@openejb.apache.org Received: (qmail 10967 invoked by uid 500); 7 Jan 2008 09:29:45 -0000 Mailing-List: contact commits-help@openejb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@openejb.apache.org Delivered-To: mailing list commits@openejb.apache.org Received: (qmail 10805 invoked by uid 99); 7 Jan 2008 09:29:45 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 07 Jan 2008 01:29:44 -0800 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 07 Jan 2008 09:29:29 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 4506671422B for ; Mon, 7 Jan 2008 01:29:34 -0800 (PST) Message-ID: <7217404.1199698174279.JavaMail.jira@brutus> Date: Mon, 7 Jan 2008 01:29:34 -0800 (PST) From: "Manu T George (JIRA)" To: commits@openejb.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. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org 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.