[jboss-cvs] JBossAS SVN: r100795 - in projects/ejb3/components/container/trunk/spi/src/main/java/org/jboss/ejb3/container/spi: lifecycle and 1 other directory.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Wed Feb 10 06:07:52 EST 2010


Author: jaikiran
Date: 2010-02-10 06:07:51 -0500 (Wed, 10 Feb 2010)
New Revision: 100795

Added:
   projects/ejb3/components/container/trunk/spi/src/main/java/org/jboss/ejb3/container/spi/ContainerInvocation.java
Removed:
   projects/ejb3/components/container/trunk/spi/src/main/java/org/jboss/ejb3/container/spi/ContainerInvocationContext.java
   projects/ejb3/components/container/trunk/spi/src/main/java/org/jboss/ejb3/container/spi/StatefulContainerInvocation.java
   projects/ejb3/components/container/trunk/spi/src/main/java/org/jboss/ejb3/container/spi/StatefulEJBInstanceManager.java
   projects/ejb3/components/container/trunk/spi/src/main/java/org/jboss/ejb3/container/spi/StatelessEJBInstanceManager.java
Modified:
   projects/ejb3/components/container/trunk/spi/src/main/java/org/jboss/ejb3/container/spi/BeanContext.java
   projects/ejb3/components/container/trunk/spi/src/main/java/org/jboss/ejb3/container/spi/EJBContainer.java
   projects/ejb3/components/container/trunk/spi/src/main/java/org/jboss/ejb3/container/spi/EJBInstanceManager.java
   projects/ejb3/components/container/trunk/spi/src/main/java/org/jboss/ejb3/container/spi/InterceptorRegistry.java
   projects/ejb3/components/container/trunk/spi/src/main/java/org/jboss/ejb3/container/spi/lifecycle/EJBLifecycleHandler.java
   projects/ejb3/components/container/trunk/spi/src/main/java/org/jboss/ejb3/container/spi/lifecycle/StatefulEJBLifecycleHandler.java
Log:
Refactoring the container spi - Work in progress

Modified: projects/ejb3/components/container/trunk/spi/src/main/java/org/jboss/ejb3/container/spi/BeanContext.java
===================================================================
--- projects/ejb3/components/container/trunk/spi/src/main/java/org/jboss/ejb3/container/spi/BeanContext.java	2010-02-10 11:01:48 UTC (rev 100794)
+++ projects/ejb3/components/container/trunk/spi/src/main/java/org/jboss/ejb3/container/spi/BeanContext.java	2010-02-10 11:07:51 UTC (rev 100795)
@@ -21,6 +21,8 @@
 */
 package org.jboss.ejb3.container.spi;
 
+import java.io.Serializable;
+
 /**
  * BeanContext
  * <p>
@@ -33,6 +35,12 @@
 {
 
    /**
+    * @return Returns the session id to which this {@link BeanContext}
+    * is associated.
+    */
+   Serializable getSessionId();
+   
+   /**
     * Returns the bean instance
     * @return
     */

Added: projects/ejb3/components/container/trunk/spi/src/main/java/org/jboss/ejb3/container/spi/ContainerInvocation.java
===================================================================
--- projects/ejb3/components/container/trunk/spi/src/main/java/org/jboss/ejb3/container/spi/ContainerInvocation.java	                        (rev 0)
+++ projects/ejb3/components/container/trunk/spi/src/main/java/org/jboss/ejb3/container/spi/ContainerInvocation.java	2010-02-10 11:07:51 UTC (rev 100795)
@@ -0,0 +1,66 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.ejb3.container.spi;
+
+import java.io.Serializable;
+import java.lang.reflect.Method;
+
+/**
+ * ContainerInvocationContext
+ * <p>
+ * A {@link ContainerInvocation} represents an invocation to be processed by the {@link EJBContainer#invoke(ContainerInvocation)}
+ * method. The {@link ContainerInvocation} holds the information about the method being invoked (on the bean proxy) and the
+ * arguments being passed to the method. It also has other contextual information about the invocation.
+ * </p>
+ *  
+ * @author Jaikiran Pai
+ * @version $Revision: $
+ */
+public interface ContainerInvocation
+{
+
+   /**
+    * @return Returns the method being invoked
+    * 
+    */
+   Method getMethod();
+   
+   /**
+    * 
+    * @return Returns the arguments to be passed to the method being invoked
+    */
+   Object[] getArgs();
+   
+   /**
+    *  
+    * @return Returns the session id to which this invocation is associated with.
+    * If the invocation is on a stateless container then this method can return null.
+    */
+   Serializable getSessionId();
+   
+   /**
+    * TODO: Better javadoc (i'm sleepy right now!)
+    * @return Returns the {@link Class} on which the method has been invoked
+    */
+   Class<?> getInvokedBusinessInterface();
+   
+}

