[jboss-cvs] JBossAS SVN: r58976 - in branches/Branch_4_0: server/src/main/org/jboss/invocation/pooled/interfaces testsuite/imports testsuite/imports/sections testsuite/src/main/org/jboss/test testsuite/src/main/org/jboss/test/scoped testsuite/src/main/org/jboss/test/scoped/ejb testsuite/src/main/org/jboss/test/scoped/ejb/a testsuite/src/main/org/jboss/test/scoped/ejb/b testsuite/src/main/org/jboss/test/scoped/interfaces testsuite/src/main/org/jboss/test/scoped/interfaces/a testsuite/src/main/org/jboss/test/scoped/interfaces/b testsuite/src/main/org/jboss/test/scoped/interfaces/dto testsuite/src/main/org/jboss/test/scoped/test testsuite/src/resources testsuite/src/resources/scoped testsuite/src/resources/scoped/a testsuite/src/resources/scoped/a/ear testsuite/src/resources/scoped/a/ear/META-INF testsuite/src/resources/scoped/a/ejb testsuite/src/resources/scoped/a/ejb/META-INF testsuite/src/resources/scoped/b testsuite/src/resources/scoped/b/ear testsuite/src/resources/scoped/b/! ear/META-INF testsuite/src/resources/scoped/b/ejb testsuite/src/resources/scoped/b/ejb/META-INF

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Mon Dec 11 14:19:53 EST 2006


Author: tom.elrod at jboss.com
Date: 2006-12-11 14:19:48 -0500 (Mon, 11 Dec 2006)
New Revision: 58976

Added:
   branches/Branch_4_0/testsuite/imports/sections/scoped.xml
   branches/Branch_4_0/testsuite/src/main/org/jboss/test/scoped/
   branches/Branch_4_0/testsuite/src/main/org/jboss/test/scoped/ejb/
   branches/Branch_4_0/testsuite/src/main/org/jboss/test/scoped/ejb/a/
   branches/Branch_4_0/testsuite/src/main/org/jboss/test/scoped/ejb/a/SessionAEJB.java
   branches/Branch_4_0/testsuite/src/main/org/jboss/test/scoped/ejb/b/
   branches/Branch_4_0/testsuite/src/main/org/jboss/test/scoped/ejb/b/SessionBEJB.java
   branches/Branch_4_0/testsuite/src/main/org/jboss/test/scoped/interfaces/
   branches/Branch_4_0/testsuite/src/main/org/jboss/test/scoped/interfaces/a/
   branches/Branch_4_0/testsuite/src/main/org/jboss/test/scoped/interfaces/a/SessionA.java
   branches/Branch_4_0/testsuite/src/main/org/jboss/test/scoped/interfaces/a/SessionAHome.java
   branches/Branch_4_0/testsuite/src/main/org/jboss/test/scoped/interfaces/b/
   branches/Branch_4_0/testsuite/src/main/org/jboss/test/scoped/interfaces/b/SessionB.java
   branches/Branch_4_0/testsuite/src/main/org/jboss/test/scoped/interfaces/b/SessionBHome.java
   branches/Branch_4_0/testsuite/src/main/org/jboss/test/scoped/interfaces/dto/
   branches/Branch_4_0/testsuite/src/main/org/jboss/test/scoped/interfaces/dto/SimpleRequestDTO.java
   branches/Branch_4_0/testsuite/src/main/org/jboss/test/scoped/interfaces/dto/SimpleResponseDTO.java
   branches/Branch_4_0/testsuite/src/main/org/jboss/test/scoped/test/
   branches/Branch_4_0/testsuite/src/main/org/jboss/test/scoped/test/ScopedUnitTestCase.java
   branches/Branch_4_0/testsuite/src/resources/scoped/
   branches/Branch_4_0/testsuite/src/resources/scoped/a/
   branches/Branch_4_0/testsuite/src/resources/scoped/a/ear/
   branches/Branch_4_0/testsuite/src/resources/scoped/a/ear/META-INF/
   branches/Branch_4_0/testsuite/src/resources/scoped/a/ear/META-INF/application.xml
   branches/Branch_4_0/testsuite/src/resources/scoped/a/ear/META-INF/jboss-app.xml
   branches/Branch_4_0/testsuite/src/resources/scoped/a/ejb/
   branches/Branch_4_0/testsuite/src/resources/scoped/a/ejb/META-INF/
   branches/Branch_4_0/testsuite/src/resources/scoped/a/ejb/META-INF/ejb-jar.xml
   branches/Branch_4_0/testsuite/src/resources/scoped/a/ejb/META-INF/jboss.xml
   branches/Branch_4_0/testsuite/src/resources/scoped/b/
   branches/Branch_4_0/testsuite/src/resources/scoped/b/ear/
   branches/Branch_4_0/testsuite/src/resources/scoped/b/ear/META-INF/
   branches/Branch_4_0/testsuite/src/resources/scoped/b/ear/META-INF/application.xml
   branches/Branch_4_0/testsuite/src/resources/scoped/b/ear/META-INF/jboss-app.xml
   branches/Branch_4_0/testsuite/src/resources/scoped/b/ejb/
   branches/Branch_4_0/testsuite/src/resources/scoped/b/ejb/META-INF/
   branches/Branch_4_0/testsuite/src/resources/scoped/b/ejb/META-INF/ejb-jar.xml
   branches/Branch_4_0/testsuite/src/resources/scoped/b/ejb/META-INF/jboss.xml
