[jboss-cvs] JBossAS SVN: r109860 - projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/session.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Mon Dec 13 03:56:11 EST 2010


Author: ALRubinger
Date: 2010-12-13 03:56:10 -0500 (Mon, 13 Dec 2010)
New Revision: 109860

Modified:
   projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/session/SessionContainerInvocation.java
Log:
[EJBTHREE-1721] Override "copy" for SessionContainerInvocation to preserve the correct type

Modified: projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/session/SessionContainerInvocation.java
===================================================================
--- projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/session/SessionContainerInvocation.java	2010-12-13 08:08:43 UTC (rev 109859)
+++ projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/session/SessionContainerInvocation.java	2010-12-13 08:56:10 UTC (rev 109860)
@@ -35,6 +35,12 @@
 public class SessionContainerInvocation<A extends SessionContainer, T extends BeanContext<A>> extends EJBContainerInvocation<A, T>
 {
    private SessionInvocationContextAdapter invocationContext;
+   
+   private final SessionSpecContainer container;
+   
+   private final MethodInfo info;
+   
+   private final Class<?> invokedBusinessInterface;
 
    /**
     * Creates a {@link SessionContainerInvocation}
@@ -48,6 +54,9 @@
       super(info);
       this.invocationContext = new SessionInvocationContextAdapter(invokedBusinessInterface, this,
             container.getAsynchronousExecutor(), container);
+      this.container = container;
+      this.info = info;
+      this.invokedBusinessInterface = invokedBusinessInterface;
    }
    
    /**
@@ -83,5 +92,16 @@
          invocationContext.setEJBContext(null);
       else
          invocationContext.setEJBContext(((org.jboss.ejb3.BeanContext<?>) beanCtx).getEJBContext());
-   }   
+   }
+
+   @Override
+   public Invocation copy()
+   {
+      final SessionContainerInvocation<A, T> newInvocation = new SessionContainerInvocation<A, T>(
+            this.invokedBusinessInterface, this.info, container);
+      newInvocation.interceptors = this.interceptors;
+      newInvocation.invocationContext = this.invocationContext;
+      newInvocation.setBeanContext(this.getBeanContext());
+      return newInvocation;
+   } 
 }



More information about the jboss-cvs-commits mailing list