Deleted: projects/ejb3/components/container/trunk/spi/src/main/java/org/jboss/ejb3/container/spi/ContainerInvocationContext.java
===================================================================
--- projects/ejb3/components/container/trunk/spi/src/main/java/org/jboss/ejb3/container/spi/ContainerInvocationContext.java	2010-02-10 11:01:48 UTC (rev 100794)
+++ projects/ejb3/components/container/trunk/spi/src/main/java/org/jboss/ejb3/container/spi/ContainerInvocationContext.java	2010-02-10 11:07:51 UTC (rev 100795)
@@ -1,51 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-*/
-package org.jboss.ejb3.container.spi;
-
-import java.lang.reflect.Method;
-
-/**
- * ContainerInvocationContext
- * <p>
- * A {@link ContainerInvocationContext} represents an invocation to be processed by the {@link EJBContainer#invoke(ContainerInvocationContext)}
- * method. The {@link ContainerInvocationContext} holds the information about the method being invoked (on the bean proxy) and the
- * arguments being passed to the method. It also has other contextual information about the invocation.
- * </p>
- * @author Jaikiran Pai
- * @version $Revision: $
- */
-public interface ContainerInvocationContext
-{
-
-   /**
-    * @return Returns the method being invoked
-    * 
-    */
-   Method getMethod();
-   
-   /**
-    * 
-    * @return Returns the arguments to be passed to the method being invoked
-    */
-   Object[] getArgs();
-   
-}

Modified: projects/ejb3/components/container/trunk/spi/src/main/java/org/jboss/ejb3/container/spi/EJBContainer.java
===================================================================
--- projects/ejb3/components/container/trunk/spi/src/main/java/org/jboss/ejb3/container/spi/EJBContainer.java	2010-02-10 11:01:48 UTC (rev 100794)
+++ projects/ejb3/components/container/trunk/spi/src/main/java/org/jboss/ejb3/container/spi/EJBContainer.java	2010-02-10 11:07:51 UTC (rev 100795)
@@ -21,7 +21,6 @@
 */
 package org.jboss.ejb3.container.spi;
 
-import org.jboss.ejb3.container.spi.lifecycle.EJBLifecycleHandler;
 import org.jboss.metadata.ejb.jboss.JBossEnterpriseBeanMetaData;
 
 /**
@@ -68,24 +67,18 @@
    EJBDeploymentInfo getDeploymentInfo();
    
    /**
-    * Uses the information in the passed {@link ContainerInvocationContext} to 
+    * Uses the information in the passed {@link ContainerInvocation} to 
     * invoke on the target object.
     * 
     * @param containerInvocation The container invocation
     * @return Returns the result of the invocation
     * @throws Exception If something fails during the invocation 
     */
-   Object invoke(ContainerInvocationContext containerInvocation) throws Exception;
+   Object invoke(ContainerInvocation containerInvocation) throws Exception;
    
    /**
     * @return Returns the {@link InterceptorRegistry} corresponding to this container.
     */
    InterceptorRegistry getInterceptorRegistry();
    