Modified:
   branches/Branch_4_0/server/src/main/org/jboss/invocation/pooled/interfaces/OptimizedObjectInputStream.java
   branches/Branch_4_0/server/src/main/org/jboss/invocation/pooled/interfaces/PooledMarshalledInvocation.java
   branches/Branch_4_0/testsuite/imports/test-jars.xml
Log:
JBAS-3198 - fix for pooled invoker scoped deployments class caching.

Modified: branches/Branch_4_0/server/src/main/org/jboss/invocation/pooled/interfaces/OptimizedObjectInputStream.java
===================================================================
--- branches/Branch_4_0/server/src/main/org/jboss/invocation/pooled/interfaces/OptimizedObjectInputStream.java	2006-12-11 16:10:29 UTC (rev 58975)
+++ branches/Branch_4_0/server/src/main/org/jboss/invocation/pooled/interfaces/OptimizedObjectInputStream.java	2006-12-11 19:19:48 UTC (rev 58976)
@@ -1,24 +1,24 @@
 /*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file 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.
- */
+* 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.invocation.pooled.interfaces;
 
 import java.io.IOException;
@@ -28,7 +28,11 @@
 import java.lang.ref.WeakReference;
 import java.lang.reflect.Method;
 import java.lang.reflect.Proxy;
+import java.util.Collections;
+import java.util.Map;
+import java.util.WeakHashMap;
 
+import EDU.oswego.cs.dl.util.concurrent.ConcurrentHashMap;
 import EDU.oswego.cs.dl.util.concurrent.ConcurrentReaderHashMap;
 
 /**
@@ -44,7 +48,7 @@
         extends ObjectInputStream
 {
    /** A class wide cache of proxy classes populated by resolveProxyClass */
-   private static ConcurrentReaderHashMap classCache;
+   private static Map classCache;
    private static ConcurrentReaderHashMap objectStreamClassCache;
    private static Method lookupStreamClass = null;
 