-   /**
-    * @return Returns the {@link EJBLifecycleHandler} which is responsible for handling the 
-    * lifecycle events (like PostConstruct, PreDestroy etc...) of a bean instance
-    * 
-    */
-   EJBLifecycleHandler getEJBLifecycleHandler();
 }

Modified: projects/ejb3/components/container/trunk/spi/src/main/java/org/jboss/ejb3/container/spi/EJBInstanceManager.java
===================================================================
--- projects/ejb3/components/container/trunk/spi/src/main/java/org/jboss/ejb3/container/spi/EJBInstanceManager.java	2010-02-10 11:01:48 UTC (rev 100794)
+++ projects/ejb3/components/container/trunk/spi/src/main/java/org/jboss/ejb3/container/spi/EJBInstanceManager.java	2010-02-10 11:07:51 UTC (rev 100795)
@@ -21,6 +21,8 @@
 */
 package org.jboss.ejb3.container.spi;
 
+import java.io.Serializable;
+
 /**
  * EJBInstanceManager
  * <p>
@@ -35,17 +37,39 @@
 {
 
    /**
-    * @return Creates and returns new {@link BeanContext}
+    * @return Creates and returns the session id associated with the newly created {@link BeanContext}.
+    *  If the instance manager corresponds to a stateless bean, then a NULL session id is returned
     * 
     */
-   BeanContext create();
+   Serializable create();
 
    /**
-    * Destroys an already created {@link BeanContext}
-    * @param beanContext The {@link BeanContext} to be destroyed
-    * @throws IllegalArgumentException If the <code>beanContext</code> doesn't exist
+    * Destroys an already created session.
+    * <p>
+    * This method is applicable only for an {@link EJBInstanceManager} which manages
+    * a stateful session bean instances. Use {@link #isSessionAware()}
+    * method to check whether this {@link EJBInstanceManager} corresponds to a 
+    * stateful session bean
+    * </p>
+    * 
+    * @param sessionId The session which needs to be destroyed
+    * @throws IllegalArgumentException If a {@link BeanContext} corresponding to the
+    *                 passed <code>sessionId</code> doesn't exist or if the passed
+    *                 <code>sessionId</code> is null
+    *                 
+    * @throws IllegalStateException If this {@link EJBInstanceManager} is not meant for
+    *                           stateful session beans. Use {@link #isSessionAware()}
+    *                           before calling this method, to check whether this {@link EJBInstanceManager}
+    *                           is for stateful session beans.                 
     */
-   void destroy(BeanContext beanContext) throws IllegalArgumentException;
+   void destroy(Serializable sessionId) throws IllegalArgumentException, IllegalStateException;
+   
+   /**
+    * @return Returns true if this {@link EJBInstanceManager} is responsible
+    * for managing instances of a stateful session bean. Else returns false  
+    * 
+    */
+   boolean isSessionAware();
 
    /**
     * @return Returns the {@link EJBContainer} to which this

Modified: projects/ejb3/components/container/trunk/spi/src/main/java/org/jboss/ejb3/container/spi/InterceptorRegistry.java
===================================================================
--- projects/ejb3/components/container/trunk/spi/src/main/java/org/jboss/ejb3/container/spi/InterceptorRegistry.java	2010-02-10 11:01:48 UTC (rev 100794)
+++ projects/ejb3/components/container/trunk/spi/src/main/java/org/jboss/ejb3/container/spi/InterceptorRegistry.java	2010-02-10 11:07:51 UTC (rev 100795)
@@ -21,13 +21,18 @@
 */
 package org.jboss.ejb3.container.spi;
 
+import javax.annotation.PostConstruct;
+import javax.annotation.PreDestroy;
+import javax.ejb.PostActivate;
+import javax.ejb.PrePassivate;
+
 /**
  * InterceptorRegistry
  *
  * <p>
  * An {@link InterceptorRegistry} for a {@link EJBContainer} is responsible 
  * for applying any applicable interceptors to a target EJB instance during a 
- * {@link ContainerInvocationContext}. It's upto the implementations of the {@link InterceptorRegistry}
+ * {@link ContainerInvocation}. It's upto the implementations of the {@link InterceptorRegistry}
  * to get hold of the correct set of interceptors that need to be applied during the
  * invocation. 
  * </p>
@@ -50,11 +55,69 @@
    EJBContainer getEJBContainer();
    
    /**
-    * Intercepts a {@link ContainerInvocationContext}.
+    * Run the <code>targetBeanContext</code> against any applicable interceptor methods for
+    * {@link PostConstruct}.
     * <p>
+    *   This method is even responsible for invoking any {@link PostConstruct} method on the 
+    *   target bean instance. Furthermore, this method is responsible for creating any
+    *   interceptor instances corresponding to the target bean instance.
+    * </p> 
+    * @param targetBeanContext The {@link BeanContext} which is being processed for the {@link PostConstruct}
+    *                           lifecycle
+    * @throws Exception If any exception was encountered during processing the {@link PostConstruct}
+    *                   for the <code>targetBeanContext</code>.
+    */
+   void invokePostConstruct(BeanContext targetBeanContext) throws Exception;
+
+   /**
+    * Run the <code>targetBeanContext</code> against any applicable interceptor methods for
+    * {@link PreDestroy}.
+    * <p>
+    *   This method is even responsible for invoking any {@link PreDestroy} method on the 
+    *   target bean instance. Furthermore, this method is responsible for destroying any
+    *   interceptor instances corresponding to the target bean instance.
+    * </p> 
+    * @param targetBeanContext The {@link BeanContext} which is being processed for the {@link PreDestroy}
+    *                           lifecycle
+    * @throws Exception If any exception was encountered during processing the {@link PreDestroy}
+    *                   for the <code>targetBeanContext</code>.
+    */
+   void invokePreDestroy(BeanContext targetBeanContext) throws Exception;
+   
+   /**
+    * Run the <code>targetBeanContext</code> against any applicable interceptor methods for
+    * {@link PrePassivate}.
+    * <p>
+    *   This method is even responsible for invoking any {@link PrePassivate} method on the 
+    *   target bean instance. 
+    * </p> 
+    * @param targetBeanContext The {@link BeanContext} which is being processed for the {@link PrePassivate}
+    *                           lifecycle
+    * @throws Exception If any exception was encountered during processing the {@link PrePassivate}
+    *                   for the <code>targetBeanContext</code>.
+    */
+   void invokePrePassivate(BeanContext targetBeanContext) throws Exception;
+   
+   /**
+    * Run the <code>targetBeanContext</code> against any applicable interceptor methods for
+    * {@link PostActivate}.
+    * <p>
+    *   This method is even responsible for invoking any {@link PostActivate} method on the 
+    *   target bean instance. 
+    * </p> 
+    * @param targetBeanContext The {@link BeanContext} which is being processed for the {@link PostActivate}
+    *                           lifecycle
+    * @throws Exception If any exception was encountered during processing the {@link PostActivate}
+    *                   for the <code>targetBeanContext</code>.
+    */
+   void invokePostActivate(BeanContext targetBeanContext) throws Exception;
+   
+   /**
+    * Intercepts a {@link ContainerInvocation}.
+    * <p>
     *   This method is responsible to applying any interceptors applicable for the 
     *   <code>targetBeanContext</code> object. The <code>targetBeanContext</code> holds the EJB instance
-    *   on which the {@link ContainerInvocationContext} is being done.    
+    *   on which the {@link ContainerInvocation} is being done.    
     * </p>
     * @param containerInvocation The container invocation
     * @param targetBeanContext The target bean context
@@ -62,6 +125,6 @@
     * @throws Exception If any exception occurs during intercepting of the invocation on the 
     *               <code>target</code> object
     */