@@ -71,7 +75,7 @@
    {
       if (flag == true)
       {
-         classCache = new ConcurrentReaderHashMap();
+         classCache = Collections.synchronizedMap(new WeakHashMap());
          objectStreamClassCache = new ConcurrentReaderHashMap();
       }
       else
@@ -93,13 +97,22 @@
    private static Class forName(String className) throws ClassNotFoundException
    {
       Class clazz = null;
+
       if (classCache != null)
       {
-         WeakReference ref = (WeakReference) classCache.get(className);
+
+    	 ConcurrentHashMap subCache = (ConcurrentHashMap )classCache.get(Thread.currentThread().getContextClassLoader());
+    	 if (subCache==null)
+    	 {
+    		 classCache.put(Thread.currentThread().getContextClassLoader(), new ConcurrentHashMap());
+    		 subCache = (ConcurrentHashMap )classCache.get(Thread.currentThread().getContextClassLoader());
+    	 }
+
+         WeakReference ref = (WeakReference) subCache.get(className);
          if (ref != null) clazz = (Class) ref.get();
          if (clazz == null)
          {
-            if (ref != null) classCache.remove(className);
+            if (ref != null) subCache.remove(className);
             ClassLoader loader = Thread.currentThread().getContextClassLoader();
             try
             {
@@ -113,7 +126,7 @@
                */
                clazz = Class.forName(className, false, loader);
             }
-            classCache.put(className, new WeakReference(clazz));
+            subCache.put(className, new WeakReference(clazz));
          }
       }
       else

Modified: branches/Branch_4_0/server/src/main/org/jboss/invocation/pooled/interfaces/PooledMarshalledInvocation.java
===================================================================
--- branches/Branch_4_0/server/src/main/org/jboss/invocation/pooled/interfaces/PooledMarshalledInvocation.java	2006-12-11 16:10:29 UTC (rev 58975)
+++ branches/Branch_4_0/server/src/main/org/jboss/invocation/pooled/interfaces/PooledMarshalledInvocation.java	2006-12-11 19:19:48 UTC (rev 58976)
@@ -44,7 +44,7 @@
  * distribution purposes as well as the "hash" for the methods that we send, as
  * opposed to sending Method objects. Serialization "optimizations" should be
  * coded here in the externalization implementation of the class
- * 
+ *
  * @author <a href="mailto:marc at jboss.org">Marc Fleury</a>
  * @version $Revision$
  */

Added: branches/Branch_4_0/testsuite/imports/sections/scoped.xml
===================================================================
--- branches/Branch_4_0/testsuite/imports/sections/scoped.xml	2006-12-11 16:10:29 UTC (rev 58975)
+++ branches/Branch_4_0/testsuite/imports/sections/scoped.xml	2006-12-11 19:19:48 UTC (rev 58976)
@@ -0,0 +1,51 @@
+<project name="tests-scoped-jars">
+   <!-- isolation test -->
+   <target name="_jars-scoped">
+      <mkdir dir="${build.lib}"/>
+
+      <!-- build scopedA.jar -->
+      <jar destfile="${build.lib}/scopedA.jar">
+         <fileset dir="${build.classes}">
+            <include name="org/jboss/test/scoped/ejb/a/**"/>
+            <include name="org/jboss/test/scoped/interfaces/**"/>
+            <include name="org/jboss/test/util/Debug.class"/>
+         </fileset>
+         <fileset dir="${build.resources}/scoped/a/ejb">
+            <include name="META-INF/*.xml"/>
+         </fileset>
+      </jar>
+
+      <!-- build scopedB.jar -->
+      <jar destfile="${build.lib}/scopedB.jar">
+         <fileset dir="${build.classes}">
+            <include name="org/jboss/test/scoped/ejb/b/**"/>
+            <include name="org/jboss/test/scoped/interfaces/**"/>
+            <include name="org/jboss/test/util/Debug.class"/>
+         </fileset>
+         <fileset dir="${build.resources}/scoped/b/ejb">
+            <include name="META-INF/*.xml"/>
+         </fileset>
+      </jar>
+
+      <!-- build scopedA.ear -->
+      <jar destfile="${build.lib}/scopedA.ear">
+         <fileset dir="${build.lib}">
+            <include name="scopedA.jar"/>
+         </fileset>
+         <fileset dir="${build.resources}/scoped/a/ear">
+            <include name="META-INF/*.xml"/>
+         </fileset>
+      </jar>
+
+      <!-- build scopedB.ear -->
+      <jar destfile="${build.lib}/scopedB.ear">
+         <fileset dir="${build.lib}">
+            <include name="scopedB.jar"/>
+         </fileset>
+         <fileset dir="${build.resources}/scoped/b/ear">
+            <include name="META-INF/*.xml"/>
+         </fileset>
+      </jar>
+
+   </target>
+</project>

Modified: branches/Branch_4_0/testsuite/imports/test-jars.xml
===================================================================
--- branches/Branch_4_0/testsuite/imports/test-jars.xml	2006-12-11 16:10:29 UTC (rev 58975)
+++ branches/Branch_4_0/testsuite/imports/test-jars.xml	2006-12-11 19:19:48 UTC (rev 58976)
@@ -54,6 +54,7 @@
 	<import file="sections/proxycompiler.xml"/>
 	<import file="sections/readahead.xml"/>
 	<import file="sections/retry.xml"/>
+	<import file="sections/scoped.xml"/>
     <import file="sections/security.xml"/>
     <import file="sections/securitymgr.xml"/>
 	<import file="sections/session.xml"/>
@@ -132,6 +133,7 @@
       _jars-proxycompiler,
       _jars-readahead,
       _jars-retry,
+      _jars-scoped,
       _jars-security,
       _jars-securitymgr,
       _jars-session,

Added: branches/Branch_4_0/testsuite/src/main/org/jboss/test/scoped/ejb/a/SessionAEJB.java
===================================================================
--- branches/Branch_4_0/testsuite/src/main/org/jboss/test/scoped/ejb/a/SessionAEJB.java	2006-12-11 16:10:29 UTC (rev 58975)
+++ branches/Branch_4_0/testsuite/src/main/org/jboss/test/scoped/ejb/a/SessionAEJB.java	2006-12-11 19:19:48 UTC (rev 58976)
@@ -0,0 +1,96 @@
+/*
+* JBoss, a division of Red Hat
+* Copyright 2006, Red Hat Middleware, LLC, 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.test.scoped.ejb.a;
+
+import org.jboss.logging.Logger;
+import org.jboss.test.util.Debug;
+import org.jboss.test.scoped.interfaces.dto.SimpleResponseDTO;
+import org.jboss.test.scoped.interfaces.dto.SimpleRequestDTO;
+
+import javax.ejb.SessionBean;
+import javax.ejb.EJBException;
+import javax.ejb.CreateException;
+import javax.ejb.SessionContext;
+import javax.naming.InitialContext;
+import java.rmi.RemoteException;
+
+/**
+ * @author <a href="mailto:tom at jboss.org">Tom Elrod</a>
+ */
+public class SessionAEJB implements SessionBean
+{
+   private static final long serialVersionUID = 1L;
+
+   public SessionAEJB()
+   {
+       super();
+   }
+
+
+   public SimpleResponseDTO runSimpleTest(SimpleRequestDTO requestDTO)
+   {
+
+       try
+       {
+          SimpleResponseDTO rsDTO = new SimpleResponseDTO();
+          rsDTO.setFirstName(requestDTO.getFirstName().toUpperCase());
+          rsDTO.setLastName(requestDTO.getLastName().toUpperCase());
+          System.out.println("Got firstname: " + requestDTO.getFirstName());
+          System.out.println("Got lastname:" + requestDTO.getLastName());
+           return rsDTO;
+       }
+       catch (Throwable t)
+       {
+           Logger logger=Logger.getLogger(this.getClass());
+           logger.error(t);
+
+           SimpleResponseDTO rsDTO =  new SimpleResponseDTO();
+
+           return rsDTO;
+       }
+   }
+
+   public String stringTest(String request) throws java.rmi.RemoteException
+   {
+       return request.toUpperCase();
+   }
+
+   public void setSessionContext(SessionContext arg0) throws EJBException, RemoteException
+   {
+   }
+
+   public void ejbCreate() throws EJBException, RemoteException
+   {
+   }
+
+   public void ejbRemove() throws EJBException, RemoteException
+   {
+   }
+
+   public void ejbActivate() throws EJBException, RemoteException
+   {
+   }
+
+   public void ejbPassivate() throws EJBException, RemoteException
+   {
+   }
+ }

Added: branches/Branch_4_0/testsuite/src/main/org/jboss/test/scoped/ejb/b/SessionBEJB.java
===================================================================
--- branches/Branch_4_0/testsuite/src/main/org/jboss/test/scoped/ejb/b/SessionBEJB.java	2006-12-11 16:10:29 UTC (rev 58975)
+++ branches/Branch_4_0/testsuite/src/main/org/jboss/test/scoped/ejb/b/SessionBEJB.java	2006-12-11 19:19:48 UTC (rev 58976)
@@ -0,0 +1,93 @@
+/*
+* JBoss, a division of Red Hat
+* Copyright 2006, Red Hat Middleware, LLC, 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.test.scoped.ejb.b;
+
+import org.jboss.test.scoped.interfaces.dto.SimpleResponseDTO;
+import org.jboss.test.scoped.interfaces.dto.SimpleRequestDTO;
+import org.jboss.logging.Logger;
+
+import javax.ejb.SessionBean;
+import javax.ejb.SessionContext;
+import javax.ejb.EJBException;
+import java.rmi.RemoteException;
+
+/**
+ * @author <a href="mailto:tom at jboss.org">Tom Elrod</a>
+ */
+public class SessionBEJB implements SessionBean
+{
+   private static final long serialVersionUID = 2L;
+
+   public SessionBEJB()
+   {
+       super();
+   }
+
+
+   public SimpleResponseDTO runSimpleTest(SimpleRequestDTO requestDTO)
+   {
+
+       try
+       {
+          SimpleResponseDTO rsDTO = new SimpleResponseDTO();
+          rsDTO.setFirstName(requestDTO.getFirstName().toUpperCase());
+          rsDTO.setLastName(requestDTO.getLastName().toUpperCase());
+          System.out.println("Got firstname: " + requestDTO.getFirstName());
+          System.out.println("Got lastname:" + requestDTO.getLastName());
+           return rsDTO;
+       }
+       catch (Throwable t)
+       {
+           Logger logger=Logger.getLogger(this.getClass());
+           logger.error(t);
+
+           SimpleResponseDTO rsDTO =  new SimpleResponseDTO();
+
+           return rsDTO;
+       }
+   }
+
+   public String stringTest(String request) throws java.rmi.RemoteException
+   {
+       return request.toUpperCase();
+   }
+
+   public void setSessionContext(SessionContext arg0) throws EJBException, RemoteException
+   {
+   }
+
+   public void ejbCreate() throws EJBException, RemoteException
+   {
+   }
+
+   public void ejbRemove() throws EJBException, RemoteException
+   {
+   }
+
+   public void ejbActivate() throws EJBException, RemoteException
+   {
+   }
+
+   public void ejbPassivate() throws EJBException, RemoteException
+   {
+   }
+ }

Added: branches/Branch_4_0/testsuite/src/main/org/jboss/test/scoped/interfaces/a/SessionA.java
===================================================================
--- branches/Branch_4_0/testsuite/src/main/org/jboss/test/scoped/interfaces/a/SessionA.java	2006-12-11 16:10:29 UTC (rev 58975)
+++ branches/Branch_4_0/testsuite/src/main/org/jboss/test/scoped/interfaces/a/SessionA.java	2006-12-11 19:19:48 UTC (rev 58976)
@@ -0,0 +1,36 @@
+/*
+* JBoss, a division of Red Hat
+* Copyright 2006, Red Hat Middleware, LLC, 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.test.scoped.interfaces.a;
+
+import org.jboss.test.scoped.interfaces.dto.SimpleResponseDTO;
+import org.jboss.test.scoped.interfaces.dto.SimpleRequestDTO;
+
+import javax.ejb.EJBObject;
+import java.rmi.RemoteException;
+
+/**
+ * @author <a href="mailto:telrod at e2technologies.net">Tom Elrod</a>
+ */
+public interface SessionA extends EJBObject
+{
+   public SimpleResponseDTO runSimpleTest(SimpleRequestDTO requestDTO) throws RemoteException;
+}
\ No newline at end of file

Added: branches/Branch_4_0/testsuite/src/main/org/jboss/test/scoped/interfaces/a/SessionAHome.java
===================================================================
--- branches/Branch_4_0/testsuite/src/main/org/jboss/test/scoped/interfaces/a/SessionAHome.java	2006-12-11 16:10:29 UTC (rev 58975)
+++ branches/Branch_4_0/testsuite/src/main/org/jboss/test/scoped/interfaces/a/SessionAHome.java	2006-12-11 19:19:48 UTC (rev 58976)
@@ -0,0 +1,35 @@
+/*
+* JBoss, a division of Red Hat
+* Copyright 2006, Red Hat Middleware, LLC, 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.test.scoped.interfaces.a;
+
+
+import javax.ejb.EJBHome;
+import javax.ejb.CreateException;
+import java.rmi.RemoteException;
+
+/**
+ * @author <a href="mailto:telrod at e2technologies.net">Tom Elrod</a>
+ */
+public interface SessionAHome extends EJBHome
+{
+   SessionA create() throws CreateException, RemoteException;
+}

Added: branches/Branch_4_0/testsuite/src/main/org/jboss/test/scoped/interfaces/b/SessionB.java
===================================================================
--- branches/Branch_4_0/testsuite/src/main/org/jboss/test/scoped/interfaces/b/SessionB.java	2006-12-11 16:10:29 UTC (rev 58975)
+++ branches/Branch_4_0/testsuite/src/main/org/jboss/test/scoped/interfaces/b/SessionB.java	2006-12-11 19:19:48 UTC (rev 58976)
@@ -0,0 +1,36 @@
+/*
+* JBoss, a division of Red Hat
+* Copyright 2006, Red Hat Middleware, LLC, 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.test.scoped.interfaces.b;
+
+import org.jboss.test.scoped.interfaces.dto.SimpleResponseDTO;
+import org.jboss.test.scoped.interfaces.dto.SimpleRequestDTO;
+
+import javax.ejb.EJBObject;
+import java.rmi.RemoteException;
+
+/**
+ * @author <a href="mailto:telrod at e2technologies.net">Tom Elrod</a>
+ */
+public interface SessionB extends EJBObject
+{
+   public SimpleResponseDTO runSimpleTest(SimpleRequestDTO requestDTO) throws RemoteException;
+}
\ No newline at end of file

Added: branches/Branch_4_0/testsuite/src/main/org/jboss/test/scoped/interfaces/b/SessionBHome.java
===================================================================
--- branches/Branch_4_0/testsuite/src/main/org/jboss/test/scoped/interfaces/b/SessionBHome.java	2006-12-11 16:10:29 UTC (rev 58975)
+++ branches/Branch_4_0/testsuite/src/main/org/jboss/test/scoped/interfaces/b/SessionBHome.java	2006-12-11 19:19:48 UTC (rev 58976)
@@ -0,0 +1,36 @@
+/*
+* JBoss, a division of Red Hat
+* Copyright 2006, Red Hat Middleware, LLC, 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.test.scoped.interfaces.b;
+
+import org.jboss.test.scoped.interfaces.a.SessionA;
+
+import javax.ejb.CreateException;
+import javax.ejb.EJBHome;
+import java.rmi.RemoteException;
+
+/**
+ * @author <a href="mailto:telrod at e2technologies.net">Tom Elrod</a>
+ */
+public interface SessionBHome extends EJBHome
+{
+   SessionB create() throws CreateException, RemoteException;
+}

Added: branches/Branch_4_0/testsuite/src/main/org/jboss/test/scoped/interfaces/dto/SimpleRequestDTO.java
===================================================================
--- branches/Branch_4_0/testsuite/src/main/org/jboss/test/scoped/interfaces/dto/SimpleRequestDTO.java	2006-12-11 16:10:29 UTC (rev 58975)
+++ branches/Branch_4_0/testsuite/src/main/org/jboss/test/scoped/interfaces/dto/SimpleRequestDTO.java	2006-12-11 19:19:48 UTC (rev 58976)
@@ -0,0 +1,61 @@
+/*
+* JBoss, a division of Red Hat
+* Copyright 2006, Red Hat Middleware, LLC, 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.test.scoped.interfaces.dto;
+
+import java.io.Serializable;
+import java.util.Random;
+
+/**
+ * @author <a href="mailto:tom at jboss.org">Tom Elrod</a>
+ */
+public class SimpleRequestDTO implements Serializable
+{
+   private static final long serialVersionUID = 2L;
+
+   private String firstName;
+   private String lastName;
+
+   public SimpleRequestDTO()
+   {
+   }
+
+
+   public String getFirstName()
+   {
+      return firstName;
+   }
+
+   public String getLastName()
+   {
+      return lastName;
+   }
+
+   public void setFirstName(String firstName)
+   {
+      this.firstName = firstName;
+   }
+
+   public void setLastName(String lastName)
+   {
+      this.lastName = lastName;
+   }
+}

Added: branches/Branch_4_0/testsuite/src/main/org/jboss/test/scoped/interfaces/dto/SimpleResponseDTO.java
===================================================================
--- branches/Branch_4_0/testsuite/src/main/org/jboss/test/scoped/interfaces/dto/SimpleResponseDTO.java	2006-12-11 16:10:29 UTC (rev 58975)
+++ branches/Branch_4_0/testsuite/src/main/org/jboss/test/scoped/interfaces/dto/SimpleResponseDTO.java	2006-12-11 19:19:48 UTC (rev 58976)
@@ -0,0 +1,41 @@
+package org.jboss.test.scoped.interfaces.dto;
+
+import java.io.Serializable;
+import java.util.Random;
+
+public class SimpleResponseDTO implements Serializable
+{
+   private static final long serialVersionUID = 2L;
+//   private static final long serialVersionUID = new Random().nextLong();
+
+   private String firstName;
+   private String lastName;
+
+   public String getFirstName()
+   {
+      return firstName;
+   }
+
+   public String getLastName()
+   {
+      return lastName;
+   }
+
+   public void setFirstName(String firstName)
+   {
+      this.firstName = firstName;
+   }
+
+   public void setLastName(String lastName)
+   {
+      this.lastName = lastName;
+   }
+
+   public SimpleResponseDTO()
+   {
+
+
+   }
+
+
+}
\ No newline at end of file

Added: branches/Branch_4_0/testsuite/src/main/org/jboss/test/scoped/test/ScopedUnitTestCase.java
===================================================================
--- branches/Branch_4_0/testsuite/src/main/org/jboss/test/scoped/test/ScopedUnitTestCase.java	2006-12-11 16:10:29 UTC (rev 58975)
+++ branches/Branch_4_0/testsuite/src/main/org/jboss/test/scoped/test/ScopedUnitTestCase.java	2006-12-11 19:19:48 UTC (rev 58976)
@@ -0,0 +1,123 @@
+/*
+* JBoss, a division of Red Hat
+* Copyright 2006, Red Hat Middleware, LLC, 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.test.scoped.test;
+
+import org.jboss.deployment.EARDeployerMBean;
+import org.jboss.test.JBossTestCase;
+import org.jboss.test.scoped.interfaces.a.SessionA;
+import org.jboss.test.scoped.interfaces.a.SessionAHome;
+import org.jboss.test.scoped.interfaces.dto.SimpleRequestDTO;
+import org.jboss.test.scoped.interfaces.dto.SimpleResponseDTO;
+import org.jboss.test.scoped.interfaces.b.SessionBHome;
+import org.jboss.test.scoped.interfaces.b.SessionB;
+
+import javax.management.Attribute;
+
+/**
+ * @author <a href="mailto:tom at jboss.org">Tom Elrod</a>
+ */
+public class ScopedUnitTestCase extends JBossTestCase
+{
+   public ScopedUnitTestCase(String name)
+   {
+      super(name);
+   }
+
+   public void testScoped() throws Exception
+   {
+      isolateDeployments(Boolean.TRUE);
+      try
+      {
+         deploy("scopedA.ear");
+         try
+         {
+            // Run the test
+            deploy("scopedB.ear");
+            try
+            {
+               doTest();
+            }
+            finally
+            {
+               undeploy("scopedB.ear");
+            }
+
+            // Run the test after a redeployment
+//            deploy("scopedB.ear");
+//            try
+//            {
+//               doTest();
+//            }
+//            finally
+//            {
+//               undeploy("scopedB.ear");
+//            }
+         }
+         finally
+         {
+            undeploy("scopedA.ear");
+         }
+      }
+      finally
+      {
+         isolateDeployments(Boolean.FALSE);
+      }
+   }
+
+   private void doTest() throws Exception
+   {
+//      Properties env = new Properties();
+//      env.put("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory");
+//      //env.put("java.naming.provider.url", "localhost:1099");
+//      env.put("java.naming.provider.url", "localhost:1100");
+//      env.put("java.naming.factory.url.pkgs", "org.jboss.naming:org.jnp.interfaces");
+//
+//      Context ic = new InitialContext(env);
+
+      SessionAHome home = (SessionAHome) getInitialContext().lookup("SessionA");
+      SessionA session = home.create();
+
+
+         SimpleRequestDTO requestDTO = new SimpleRequestDTO();
+         requestDTO.setFirstName("Daffy");
+         requestDTO.setLastName("Duck");
+         SimpleResponseDTO result = session.runSimpleTest(requestDTO);
+
+         System.out.println(result.getFirstName() + " " + result.getLastName());
+
+      SessionBHome homeB = (SessionBHome)getInitialContext().lookup("SessionB");
+      SessionB sessionB = homeB.create();
+
+      result = sessionB.runSimpleTest(requestDTO);
+
+      System.out.println(result.getFirstName() + " " + result.getLastName());
+
+
+
+   }
+
+   private void isolateDeployments(Boolean value) throws Exception
+   {
+      //getServer().setAttribute(EARDeployerMBean.OBJECT_NAME, new Attribute("Isolated", value));
+      getServer().setAttribute(EARDeployerMBean.OBJECT_NAME, new Attribute("CallByValue", value));
+   }
+}

Added: branches/Branch_4_0/testsuite/src/resources/scoped/a/ear/META-INF/application.xml
===================================================================
--- branches/Branch_4_0/testsuite/src/resources/scoped/a/ear/META-INF/application.xml	2006-12-11 16:10:29 UTC (rev 58975)
+++ branches/Branch_4_0/testsuite/src/resources/scoped/a/ear/META-INF/application.xml	2006-12-11 19:19:48 UTC (rev 58976)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<application>
+    <display-name>scopedA</display-name>
+	<module>
+		<ejb>scopedA.jar</ejb>
+	</module>
+</application>
+

Added: branches/Branch_4_0/testsuite/src/resources/scoped/a/ear/META-INF/jboss-app.xml
===================================================================
--- branches/Branch_4_0/testsuite/src/resources/scoped/a/ear/META-INF/jboss-app.xml	2006-12-11 16:10:29 UTC (rev 58975)
+++ branches/Branch_4_0/testsuite/src/resources/scoped/a/ear/META-INF/jboss-app.xml	2006-12-11 19:19:48 UTC (rev 58976)
@@ -0,0 +1,5 @@
+<jboss-app>
+   <loader-repository>jboss.test:loader=sessionA.ear
+      <loader-repository-config>java2ParentDelegation=false</loader-repository-config>
+   </loader-repository>
+</jboss-app>
\ No newline at end of file

Added: branches/Branch_4_0/testsuite/src/resources/scoped/a/ejb/META-INF/ejb-jar.xml
===================================================================
--- branches/Branch_4_0/testsuite/src/resources/scoped/a/ejb/META-INF/ejb-jar.xml	2006-12-11 16:10:29 UTC (rev 58975)
+++ branches/Branch_4_0/testsuite/src/resources/scoped/a/ejb/META-INF/ejb-jar.xml	2006-12-11 19:19:48 UTC (rev 58976)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE ejb-jar PUBLIC
+   "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN"
+   "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
+
+<ejb-jar>
+   <enterprise-beans>
+      <session>
+         <ejb-name>SessionA</ejb-name>
+         <home>org.jboss.test.scoped.interfaces.a.SessionAHome</home>
+         <remote>org.jboss.test.scoped.interfaces.a.SessionA</remote>
+         <ejb-class>org.jboss.test.scoped.ejb.a.SessionAEJB</ejb-class>
+         <session-type>Stateless</session-type>
+         <transaction-type>Container</transaction-type>
+      </session>
+   </enterprise-beans>
+</ejb-jar>

Added: branches/Branch_4_0/testsuite/src/resources/scoped/a/ejb/META-INF/jboss.xml
===================================================================
--- branches/Branch_4_0/testsuite/src/resources/scoped/a/ejb/META-INF/jboss.xml	2006-12-11 16:10:29 UTC (rev 58975)
+++ branches/Branch_4_0/testsuite/src/resources/scoped/a/ejb/META-INF/jboss.xml	2006-12-11 19:19:48 UTC (rev 58976)
@@ -0,0 +1,76 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<jboss>
+   <enterprise-beans>
+      <session>
+         <ejb-name>SessionA</ejb-name>
+         <configuration-name>Pooled Stateless SessionBean</configuration-name>
+         <invoker-bindings>
+            <invoker>
+               <invoker-proxy-binding-name>stateless-pooled-invoker</invoker-proxy-binding-name>
+               <jndi-name>SessionA</jndi-name>
+            </invoker>
+         </invoker-bindings>
+      </session>
+   </enterprise-beans>
+
+   <invoker-proxy-bindings>
+      <!--<invoker-proxy-binding>-->
+         <!--<name>stateless-pooled-invoker</name>-->
+         <!--<invoker-mbean>jboss:service=invoker,type=pooled</invoker-mbean>-->
+         <!--<proxy-factory>org.jboss.proxy.ejb.ProxyFactory</proxy-factory>-->
+         <!--<proxy-factory-config>-->
+            <!--<client-interceptors>-->
+               <!--<home>-->
+                  <!--<interceptor>org.jboss.proxy.ejb.HomeInterceptor</interceptor>-->
+                  <!--<interceptor>org.jboss.proxy.SecurityInterceptor</interceptor>-->
+                  <!--<interceptor>org.jboss.proxy.TransactionInterceptor</interceptor>-->
+                  <!--<interceptor>org.jboss.invocation.InvokerInterceptor</interceptor>-->
+               <!--</home>-->
+               <!--<bean>-->
+                  <!--<interceptor>org.jboss.proxy.ejb.StatelessSessionInterceptor</interceptor>-->
+                  <!--<interceptor>org.jboss.proxy.SecurityInterceptor</interceptor>-->
+                  <!--<interceptor>org.jboss.proxy.TransactionInterceptor</interceptor>-->
+                  <!--<interceptor>org.jboss.invocation.InvokerInterceptor</interceptor>-->
+               <!--</bean>-->
+            <!--</client-interceptors>-->
+         <!--</proxy-factory-config>-->
+      <!--</invoker-proxy-binding>-->
+
+      <invoker-proxy-binding>
+        <name>stateless-pooled-invoker</name>
+        <invoker-mbean>jboss:service=invoker,type=pooled</invoker-mbean>
+        <proxy-factory>org.jboss.proxy.ejb.ProxyFactory</proxy-factory>
+        <proxy-factory-config>
+          <client-interceptors>
+            <home>
+              <interceptor>org.jboss.proxy.ejb.HomeInterceptor</interceptor>
+              <interceptor>org.jboss.proxy.SecurityInterceptor</interceptor>
+              <interceptor>org.jboss.proxy.TransactionInterceptor</interceptor>
+               <interceptor>org.jboss.invocation.InvokerInterceptor</interceptor>
+              <!--<interceptor call-by-value="false">org.jboss.invocation.InvokerInterceptor</interceptor>-->
+              <!--<interceptor call-by-value="true">org.jboss.invocation.MarshallingInvokerInterceptor</interceptor>-->
+            </home>
+            <bean>
+              <interceptor>org.jboss.proxy.ejb.StatelessSessionInterceptor</interceptor>
+              <interceptor>org.jboss.proxy.SecurityInterceptor</interceptor>
+              <interceptor>org.jboss.proxy.TransactionInterceptor</interceptor>
+               <interceptor>org.jboss.invocation.InvokerInterceptor</interceptor>
+              <!--<interceptor call-by-value="false">org.jboss.invocation.InvokerInterceptor</interceptor>-->
+              <!--<interceptor call-by-value="true">org.jboss.invocation.MarshallingInvokerInterceptor</interceptor>-->
+            </bean>
+          </client-interceptors>
+        </proxy-factory-config>
+      </invoker-proxy-binding>
+
+   </invoker-proxy-bindings>
+
+   <container-configurations>
+     <container-configuration extends="Standard Stateless SessionBean">
+        <container-name>Pooled Stateless SessionBean</container-name>
+        <invoker-proxy-binding-name>stateless-pooled-invoker</invoker-proxy-binding-name>
+     </container-configuration>
+   </container-configurations>
+
+
+</jboss>

Added: branches/Branch_4_0/testsuite/src/resources/scoped/b/ear/META-INF/application.xml
===================================================================
--- branches/Branch_4_0/testsuite/src/resources/scoped/b/ear/META-INF/application.xml	2006-12-11 16:10:29 UTC (rev 58975)
+++ branches/Branch_4_0/testsuite/src/resources/scoped/b/ear/META-INF/application.xml	2006-12-11 19:19:48 UTC (rev 58976)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<application>
+    <display-name>scopedB</display-name>
+	<module>
+		<ejb>scopedB.jar</ejb>
+	</module>
+</application>
+

Added: branches/Branch_4_0/testsuite/src/resources/scoped/b/ear/META-INF/jboss-app.xml
===================================================================
--- branches/Branch_4_0/testsuite/src/resources/scoped/b/ear/META-INF/jboss-app.xml	2006-12-11 16:10:29 UTC (rev 58975)
+++ branches/Branch_4_0/testsuite/src/resources/scoped/b/ear/META-INF/jboss-app.xml	2006-12-11 19:19:48 UTC (rev 58976)
@@ -0,0 +1,5 @@
+<jboss-app>
+   <loader-repository>jboss.test:loader=sessionB.ear
+      <loader-repository-config>java2ParentDelegation=false</loader-repository-config>
+   </loader-repository>
+</jboss-app>
\ No newline at end of file

Added: branches/Branch_4_0/testsuite/src/resources/scoped/b/ejb/META-INF/ejb-jar.xml
===================================================================
--- branches/Branch_4_0/testsuite/src/resources/scoped/b/ejb/META-INF/ejb-jar.xml	2006-12-11 16:10:29 UTC (rev 58975)
+++ branches/Branch_4_0/testsuite/src/resources/scoped/b/ejb/META-INF/ejb-jar.xml	2006-12-11 19:19:48 UTC (rev 58976)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE ejb-jar PUBLIC
+   "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN"
+   "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
+
+<ejb-jar>
+   <enterprise-beans>
+      <session>
+         <ejb-name>SessionB</ejb-name>
+         <home>org.jboss.test.scoped.interfaces.b.SessionBHome</home>
+         <remote>org.jboss.test.scoped.interfaces.b.SessionB</remote>
+         <ejb-class>org.jboss.test.scoped.ejb.b.SessionBEJB</ejb-class>
+         <session-type>Stateless</session-type>
+         <transaction-type>Container</transaction-type>
+      </session>
+   </enterprise-beans>
+</ejb-jar>

Added: branches/Branch_4_0/testsuite/src/resources/scoped/b/ejb/META-INF/jboss.xml
===================================================================
--- branches/Branch_4_0/testsuite/src/resources/scoped/b/ejb/META-INF/jboss.xml	2006-12-11 16:10:29 UTC (rev 58975)
+++ branches/Branch_4_0/testsuite/src/resources/scoped/b/ejb/META-INF/jboss.xml	2006-12-11 19:19:48 UTC (rev 58976)
@@ -0,0 +1,76 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<jboss>
+   <enterprise-beans>
+      <session>
+         <ejb-name>SessionB</ejb-name>
+         <configuration-name>Pooled Stateless SessionBean</configuration-name>
+         <invoker-bindings>
+            <invoker>
+               <invoker-proxy-binding-name>stateless-pooled-invoker</invoker-proxy-binding-name>
+               <jndi-name>SessionB</jndi-name>
+            </invoker>
+         </invoker-bindings>
+      </session>
+   </enterprise-beans>
+
+   <invoker-proxy-bindings>
+      <!--<invoker-proxy-binding>-->
+         <!--<name>stateless-pooled-invoker</name>-->
+         <!--<invoker-mbean>jboss:service=invoker,type=pooled</invoker-mbean>-->
+         <!--<proxy-factory>org.jboss.proxy.ejb.ProxyFactory</proxy-factory>-->
+         <!--<proxy-factory-config>-->
+            <!--<client-interceptors>-->
+               <!--<home>-->
+                  <!--<interceptor>org.jboss.proxy.ejb.HomeInterceptor</interceptor>-->
+                  <!--<interceptor>org.jboss.proxy.SecurityInterceptor</interceptor>-->
+                  <!--<interceptor>org.jboss.proxy.TransactionInterceptor</interceptor>-->
+                  <!--<interceptor>org.jboss.invocation.InvokerInterceptor</interceptor>-->
+               <!--</home>-->
+               <!--<bean>-->
+                  <!--<interceptor>org.jboss.proxy.ejb.StatelessSessionInterceptor</interceptor>-->
+                  <!--<interceptor>org.jboss.proxy.SecurityInterceptor</interceptor>-->
+                  <!--<interceptor>org.jboss.proxy.TransactionInterceptor</interceptor>-->
+                  <!--<interceptor>org.jboss.invocation.InvokerInterceptor</interceptor>-->
+               <!--</bean>-->
+            <!--</client-interceptors>-->
+         <!--</proxy-factory-config>-->
+      <!--</invoker-proxy-binding>-->
+
+      <invoker-proxy-binding>
+        <name>stateless-pooled-invoker</name>
+        <invoker-mbean>jboss:service=invoker,type=pooled</invoker-mbean>
+        <proxy-factory>org.jboss.proxy.ejb.ProxyFactory</proxy-factory>
+        <proxy-factory-config>
+          <client-interceptors>
+            <home>
+              <interceptor>org.jboss.proxy.ejb.HomeInterceptor</interceptor>
+              <interceptor>org.jboss.proxy.SecurityInterceptor</interceptor>
+              <interceptor>org.jboss.proxy.TransactionInterceptor</interceptor>
+               <interceptor>org.jboss.invocation.InvokerInterceptor</interceptor>
+              <!--<interceptor call-by-value="false">org.jboss.invocation.InvokerInterceptor</interceptor>-->
+              <!--<interceptor call-by-value="true">org.jboss.invocation.MarshallingInvokerInterceptor</interceptor>-->
+            </home>
+            <bean>
+              <interceptor>org.jboss.proxy.ejb.StatelessSessionInterceptor</interceptor>
+              <interceptor>org.jboss.proxy.SecurityInterceptor</interceptor>
+              <interceptor>org.jboss.proxy.TransactionInterceptor</interceptor>
+               <interceptor>org.jboss.invocation.InvokerInterceptor</interceptor>
+              <!--<interceptor call-by-value="false">org.jboss.invocation.InvokerInterceptor</interceptor>-->
+              <!--<interceptor call-by-value="true">org.jboss.invocation.MarshallingInvokerInterceptor</interceptor>-->
+            </bean>
+          </client-interceptors>
+        </proxy-factory-config>
+      </invoker-proxy-binding>
+
+   </invoker-proxy-bindings>
+
+   <container-configurations>
+     <container-configuration extends="Standard Stateless SessionBean">
+        <container-name>Pooled Stateless SessionBean</container-name>
+        <invoker-proxy-binding-name>stateless-pooled-invoker</invoker-proxy-binding-name>
+     </container-configuration>
+   </container-configurations>
+
+
+</jboss>




More information about the jboss-cvs-commits mailing list