-   Object intercept(ContainerInvocationContext containerInvocation, BeanContext targetBeanContext) throws Exception;
+   Object intercept(ContainerInvocation containerInvocation, BeanContext targetBeanContext) throws Exception;
    
 }

Deleted: projects/ejb3/components/container/trunk/spi/src/main/java/org/jboss/ejb3/container/spi/StatefulContainerInvocation.java
===================================================================
--- projects/ejb3/components/container/trunk/spi/src/main/java/org/jboss/ejb3/container/spi/StatefulContainerInvocation.java	2010-02-10 11:01:48 UTC (rev 100794)
+++ projects/ejb3/components/container/trunk/spi/src/main/java/org/jboss/ejb3/container/spi/StatefulContainerInvocation.java	2010-02-10 11:07:51 UTC (rev 100795)
@@ -1,43 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-*/
-package org.jboss.ejb3.container.spi;
-
-import java.io.Serializable;
-
-/**
- * StatefulContainerInvocation
- * <p>
- *  A {@link StatefulContainerInvocation} represents a {@link ContainerInvocationContext} on
- *  a stateful bean 
- * </p>
- * @author Jaikiran Pai
- * @version $Revision: $
- */
-public interface StatefulContainerInvocation extends ContainerInvocationContext
-{
-
-   /**
-    * Returns the session id corresponding to the stateful bean instance.
-    * @return
-    */
-   Serializable getSessionId();
-}

Deleted: projects/ejb3/components/container/trunk/spi/src/main/java/org/jboss/ejb3/container/spi/StatefulEJBInstanceManager.java
===================================================================
--- projects/ejb3/components/container/trunk/spi/src/main/java/org/jboss/ejb3/container/spi/StatefulEJBInstanceManager.java	2010-02-10 11:01:48 UTC (rev 100794)
+++ projects/ejb3/components/container/trunk/spi/src/main/java/org/jboss/ejb3/container/spi/StatefulEJBInstanceManager.java	2010-02-10 11:07:51 UTC (rev 100795)
@@ -1,60 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-*/
-package org.jboss.ejb3.container.spi;
-
-import java.io.Serializable;
-
-/**
- * StatefulEJBInstanceManager
- *
- * <p>
- * A {@link StatefulEJBInstanceManager} is responsible for creating/destroying 
- * stateful bean instances
- * </p>
- * @see EJBInstanceManager
- * @author Jaikiran Pai
- * @version $Revision: $
- */
-public interface StatefulEJBInstanceManager extends EJBInstanceManager
-{
-   /**
-    * Creates and returns a {@link BeanContext} corresponding to a 
-    * stateful session bean
-    * 
-    * @param initTypes The Class types of any init method corresponding to the stateful bean 
-    * @param initValues The params values to be passed to the init method corresponding to the
-    *                   stateful bean
-    * @return
-    */
-   BeanContext create(Class<?>[] initTypes, Object initValues[]);
-
-   /**
-    * Returns the {@link BeanContext} corresponding to the passed <code>sessionId</code>
-    * @param sessionId The session id of the bean context being requested for
-    * @return
-    * @throws IllegalArgumentException If no bean context corresponding to the passed <code>sessionId</code>
-    *                               was found
-    */
-   // TODO: Better (custom) exception to throw instead of IllegalArgumentException?
-   BeanContext get(Serializable sessionId) throws IllegalArgumentException;
-   
-}

Deleted: projects/ejb3/components/container/trunk/spi/src/main/java/org/jboss/ejb3/container/spi/StatelessEJBInstanceManager.java
===================================================================
--- projects/ejb3/components/container/trunk/spi/src/main/java/org/jboss/ejb3/container/spi/StatelessEJBInstanceManager.java	2010-02-10 11:01:48 UTC (rev 100794)
+++ projects/ejb3/components/container/trunk/spi/src/main/java/org/jboss/ejb3/container/spi/StatelessEJBInstanceManager.java	2010-02-10 11:07:51 UTC (rev 100795)
@@ -1,44 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-*/
-package org.jboss.ejb3.container.spi;
-
-/**
- * StatelessEJBInstanceManager
- * <p>
- *  A {@link StatelessEJBInstanceManager} is responsible for creating/destroying 
- *  stateless bean instances.
- * </p>
- * @author Jaikiran Pai
- * @version $Revision: $
- */
-public interface StatelessEJBInstanceManager extends EJBInstanceManager
-{
-   /**
-    * @return Returns a {@link BeanContext} for a stateless session bean.
-    * It's upto the underlying implementation to either create a new bean
-    * instance and return the {@link BeanContext} or return an existing
-    * bean instance from a pool 
-    * 
-    */
-   BeanContext get();
-
-}

Modified: projects/ejb3/components/container/trunk/spi/src/main/java/org/jboss/ejb3/container/spi/lifecycle/EJBLifecycleHandler.java
===================================================================
--- projects/ejb3/components/container/trunk/spi/src/main/java/org/jboss/ejb3/container/spi/lifecycle/EJBLifecycleHandler.java	2010-02-10 11:01:48 UTC (rev 100794)
+++ projects/ejb3/components/container/trunk/spi/src/main/java/org/jboss/ejb3/container/spi/lifecycle/EJBLifecycleHandler.java	2010-02-10 11:07:51 UTC (rev 100795)
@@ -57,8 +57,9 @@
     * </p>
     * @param beanContext The {@link BeanContext}, upon whose construction, this
     *       lifecycle method was invoked 
+    * @throws Exception If any exception occurs during processing the lifecycle event       
     */
-   void postConstruct(BeanContext beanContext);
+   void postConstruct(BeanContext beanContext) throws Exception;
 
    /**
     * Will be called before destroying a bean context.
@@ -73,8 +74,9 @@
     * </p>
     * @param beanContext The {@link BeanContext}, before whose destruction, this
     *       lifecycle method was invoked 
+    * @throws Exception If any exception occurs during processing the lifecycle event       
     */
-   void preDestroy(BeanContext beanContext);
+   void preDestroy(BeanContext beanContext) throws Exception;
    
    
 }

Modified: projects/ejb3/components/container/trunk/spi/src/main/java/org/jboss/ejb3/container/spi/lifecycle/StatefulEJBLifecycleHandler.java
===================================================================
--- projects/ejb3/components/container/trunk/spi/src/main/java/org/jboss/ejb3/container/spi/lifecycle/StatefulEJBLifecycleHandler.java	2010-02-10 11:01:48 UTC (rev 100794)
+++ projects/ejb3/components/container/trunk/spi/src/main/java/org/jboss/ejb3/container/spi/lifecycle/StatefulEJBLifecycleHandler.java	2010-02-10 11:07:51 UTC (rev 100795)
@@ -37,26 +37,6 @@
 {
 
    /**
-    *  Will be called upon construction of a bean context.
-    *  <p>
-    * Like the {@link EJBLifecycleHandler#postConstruct(BeanContext)} method, this 
-    * method is responsible for carrying out any appropriate actions on  
-    * creation of a stateful bean instance.
-    * </p> 
-    * <p>
-    * In addition to what the {@link EJBLifecycleHandler#postConstruct(BeanContext)} method
-    * is typically responsible for, this method invokes any init method on the stateful bean
-    * instance
-    * </p>
-    * @param beanContext The {@link BeanContext} on whose construction, this lifecycle callback
-    *                   method was invoked
-    * @param initTypes The Class types of any init method corresponding to the stateful bean 
-    * @param initValues The params values to be passed to the init method corresponding to the
-    *                   stateful bean
-    */
-   void postConstruct(BeanContext beanContext, Class<?>[] initTypes, Object initValues[]);
-   
-   /**
     * Will be called before a stateful {@link BeanContext} is passivated
     * <p>
     *  Typically, this lifecycle callback method is responsible for carrying out




More information about the jboss-cvs-commits mailing list