[jboss-cvs] JBossAS SVN: r72001 - in projects/ejb3/trunk: core/.settings and 41 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Fri Apr 11 04:04:38 EDT 2008


Author: ALRubinger
Date: 2008-04-11 04:04:37 -0400 (Fri, 11 Apr 2008)
New Revision: 72001

Added:
   projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/session/ProxyAccessType.java
   projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/session/SessionContextDelegateBase.java
   projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/session/SessionSpecBeanContext.java
   projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/session/SessionSpecContainer.java
   projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/stateful/BaseStatefulRemoteProxyFactory.java
   projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/stateful/StatefulHandleRemoteImpl.java
   projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/stateful/StatefulSessionContextDelegate.java
   projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/stateless/BaseStatelessRemoteProxyFactory.java
   projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/stateless/StatelessHandleRemoteImpl.java
   projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/stateless/StatelessSessionContextDelegate.java
   projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/stateless/StatelessSessionContextImpl.java
Removed:
   projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/session/SessionContextImpl.java
   projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/stateful/StatefulHandleImpl.java
   projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/stateless/StatelessHandleImpl.java
Modified:
   projects/ejb3/trunk/core/.classpath
   projects/ejb3/trunk/core/.settings/org.eclipse.jdt.core.prefs
   projects/ejb3/trunk/core/build-test.xml
   projects/ejb3/trunk/core/jboss-ejb3-client.xml
   projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/BaseContext.java
   projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/ContainerDelegateWrapper.java
   projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/ContainerDelegateWrapperMBean.java
   projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/JndiProxyFactory.java
   projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/ProxyFactory.java
   projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/ProxyFactoryHelper.java
   projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/cache/NoPassivationCache.java
   projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/cache/StatefulCache.java
   projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/cache/simple/SimpleStatefulCache.java
   projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/cache/tree/StatefulTreeCache.java
   projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/dependency/EjbLinkDemandMetaData.java
   projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/javaee/AbstractJavaEEComponent.java
   projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/javaee/JavaEEApplication.java
   projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/javaee/JavaEEComponent.java
   projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/javaee/JavaEEComponentHelper.java
   projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/javaee/JavaEEModule.java
   projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/javaee/SimpleJavaEEApplication.java
   projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/kernel/JNDIKernelRegistryPlugin.java
   projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/mdb/LocalProducerFactory.java
   projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/mdb/MessageDrivenContextImpl.java
   projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/mdb/MessagingDelegateWrapper.java
   projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/mdb/ProducerFactory.java
   projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/mdb/RemoteProducerFactory.java
   projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/metadata/JBossMessageDrivenBeanGenericWrapper.java
   projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/metadata/jpa/spec/PersistenceUnitMetaData.java
   projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/metadata/jpa/spec/PersistenceUnitsMetaData.java
   projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/protocol/jarjar/Handler.java
   projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/protocol/jarjar/JarJarInputStream.java
   projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/protocol/jarjar/JarJarURLConnection.java
   projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/service/BaseServiceProxyFactory.java
   projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/service/ServiceBeanContext.java
   projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/service/ServiceContainer.java
   projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/service/ServiceDelegateWrapper.java
   projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/service/ServiceLocalProxyFactory.java
   projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/service/ServiceRemoteProxyFactory.java
   projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/session/BaseSessionProxyFactory.java
   projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/session/BaseSessionRemoteProxy.java
   projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/session/ProxyDeployer.java
   projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/session/SessionBeanContext.java
   projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/session/SessionContainer.java
   projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/stateful/BaseStatefulProxyFactory.java
   projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/stateful/NestedStatefulBeanContext.java
   projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/stateful/ProxiedStatefulBeanContext.java
   projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/stateful/StatefulBeanContext.java
   projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/stateful/StatefulClusterProxyFactory.java
   projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/stateful/StatefulContainer.java
   projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/stateful/StatefulHomeRemoteProxy.java
   projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/stateful/StatefulLocalProxyFactory.java
   projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/stateful/StatefulRemoteProxy.java
   projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/stateful/StatefulRemoteProxyFactory.java
   projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/stateful/StatefulSessionContextImpl.java
   projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/stateless/BaseStatelessProxyFactory.java
   projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/stateless/StatelessBeanContext.java
   projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/stateless/StatelessClusterProxyFactory.java
   projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/stateless/StatelessContainer.java
   projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/stateless/StatelessLocalProxyFactory.java
   projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/stateless/StatelessRemoteProxyFactory.java
   projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/util/Debugger.java
   projects/ejb3/trunk/core/src/main/java/org/jboss/injection/InjectorFactory.java
   projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/bank/TellerRemoteProxyFactory.java
   projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1025/OrderService.java
   projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1025/OrderServiceBean.java
   projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1060/CommonRemote.java
   projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1060/InvokedBusinessInterfaceBean.java
   projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1060/Remote1.java
   projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1060/Remote2.java
   projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1060/TestFailedException.java
   projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1060/Tester.java
   projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1060/TesterBean.java
   projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1060/unit/InvokedBusinessInterfaceUnitTestCase.java
   projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1062/Calculator.java
   projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1062/CalculatorBean.java
   projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1062/CommonBase.java
   projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1062/CommonInterface.java
   projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1062/MyStatelessBean.java
   projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1062/MyStatelessLocal.java
   projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1062/SuperBean.java
   projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1062/SuperInterface.java
   projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1066/Adder.java
   projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1066/CalculatorBean.java
   projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1066/Subtractor.java
   projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1122/unit/MultipleDefinitionsOfSameBusinessInterfaceUnitTestCase.java
   projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree471/A.java
   projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree471/ABean.java
   projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree471/B.java
   projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree471/BBean.java
   projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree471/Client.java
   projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree471/Intercept.java
   projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree471/unit/SuperInterceptUnitTestCase.java
   projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree786/Remove.java
   projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree959/Status.java
   projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree959/StatusBean.java
   projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree973/SpyMe.java
   projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree973/WhoAmI.java
   projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree985/OptionalEnvEntry.java
   projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree985/OptionalEnvEntryBean.java
   projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree986/Foo.java
   projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree986/FooBean.java
   projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree989/ResUrlChecker.java
   projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree989/ResUrlCheckerBean.java
   projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/interceptormetadata/MockDependencyPolicy.java
   projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/reference21_30/HomedStatefulSession30Bean.java
   projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/reference21_30/Session21Bean.java
   projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/reference21_30/Session30Bean.java
   projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/reference21_30/Test2Bean.java
   projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/reference21_30/unit/EarTestCase.java
   projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/reference21_30/unit/ReferenceTestCase.java
   projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/stateful/Stateful21.java
   projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/stateful/StatefulRemoteProxyFactory.java
   projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/statefulproxyfactoryoverride/StatefulRemoteProxyFactory.java
   projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/strictpool/unit/MDBCallable.java
   projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/threadlocal/MockBean.java
   projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/threadlocal/MockBeanContext.java
   projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/xpcalt/Inspector.java
   projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/xpcalt/InspectorBean.java
   projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/xpcalt/Keeper.java
   projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/xpcalt/LowEnd.java
   projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/xpcalt/Master.java
   projects/ejb3/trunk/plugin/pom.xml
Log:
[EJBTHREE-1253] Merged back to trunk, completed

Modified: projects/ejb3/trunk/core/.classpath
===================================================================
--- projects/ejb3/trunk/core/.classpath	2008-04-11 07:12:16 UTC (rev 72000)
+++ projects/ejb3/trunk/core/.classpath	2008-04-11 08:04:37 UTC (rev 72001)
@@ -5,47 +5,48 @@
   <classpathentry kind="src" path="src/test/resources" output="target/tests-classes" excluding="**/*.java"/>
   <classpathentry kind="output" path="target/classes"/>
   <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
-  <classpathentry kind="var" path="M2_REPO/javax/activation/activation/1.0.2/activation-1.0.2.jar"/>
-  <classpathentry kind="var" path="M2_REPO/ant/ant/1.6.5/ant-1.6.5.jar"/>
+  <classpathentry kind="var" path="M2_REPO/javax/activation/activation/1.1/activation-1.1.jar" sourcepath="M2_REPO/javax/activation/activation/1.1/activation-1.1-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/ant/ant/1.6.5/ant-1.6.5.jar" sourcepath="M2_REPO/ant/ant/1.6.5/ant-1.6.5-sources.jar"/>
   <classpathentry kind="var" path="M2_REPO/org/apache/ant/ant/1.7.0/ant-1.7.0.jar"/>
   <classpathentry kind="var" path="M2_REPO/org/apache/ant/ant-junit/1.7.0/ant-junit-1.7.0.jar"/>
   <classpathentry kind="var" path="M2_REPO/org/apache/ant/ant-launcher/1.7.0/ant-launcher-1.7.0.jar"/>
-  <classpathentry kind="var" path="M2_REPO/antlr/antlr/2.7.6/antlr-2.7.6.jar"/>
+  <classpathentry kind="var" path="M2_REPO/antlr/antlr/2.7.6/antlr-2.7.6.jar" sourcepath="M2_REPO/antlr/antlr/2.7.6/antlr-2.7.6-sources.jar"/>
   <classpathentry kind="var" path="M2_REPO/asm/asm/1.5.3/asm-1.5.3.jar"/>
   <classpathentry kind="var" path="M2_REPO/asm/asm-attrs/1.5.3/asm-attrs-1.5.3.jar"/>
-  <classpathentry kind="var" path="M2_REPO/org/jboss/security/authorization-spi/2.0.2.Beta5/authorization-spi-2.0.2.Beta5.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/security/authorization-spi/2.0.2.Beta5/authorization-spi-2.0.2.Beta5.jar" sourcepath="M2_REPO/org/jboss/security/authorization-spi/2.0.2.Beta5/authorization-spi-2.0.2.Beta5-sources.jar"/>
   <classpathentry kind="var" path="M2_REPO/apache-avalon/avalon-framework/4.1.5/avalon-framework-4.1.5.jar"/>
-  <classpathentry kind="var" path="M2_REPO/bcel/bcel/5.1/bcel-5.1.jar"/>
+  <classpathentry kind="var" path="M2_REPO/bcel/bcel/5.1/bcel-5.1.jar" sourcepath="M2_REPO/bcel/bcel/5.1/bcel-5.1-sources.jar"/>
   <classpathentry kind="var" path="M2_REPO/bsh/bsh/1.3.0/bsh-1.3.0.jar"/>
-  <classpathentry kind="var" path="M2_REPO/cglib/cglib/2.1_3/cglib-2.1_3.jar"/>
-  <classpathentry kind="var" path="M2_REPO/commons-collections/commons-collections/2.1.1/commons-collections-2.1.1.jar"/>
+  <classpathentry kind="var" path="M2_REPO/cglib/cglib/2.1_3/cglib-2.1_3.jar" sourcepath="M2_REPO/cglib/cglib/2.1_3/cglib-2.1_3-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/commons-collections/commons-collections/2.1.1/commons-collections-2.1.1.jar" sourcepath="M2_REPO/commons-collections/commons-collections/2.1.1/commons-collections-2.1.1-sources.jar"/>
   <classpathentry kind="var" path="M2_REPO/apache-httpclient/commons-httpclient/2.0.2/commons-httpclient-2.0.2.jar"/>
-  <classpathentry kind="var" path="M2_REPO/commons-logging/commons-logging/1.0.4/commons-logging-1.0.4.jar"/>
-  <classpathentry kind="var" path="M2_REPO/oswego-concurrent/concurrent/1.3.4-jboss-update1/concurrent-1.3.4-jboss-update1.jar"/>
-  <classpathentry kind="var" path="M2_REPO/dom4j/dom4j/1.6.1/dom4j-1.6.1.jar"/>
+  <classpathentry kind="var" path="M2_REPO/commons-logging/commons-logging/1.0.4/commons-logging-1.0.4.jar" sourcepath="M2_REPO/commons-logging/commons-logging/1.0.4/commons-logging-1.0.4-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/oswego-concurrent/concurrent/1.3.4-jboss-update1/concurrent-1.3.4-jboss-update1.jar" sourcepath="M2_REPO/oswego-concurrent/concurrent/1.3.4-jboss-update1/concurrent-1.3.4-jboss-update1-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/dom4j/dom4j/1.6.1/dom4j-1.6.1.jar" sourcepath="M2_REPO/dom4j/dom4j/1.6.1/dom4j-1.6.1-sources.jar"/>
   <classpathentry kind="var" path="M2_REPO/wutka-dtdparser/dtdparser121/1.2.1/dtdparser121-1.2.1.jar"/>
-  <classpathentry kind="var" path="M2_REPO/net/sf/ehcache/ehcache/1.2.3/ehcache-1.2.3.jar"/>
+  <classpathentry kind="var" path="M2_REPO/net/sf/ehcache/ehcache/1.2.3/ehcache-1.2.3.jar" sourcepath="M2_REPO/net/sf/ehcache/ehcache/1.2.3/ehcache-1.2.3-sources.jar"/>
   <classpathentry kind="var" path="M2_REPO/org/hibernate/ejb3-persistence/1.0.1.GA/ejb3-persistence-1.0.1.GA.jar"/>
-  <classpathentry kind="var" path="M2_REPO/org/hibernate/hibernate/3.2.6.ga/hibernate-3.2.6.ga.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/hibernate/hibernate/3.2.6.ga/hibernate-3.2.6.ga.jar" sourcepath="M2_REPO/org/hibernate/hibernate/3.2.6.ga/hibernate-3.2.6.ga-sources.jar"/>
   <classpathentry kind="var" path="M2_REPO/org/hibernate/hibernate-annotations/3.3.1.GA/hibernate-annotations-3.3.1.GA.jar"/>
   <classpathentry kind="var" path="M2_REPO/org/hibernate/hibernate-commons-annotations/3.0.0.ga/hibernate-commons-annotations-3.0.0.ga.jar"/>
   <classpathentry kind="var" path="M2_REPO/org/hibernate/hibernate-entitymanager/3.3.2.GA/hibernate-entitymanager-3.3.2.GA.jar"/>
   <classpathentry kind="var" path="M2_REPO/hsqldb/hsqldb/1.8.0.7/hsqldb-1.8.0.7.jar"/>
-  <classpathentry kind="var" path="M2_REPO/org/jboss/security/identity-impl/2.0.2.Beta5/identity-impl-2.0.2.Beta5.jar"/>
-  <classpathentry kind="var" path="M2_REPO/org/jboss/security/identity-spi/2.0.2.Beta5/identity-spi-2.0.2.Beta5.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/security/identity-impl/2.0.2.Beta5/identity-impl-2.0.2.Beta5.jar" sourcepath="M2_REPO/org/jboss/security/identity-impl/2.0.2.Beta5/identity-impl-2.0.2.Beta5-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/security/identity-spi/2.0.2.Beta5/identity-spi-2.0.2.Beta5.jar" sourcepath="M2_REPO/org/jboss/security/identity-spi/2.0.2.Beta5/identity-spi-2.0.2.Beta5-sources.jar"/>
   <classpathentry kind="var" path="M2_REPO/javax/security/jaas/1.0.01/jaas-1.0.01.jar"/>
+  <classpathentry kind="var" path="M2_REPO/javax/security/jacc/1.0/jacc-1.0.jar"/>
   <classpathentry kind="var" path="M2_REPO/jacorb/jacorb/2.3.0jboss.patch5-brew/jacorb-2.3.0jboss.patch5-brew.jar"/>
   <classpathentry kind="var" path="M2_REPO/urbanophile/java-getopt/1.0.9/java-getopt-1.0.9.jar"/>
   <classpathentry kind="var" path="M2_REPO/javassist/javassist/3.4.GA/javassist-3.4.GA.jar"/>
-  <classpathentry kind="var" path="M2_REPO/org/jboss/javassist/3.6.0.GA/javassist-3.6.0.GA.jar"/>
-  <classpathentry kind="var" path="M2_REPO/javax/xml/bind/jaxb-api/2.0/jaxb-api-2.0.jar"/>
-  <classpathentry kind="var" path="M2_REPO/sun-jaxb/jaxb-api/2.0.5/jaxb-api-2.0.5.jar"/>
-  <classpathentry kind="var" path="M2_REPO/org/jboss/aop/jboss-aop/2.0.0.CR7/jboss-aop-2.0.0.CR7.jar"/>
-  <classpathentry kind="var" path="M2_REPO/org/jboss/aop/jboss-aop-aspects/2.0.0.CR7/jboss-aop-aspects-2.0.0.CR7.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/javassist/3.6.0.GA/javassist-3.6.0.GA.jar" sourcepath="M2_REPO/org/jboss/javassist/3.6.0.GA/javassist-3.6.0.GA-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/javax/xml/bind/jaxb-api/2.1/jaxb-api-2.1.jar" sourcepath="M2_REPO/javax/xml/bind/jaxb-api/2.1/jaxb-api-2.1-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/sun-jaxb/jaxb-api/2.1.4/jaxb-api-2.1.4.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/aop/jboss-aop/2.0.0.CR7/jboss-aop-2.0.0.CR7.jar" sourcepath="M2_REPO/org/jboss/aop/jboss-aop/2.0.0.CR7/jboss-aop-2.0.0.CR7-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/aop/jboss-aop-aspects/2.0.0.CR7/jboss-aop-aspects-2.0.0.CR7.jar" sourcepath="M2_REPO/org/jboss/aop/jboss-aop-aspects/2.0.0.CR7/jboss-aop-aspects-2.0.0.CR7-sources.jar"/>
   <classpathentry kind="var" path="M2_REPO/jboss/aop/jboss-aop-deployer-jdk50/2.0.0.CR8/jboss-aop-deployer-jdk50-2.0.0.CR8.jar"/>
   <classpathentry kind="var" path="M2_REPO/jboss/aop/jboss-aop-jboss4-jdk50/2.0.0.CR8/jboss-aop-jboss4-jdk50-2.0.0.CR8.jar"/>
   <classpathentry kind="var" path="M2_REPO/jboss/aop/jboss-aop-jdk50/2.0.0.CR8/jboss-aop-jdk50-2.0.0.CR8.jar"/>
-  <classpathentry kind="var" path="M2_REPO/org/jboss/microcontainer/jboss-aop-mc-int/2.0.0.Beta11/jboss-aop-mc-int-2.0.0.Beta11.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/microcontainer/jboss-aop-mc-int/2.0.0.Beta13/jboss-aop-mc-int-2.0.0.Beta13.jar"/>
   <classpathentry kind="var" path="M2_REPO/org/jboss/jbossas/jboss-as-aspects/5.0.0-SNAPSHOT/jboss-as-aspects-5.0.0-SNAPSHOT.jar"/>
   <classpathentry kind="var" path="M2_REPO/org/jboss/jbossas/jboss-as-bootstrap/5.0.0-SNAPSHOT/jboss-as-bootstrap-5.0.0-SNAPSHOT.jar"/>
   <classpathentry kind="var" path="M2_REPO/org/jboss/jbossas/jboss-as-connector/5.0.0-SNAPSHOT/jboss-as-connector-5.0.0-SNAPSHOT.jar"/>
@@ -55,90 +56,97 @@
   <classpathentry kind="var" path="M2_REPO/org/jboss/jbossas/jboss-as-jmx/5.0.0-SNAPSHOT/jboss-as-jmx-5.0.0-SNAPSHOT.jar"/>
   <classpathentry kind="var" path="M2_REPO/org/jboss/jbossas/jboss-as-main/5.0.0-SNAPSHOT/jboss-as-main-5.0.0-SNAPSHOT.jar"/>
   <classpathentry kind="var" path="M2_REPO/org/jboss/jbossas/jboss-as-mbeans/5.0.0-SNAPSHOT/jboss-as-mbeans-5.0.0-SNAPSHOT.jar"/>
-  <classpathentry kind="var" path="M2_REPO/org/jboss/jbossas/jboss-as-naming/5.0.0-SNAPSHOT/jboss-as-naming-5.0.0-SNAPSHOT.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/jbossas/jboss-as-naming/5.0.0-SNAPSHOT/jboss-as-naming-5.0.0-SNAPSHOT.jar" sourcepath="M2_REPO/org/jboss/jbossas/jboss-as-naming/5.0.0-SNAPSHOT/jboss-as-naming-5.0.0-SNAPSHOT-sources.jar"/>
   <classpathentry kind="var" path="M2_REPO/org/jboss/jbossas/jboss-as-profileservice/5.0.0-SNAPSHOT/jboss-as-profileservice-5.0.0-SNAPSHOT.jar"/>
   <classpathentry kind="var" path="M2_REPO/org/jboss/jbossas/jboss-as-security/5.0.0-SNAPSHOT/jboss-as-security-5.0.0-SNAPSHOT.jar"/>
   <classpathentry kind="var" path="M2_REPO/org/jboss/jbossas/jboss-as-server/5.0.0-SNAPSHOT/jboss-as-server-5.0.0-SNAPSHOT.jar"/>
   <classpathentry kind="var" path="M2_REPO/org/jboss/jbossas/jboss-as-server/5.0.0-SNAPSHOT/jboss-as-server-5.0.0-SNAPSHOT-client.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/jbossas/jboss-as-server-manager/0.1.0-SNAPSHOT/jboss-as-server-manager-0.1.0-SNAPSHOT.jar" sourcepath="M2_REPO/org/jboss/jbossas/jboss-as-server-manager/0.1.0-SNAPSHOT/jboss-as-server-manager-0.1.0-SNAPSHOT-sources.jar"/>
   <classpathentry kind="var" path="M2_REPO/org/jboss/jbossas/jboss-as-system/5.0.0-SNAPSHOT/jboss-as-system-5.0.0-SNAPSHOT.jar"/>
   <classpathentry kind="var" path="M2_REPO/org/jboss/jbossas/jboss-as-system-jmx/5.0.0-SNAPSHOT/jboss-as-system-jmx-5.0.0-SNAPSHOT.jar"/>
-  <classpathentry kind="var" path="M2_REPO/org/jboss/cl/jboss-classloader/2.0.0.Beta11/jboss-classloader-2.0.0.Beta11.jar"/>
-  <classpathentry kind="var" path="M2_REPO/org/jboss/cl/jboss-classloading/2.0.0.Beta11/jboss-classloading-2.0.0.Beta11.jar"/>
-  <classpathentry kind="var" path="M2_REPO/org/jboss/jboss-classloading-spi/5.0.0.Beta4/jboss-classloading-spi-5.0.0.Beta4.jar"/>
-  <classpathentry kind="var" path="M2_REPO/org/jboss/cl/jboss-classloading-vfs/2.0.0.Beta11/jboss-classloading-vfs-2.0.0.Beta11.jar"/>
-  <classpathentry kind="var" path="M2_REPO/jboss/jboss-common-core/2.0.2.GA/jboss-common-core-2.0.2.GA.jar"/>
-  <classpathentry kind="var" path="M2_REPO/org/jboss/jboss-common-core/2.2.4.GA/jboss-common-core-2.2.4.GA.jar"/>
-  <classpathentry kind="var" path="M2_REPO/jboss/jboss-common-logging-log4j/2.0.4.GA/jboss-common-logging-log4j-2.0.4.GA.jar"/>
-  <classpathentry kind="var" path="M2_REPO/jboss/jboss-common-logging-spi/2.0.4.GA/jboss-common-logging-spi-2.0.4.GA.jar"/>
-  <classpathentry kind="var" path="M2_REPO/org/jboss/microcontainer/jboss-container/2.0.0.Beta9/jboss-container-2.0.0.Beta9.jar"/>
-  <classpathentry kind="var" path="M2_REPO/org/jboss/jboss-corba-ots-spi/5.0.0.Beta4/jboss-corba-ots-spi-5.0.0.Beta4.jar"/>
-  <classpathentry kind="var" path="M2_REPO/org/jboss/microcontainer/jboss-dependency/2.0.0.Beta9/jboss-dependency-2.0.0.Beta9.jar"/>
-  <classpathentry kind="var" path="M2_REPO/org/jboss/deployers/jboss-deployers-client/2.0.0.Beta11/jboss-deployers-client-2.0.0.Beta11.jar"/>
-  <classpathentry kind="var" path="M2_REPO/org/jboss/deployers/jboss-deployers-client-spi/2.0.0.Beta11/jboss-deployers-client-spi-2.0.0.Beta11.jar"/>
-  <classpathentry kind="var" path="M2_REPO/org/jboss/microcontainer/jboss-deployers-client-spi/2.0.0.Beta6/jboss-deployers-client-spi-2.0.0.Beta6.jar"/>
-  <classpathentry kind="var" path="M2_REPO/org/jboss/deployers/jboss-deployers-core/2.0.0.Beta11/jboss-deployers-core-2.0.0.Beta11.jar"/>
-  <classpathentry kind="var" path="M2_REPO/org/jboss/deployers/jboss-deployers-core-spi/2.0.0.Beta11/jboss-deployers-core-spi-2.0.0.Beta11.jar"/>
-  <classpathentry kind="var" path="M2_REPO/org/jboss/microcontainer/jboss-deployers-core-spi/2.0.0.Beta9/jboss-deployers-core-spi-2.0.0.Beta9.jar"/>
-  <classpathentry kind="var" path="M2_REPO/org/jboss/deployers/jboss-deployers-impl/2.0.0.Beta11/jboss-deployers-impl-2.0.0.Beta11.jar"/>
-  <classpathentry kind="var" path="M2_REPO/org/jboss/deployers/jboss-deployers-spi/2.0.0.Beta11/jboss-deployers-spi-2.0.0.Beta11.jar"/>
-  <classpathentry kind="var" path="M2_REPO/org/jboss/deployers/jboss-deployers-structure-spi/2.0.0.Beta11/jboss-deployers-structure-spi-2.0.0.Beta11.jar"/>
-  <classpathentry kind="var" path="M2_REPO/org/jboss/deployers/jboss-deployers-vfs/2.0.0.Beta11/jboss-deployers-vfs-2.0.0.Beta11.jar"/>
-  <classpathentry kind="var" path="M2_REPO/org/jboss/deployers/jboss-deployers-vfs-spi/2.0.0.Beta11/jboss-deployers-vfs-spi-2.0.0.Beta11.jar"/>
-  <classpathentry kind="var" path="M2_REPO/org/jboss/javaee/jboss-ejb-api/3.0.0.Beta3Update1/jboss-ejb-api-3.0.0.Beta3Update1.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/cl/jboss-classloader/2.0.0.Beta11/jboss-classloader-2.0.0.Beta11.jar" sourcepath="M2_REPO/org/jboss/cl/jboss-classloader/2.0.0.Beta11/jboss-classloader-2.0.0.Beta11-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/cl/jboss-classloading/2.0.0.Beta11/jboss-classloading-2.0.0.Beta11.jar" sourcepath="M2_REPO/org/jboss/cl/jboss-classloading/2.0.0.Beta11/jboss-classloading-2.0.0.Beta11-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/jboss-classloading-spi/5.0.0.Beta4/jboss-classloading-spi-5.0.0.Beta4.jar" sourcepath="M2_REPO/org/jboss/jboss-classloading-spi/5.0.0.Beta4/jboss-classloading-spi-5.0.0.Beta4-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/cl/jboss-classloading-vfs/2.0.0.Beta11/jboss-classloading-vfs-2.0.0.Beta11.jar" sourcepath="M2_REPO/org/jboss/cl/jboss-classloading-vfs/2.0.0.Beta11/jboss-classloading-vfs-2.0.0.Beta11-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/jboss/jboss-common-core/2.0.2.GA/jboss-common-core-2.0.2.GA.jar" sourcepath="M2_REPO/jboss/jboss-common-core/2.0.2.GA/jboss-common-core-2.0.2.GA-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/jboss-common-core/2.2.5.GA/jboss-common-core-2.2.5.GA.jar" sourcepath="M2_REPO/org/jboss/jboss-common-core/2.2.5.GA/jboss-common-core-2.2.5.GA-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/jboss/jboss-common-logging-log4j/2.0.4.GA/jboss-common-logging-log4j-2.0.4.GA.jar" sourcepath="M2_REPO/jboss/jboss-common-logging-log4j/2.0.4.GA/jboss-common-logging-log4j-2.0.4.GA-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/jboss/jboss-common-logging-spi/2.0.4.GA/jboss-common-logging-spi-2.0.4.GA.jar" sourcepath="M2_REPO/jboss/jboss-common-logging-spi/2.0.4.GA/jboss-common-logging-spi-2.0.4.GA-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/microcontainer/jboss-container/2.0.0.Beta9/jboss-container-2.0.0.Beta9.jar" sourcepath="M2_REPO/org/jboss/microcontainer/jboss-container/2.0.0.Beta9/jboss-container-2.0.0.Beta9-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/jboss-corba-ots-spi/5.0.0.Beta4/jboss-corba-ots-spi-5.0.0.Beta4.jar" sourcepath="M2_REPO/org/jboss/jboss-corba-ots-spi/5.0.0.Beta4/jboss-corba-ots-spi-5.0.0.Beta4-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/microcontainer/jboss-dependency/2.0.0.Beta9/jboss-dependency-2.0.0.Beta9.jar" sourcepath="M2_REPO/org/jboss/microcontainer/jboss-dependency/2.0.0.Beta9/jboss-dependency-2.0.0.Beta9-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/deployers/jboss-deployers-client/2.0.0.Beta14/jboss-deployers-client-2.0.0.Beta14.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/deployers/jboss-deployers-client-spi/2.0.0.Beta14/jboss-deployers-client-spi-2.0.0.Beta14.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/microcontainer/jboss-deployers-client-spi/2.0.0.Beta6/jboss-deployers-client-spi-2.0.0.Beta6.jar" sourcepath="M2_REPO/org/jboss/microcontainer/jboss-deployers-client-spi/2.0.0.Beta6/jboss-deployers-client-spi-2.0.0.Beta6-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/deployers/jboss-deployers-core/2.0.0.Beta14/jboss-deployers-core-2.0.0.Beta14.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/deployers/jboss-deployers-core-spi/2.0.0.Beta14/jboss-deployers-core-spi-2.0.0.Beta14.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/microcontainer/jboss-deployers-core-spi/2.0.0.Beta9/jboss-deployers-core-spi-2.0.0.Beta9.jar" sourcepath="M2_REPO/org/jboss/microcontainer/jboss-deployers-core-spi/2.0.0.Beta9/jboss-deployers-core-spi-2.0.0.Beta9-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/deployers/jboss-deployers-impl/2.0.0.Beta14/jboss-deployers-impl-2.0.0.Beta14.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/deployers/jboss-deployers-spi/2.0.0.Beta14/jboss-deployers-spi-2.0.0.Beta14.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/deployers/jboss-deployers-structure-spi/2.0.0.Beta14/jboss-deployers-structure-spi-2.0.0.Beta14.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/deployers/jboss-deployers-vfs/2.0.0.Beta14/jboss-deployers-vfs-2.0.0.Beta14.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/deployers/jboss-deployers-vfs-spi/2.0.0.Beta14/jboss-deployers-vfs-spi-2.0.0.Beta14.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/javaee/jboss-ejb-api/3.0.0.Beta3Update1/jboss-ejb-api-3.0.0.Beta3Update1.jar" sourcepath="M2_REPO/org/jboss/javaee/jboss-ejb-api/3.0.0.Beta3Update1/jboss-ejb-api-3.0.0.Beta3Update1-sources.jar"/>
   <classpathentry kind="var" path="M2_REPO/org/jboss/ejb3/jboss-ejb3-cache/0.13.0-SNAPSHOT/jboss-ejb3-cache-0.13.0-SNAPSHOT.jar" sourcepath="M2_REPO/org/jboss/ejb3/jboss-ejb3-cache/0.13.0-SNAPSHOT/jboss-ejb3-cache-0.13.0-SNAPSHOT-sources.jar"/>
   <classpathentry kind="var" path="M2_REPO/org/jboss/ejb3/jboss-ejb3-ext-api/0.3-SNAPSHOT/jboss-ejb3-ext-api-0.3-SNAPSHOT.jar" sourcepath="M2_REPO/org/jboss/ejb3/jboss-ejb3-ext-api/0.3-SNAPSHOT/jboss-ejb3-ext-api-0.3-SNAPSHOT-sources.jar"/>
   <classpathentry kind="var" path="M2_REPO/org/jboss/ejb3/jboss-ejb3-ext-api-impl/0.3-SNAPSHOT/jboss-ejb3-ext-api-impl-0.3-SNAPSHOT.jar" sourcepath="M2_REPO/org/jboss/ejb3/jboss-ejb3-ext-api-impl/0.3-SNAPSHOT/jboss-ejb3-ext-api-impl-0.3-SNAPSHOT-sources.jar"/>
-  <classpathentry kind="var" path="M2_REPO/org/jboss/ejb3/jboss-ejb3-interceptors/0.12.0-SNAPSHOT/jboss-ejb3-interceptors-0.12.0-SNAPSHOT.jar" sourcepath="M2_REPO/org/jboss/ejb3/jboss-ejb3-interceptors/0.12.0-SNAPSHOT/jboss-ejb3-interceptors-0.12.0-SNAPSHOT-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/ejb3/jboss-ejb3-interceptors/0.13.0-SNAPSHOT/jboss-ejb3-interceptors-0.13.0-SNAPSHOT.jar" sourcepath="M2_REPO/org/jboss/ejb3/jboss-ejb3-interceptors/0.13.0-SNAPSHOT/jboss-ejb3-interceptors-0.13.0-SNAPSHOT-sources.jar"/>
   <classpathentry kind="var" path="M2_REPO/org/jboss/ejb3/jboss-ejb3-metadata/0.12.0-SNAPSHOT/jboss-ejb3-metadata-0.12.0-SNAPSHOT.jar" sourcepath="M2_REPO/org/jboss/ejb3/jboss-ejb3-metadata/0.12.0-SNAPSHOT/jboss-ejb3-metadata-0.12.0-SNAPSHOT-sources.jar"/>
   <classpathentry kind="var" path="M2_REPO/org/jboss/embedded/jboss-embedded/beta3-SNAPSHOT/jboss-embedded-beta3-SNAPSHOT.jar"/>
-  <classpathentry kind="var" path="M2_REPO/org/jboss/cluster/jboss-ha-client/1.0.0.GA/jboss-ha-client-1.0.0.GA.jar"/>
-  <classpathentry kind="var" path="M2_REPO/org/jboss/cluster/jboss-ha-server-api/1.0.0.GA/jboss-ha-server-api-1.0.0.GA.jar"/>
-  <classpathentry kind="var" path="M2_REPO/org/jboss/javaee/jboss-jacc-api/1.1.0.Beta3Update1/jboss-jacc-api-1.1.0.Beta3Update1.jar"/>
-  <classpathentry kind="var" path="M2_REPO/org/jboss/javaee/jboss-jaspi-api/1.0-BETA1/jboss-jaspi-api-1.0-BETA1.jar"/>
-  <classpathentry kind="var" path="M2_REPO/org/jboss/javaee/jboss-javaee/5.0.0.Beta3/jboss-javaee-5.0.0.Beta3.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/cluster/jboss-ha-client/1.0.0.GA/jboss-ha-client-1.0.0.GA.jar" sourcepath="M2_REPO/org/jboss/cluster/jboss-ha-client/1.0.0.GA/jboss-ha-client-1.0.0.GA-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/cluster/jboss-ha-server-api/1.0.0.GA/jboss-ha-server-api-1.0.0.GA.jar" sourcepath="M2_REPO/org/jboss/cluster/jboss-ha-server-api/1.0.0.GA/jboss-ha-server-api-1.0.0.GA-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/javaee/jboss-jacc-api/1.1.0.Beta3Update1/jboss-jacc-api-1.1.0.Beta3Update1.jar" sourcepath="M2_REPO/org/jboss/javaee/jboss-jacc-api/1.1.0.Beta3Update1/jboss-jacc-api-1.1.0.Beta3Update1-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/javaee/jboss-jaspi-api/1.0-BETA1/jboss-jaspi-api-1.0-BETA1.jar" sourcepath="M2_REPO/org/jboss/javaee/jboss-jaspi-api/1.0-BETA1/jboss-jaspi-api-1.0-BETA1-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/javaee/jboss-javaee/5.0.0.Beta3/jboss-javaee-5.0.0.Beta3.jar" sourcepath="M2_REPO/org/jboss/javaee/jboss-javaee/5.0.0.Beta3/jboss-javaee-5.0.0.Beta3-sources.jar"/>
   <classpathentry kind="var" path="M2_REPO/jboss/jbossws/jboss-jaxrpc/1.0.4.GA/jboss-jaxrpc-1.0.4.GA.jar"/>
   <classpathentry kind="var" path="M2_REPO/org/jboss/jboss-jaxws/2.0.1.GA/jboss-jaxws-2.0.1.GA.jar"/>
-  <classpathentry kind="var" path="M2_REPO/org/jboss/javaee/jboss-jca-api/1.5.0.Beta3Update1/jboss-jca-api-1.5.0.Beta3Update1.jar"/>
-  <classpathentry kind="var" path="M2_REPO/org/jboss/javaee/jboss-jms-api/1.1.0-SNAPSHOT/jboss-jms-api-1.1.0-SNAPSHOT.jar"/>
-  <classpathentry kind="var" path="M2_REPO/org/jboss/microcontainer/jboss-kernel/2.0.0.Beta9/jboss-kernel-2.0.0.Beta9.jar"/>
-  <classpathentry kind="var" path="M2_REPO/jboss/jboss-logging-log4j/2.0.2.GA/jboss-logging-log4j-2.0.2.GA.jar"/>
-  <classpathentry kind="var" path="M2_REPO/jboss/jboss-logging-spi/2.0.2.GA/jboss-logging-spi-2.0.2.GA.jar"/>
-  <classpathentry kind="var" path="M2_REPO/org/jboss/man/jboss-managed/2.0.0.Beta12/jboss-managed-2.0.0.Beta12.jar"/>
-  <classpathentry kind="var" path="M2_REPO/org/jboss/microcontainer/jboss-managed/2.0.0.Beta9/jboss-managed-2.0.0.Beta9.jar"/>
-  <classpathentry kind="var" path="M2_REPO/org/jboss/jboss-metadata/1.0.0.Beta6/jboss-metadata-1.0.0.Beta6.jar"/>
-  <classpathentry kind="var" path="M2_REPO/org/jboss/man/jboss-metatype/2.0.0.Beta12/jboss-metatype-2.0.0.Beta12.jar"/>
-  <classpathentry kind="var" path="M2_REPO/org/jboss/microcontainer/jboss-metatype/2.0.0.Beta9/jboss-metatype-2.0.0.Beta9.jar"/>
-  <classpathentry kind="var" path="M2_REPO/org/jboss/javaee/jboss-persistence-api/3.0.0.Beta3Update1/jboss-persistence-api-3.0.0.Beta3Update1.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/javaee/jboss-jca-api/1.5.0.Beta3Update1/jboss-jca-api-1.5.0.Beta3Update1.jar" sourcepath="M2_REPO/org/jboss/javaee/jboss-jca-api/1.5.0.Beta3Update1/jboss-jca-api-1.5.0.Beta3Update1-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/javaee/jboss-jms-api/1.1.0-SNAPSHOT/jboss-jms-api-1.1.0-SNAPSHOT.jar" sourcepath="M2_REPO/org/jboss/javaee/jboss-jms-api/1.1.0-SNAPSHOT/jboss-jms-api-1.1.0-SNAPSHOT-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/microcontainer/jboss-kernel/2.0.0.Beta9/jboss-kernel-2.0.0.Beta9.jar" sourcepath="M2_REPO/org/jboss/microcontainer/jboss-kernel/2.0.0.Beta9/jboss-kernel-2.0.0.Beta9-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/jboss/jboss-logging-log4j/2.0.2.GA/jboss-logging-log4j-2.0.2.GA.jar" sourcepath="M2_REPO/jboss/jboss-logging-log4j/2.0.2.GA/jboss-logging-log4j-2.0.2.GA-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/logging/jboss-logging-log4j/2.0.5.GA/jboss-logging-log4j-2.0.5.GA.jar" sourcepath="M2_REPO/org/jboss/logging/jboss-logging-log4j/2.0.5.GA/jboss-logging-log4j-2.0.5.GA-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/jboss/jboss-logging-spi/2.0.3.GA/jboss-logging-spi-2.0.3.GA.jar" sourcepath="M2_REPO/jboss/jboss-logging-spi/2.0.3.GA/jboss-logging-spi-2.0.3.GA-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/logging/jboss-logging-spi/2.0.5.GA/jboss-logging-spi-2.0.5.GA.jar" sourcepath="M2_REPO/org/jboss/logging/jboss-logging-spi/2.0.5.GA/jboss-logging-spi-2.0.5.GA-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/man/jboss-managed/2.0.0.Beta12/jboss-managed-2.0.0.Beta12.jar" sourcepath="M2_REPO/org/jboss/man/jboss-managed/2.0.0.Beta12/jboss-managed-2.0.0.Beta12-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/microcontainer/jboss-managed/2.0.0.Beta9/jboss-managed-2.0.0.Beta9.jar" sourcepath="M2_REPO/org/jboss/microcontainer/jboss-managed/2.0.0.Beta9/jboss-managed-2.0.0.Beta9-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/jboss-metadata/1.0.0.Beta6/jboss-metadata-1.0.0.Beta6.jar" sourcepath="M2_REPO/org/jboss/jboss-metadata/1.0.0.Beta6/jboss-metadata-1.0.0.Beta6-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/metadata/jboss-metadata/1.0.0.Beta7/jboss-metadata-1.0.0.Beta7.jar" sourcepath="M2_REPO/org/jboss/metadata/jboss-metadata/1.0.0.Beta7/jboss-metadata-1.0.0.Beta7-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/man/jboss-metatype/2.0.0.Beta12/jboss-metatype-2.0.0.Beta12.jar" sourcepath="M2_REPO/org/jboss/man/jboss-metatype/2.0.0.Beta12/jboss-metatype-2.0.0.Beta12-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/microcontainer/jboss-metatype/2.0.0.Beta9/jboss-metatype-2.0.0.Beta9.jar" sourcepath="M2_REPO/org/jboss/microcontainer/jboss-metatype/2.0.0.Beta9/jboss-metatype-2.0.0.Beta9-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/javaee/jboss-persistence-api/3.0.0.Beta3Update1/jboss-persistence-api-3.0.0.Beta3Update1.jar" sourcepath="M2_REPO/org/jboss/javaee/jboss-persistence-api/3.0.0.Beta3Update1/jboss-persistence-api-3.0.0.Beta3Update1-sources.jar"/>
   <classpathentry kind="var" path="M2_REPO/jboss/profiler/jvmti/jboss-profiler-jvmti/1.0.0.CR5/jboss-profiler-jvmti-1.0.0.CR5.jar"/>
-  <classpathentry kind="var" path="M2_REPO/org/jboss/jboss-reflect/2.0.0.Beta12/jboss-reflect-2.0.0.Beta12.jar"/>
-  <classpathentry kind="var" path="M2_REPO/jboss/remoting/jboss-remoting/2.4.0.Beta2/jboss-remoting-2.4.0.Beta2.jar"/>
-  <classpathentry kind="var" path="M2_REPO/jboss/jbossws/jboss-saaj/2.0.4-SNAPSHOT/jboss-saaj-2.0.4-SNAPSHOT.jar"/>
-  <classpathentry kind="var" path="M2_REPO/org/jboss/security/jboss-security-spi-bare/2.0.2.Beta5/jboss-security-spi-bare-2.0.2.Beta5.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/jboss-reflect/2.0.0.Beta12/jboss-reflect-2.0.0.Beta12.jar" sourcepath="M2_REPO/org/jboss/jboss-reflect/2.0.0.Beta12/jboss-reflect-2.0.0.Beta12-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/jboss/remoting/jboss-remoting/2.4.0.CR1/jboss-remoting-2.4.0.CR1.jar" sourcepath="M2_REPO/jboss/remoting/jboss-remoting/2.4.0.CR1/jboss-remoting-2.4.0.CR1-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/jboss/jbossws/jboss-saaj/3.0.1-native-2.0.4.GA/jboss-saaj-3.0.1-native-2.0.4.GA.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/aspects/jboss-security-aspects/1.0.0-SNAPSHOT/jboss-security-aspects-1.0.0-SNAPSHOT.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/security/jboss-security-spi/2.0.2.Beta5/jboss-security-spi-2.0.2.Beta5.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/security/jboss-security-spi-bare/2.0.2.Beta5/jboss-security-spi-bare-2.0.2.Beta5.jar" sourcepath="M2_REPO/org/jboss/security/jboss-security-spi-bare/2.0.2.Beta5/jboss-security-spi-bare-2.0.2.Beta5-sources.jar"/>
   <classpathentry kind="var" path="M2_REPO/jboss/jboss-serialization/1.0.3.GA/jboss-serialization-1.0.3.GA.jar"/>
-  <classpathentry kind="var" path="M2_REPO/org/jboss/javaee/jboss-servlet-api/2.5.0-SNAPSHOT/jboss-servlet-api-2.5.0-SNAPSHOT.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/javaee/jboss-servlet-api/2.5.0-SNAPSHOT/jboss-servlet-api-2.5.0-SNAPSHOT.jar" sourcepath="M2_REPO/org/jboss/javaee/jboss-servlet-api/2.5.0-SNAPSHOT/jboss-servlet-api-2.5.0-SNAPSHOT-sources.jar"/>
   <classpathentry kind="var" path="M2_REPO/jboss/aop/jboss-standalone-aspect-library-jdk50/2.0.0.CR8/jboss-standalone-aspect-library-jdk50-2.0.0.CR8.jar"/>
-  <classpathentry kind="var" path="M2_REPO/jboss/jboss-test/1.0.3.GA/jboss-test-1.0.3.GA.jar"/>
-  <classpathentry kind="var" path="M2_REPO/org/jboss/jboss-test/1.0.5.GA/jboss-test-1.0.5.GA.jar"/>
-  <classpathentry kind="var" path="M2_REPO/org/jboss/javaee/jboss-transaction-api/1.0.1.20070913080910/jboss-transaction-api-1.0.1.20070913080910.jar"/>
-  <classpathentry kind="var" path="M2_REPO/org/jboss/jboss-transaction-spi/5.0.0.Beta4/jboss-transaction-spi-5.0.0.Beta4.jar"/>
-  <classpathentry kind="var" path="M2_REPO/org/jboss/jboss-vfs/2.0.0.Beta8/jboss-vfs-2.0.0.Beta8.jar"/>
+  <classpathentry kind="var" path="M2_REPO/jboss/jboss-test/1.0.3.GA/jboss-test-1.0.3.GA.jar" sourcepath="M2_REPO/jboss/jboss-test/1.0.3.GA/jboss-test-1.0.3.GA-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/jboss-test/1.0.6-SNAPSHOT/jboss-test-1.0.6-SNAPSHOT.jar" sourcepath="M2_REPO/org/jboss/jboss-test/1.0.6-SNAPSHOT/jboss-test-1.0.6-SNAPSHOT-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/javaee/jboss-transaction-api/1.0.1.20070913080910/jboss-transaction-api-1.0.1.20070913080910.jar" sourcepath="M2_REPO/org/jboss/javaee/jboss-transaction-api/1.0.1.20070913080910/jboss-transaction-api-1.0.1.20070913080910-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/jboss-transaction-spi/5.0.0.Beta4/jboss-transaction-spi-5.0.0.Beta4.jar" sourcepath="M2_REPO/org/jboss/jboss-transaction-spi/5.0.0.Beta4/jboss-transaction-spi-5.0.0.Beta4-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/jboss-vfs/2.0.0.Beta8/jboss-vfs-2.0.0.Beta8.jar" sourcepath="M2_REPO/org/jboss/jboss-vfs/2.0.0.Beta8/jboss-vfs-2.0.0.Beta8-sources.jar"/>
   <classpathentry kind="var" path="M2_REPO/org/jboss/cache/jbosscache-core/2.1.0.CR4/jbosscache-core-2.1.0.CR4.jar"/>
-  <classpathentry kind="var" path="M2_REPO/org/jboss/security/jbosssx-client/2.0.2.Beta5/jbosssx-client-2.0.2.Beta5.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/security/jbosssx-client/2.0.2.Beta5/jbosssx-client-2.0.2.Beta5.jar" sourcepath="M2_REPO/org/jboss/security/jbosssx-client/2.0.2.Beta5/jbosssx-client-2.0.2.Beta5-sources.jar"/>
   <classpathentry kind="var" path="M2_REPO/org/jboss/jbossws-spi/1.0.0.GA/jbossws-spi-1.0.0.GA.jar"/>
   <classpathentry kind="var" path="M2_REPO/org/jboss/ws/jbossws-spi/1.0.2.GA/jbossws-spi-1.0.2.GA.jar"/>
-  <classpathentry kind="var" path="M2_REPO/org/jboss/jbossxb/2.0.0.CR5/jbossxb-2.0.0.CR5.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/jbossxb/2.0.0.CR5/jbossxb-2.0.0.CR5.jar" sourcepath="M2_REPO/org/jboss/jbossxb/2.0.0.CR5/jbossxb-2.0.0.CR5-sources.jar"/>
   <classpathentry kind="var" path="M2_REPO/jgroups/jgroups/2.6.1/jgroups-2.6.1.jar"/>
-  <classpathentry kind="var" path="M2_REPO/org/jboss/jnpserver/5.0.0.Beta4/jnpserver-5.0.0.Beta4.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/jnpserver/5.0.0.Beta4/jnpserver-5.0.0.Beta4.jar" sourcepath="M2_REPO/org/jboss/jnpserver/5.0.0.Beta4/jnpserver-5.0.0.Beta4-sources.jar"/>
   <classpathentry kind="var" path="M2_REPO/jpl-pattern/jpl-pattern/1.0/jpl-pattern-1.0.jar"/>
   <classpathentry kind="var" path="M2_REPO/jpl-util/jpl-util/1.0/jpl-util-1.0.jar"/>
-  <classpathentry kind="var" path="M2_REPO/javax/xml/bind/jsr173_api/1.0/jsr173_api-1.0.jar"/>
   <classpathentry kind="var" path="M2_REPO/javax/transaction/jta/1.0.1B/jta-1.0.1B.jar"/>
-  <classpathentry kind="var" path="M2_REPO/junit/junit/4.4/junit-4.4.jar"/>
-  <classpathentry kind="var" path="M2_REPO/apache-log4j/log4j/1.2.14/log4j-1.2.14.jar"/>
-  <classpathentry kind="var" path="M2_REPO/log4j/log4j/1.2.14/log4j-1.2.14.jar"/>
-  <classpathentry kind="var" path="M2_REPO/javax/mail/mail/1.4/mail-1.4.jar"/>
-  <classpathentry kind="var" path="M2_REPO/qdox/qdox/1.6/qdox-1.6.jar"/>
+  <classpathentry kind="var" path="M2_REPO/junit/junit/4.4/junit-4.4.jar" sourcepath="M2_REPO/junit/junit/4.4/junit-4.4-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/apache-log4j/log4j/1.2.14/log4j-1.2.14.jar" sourcepath="M2_REPO/apache-log4j/log4j/1.2.14/log4j-1.2.14-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/log4j/log4j/1.2.14/log4j-1.2.14.jar" sourcepath="M2_REPO/log4j/log4j/1.2.14/log4j-1.2.14-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/javax/mail/mail/1.4/mail-1.4.jar" sourcepath="M2_REPO/javax/mail/mail/1.4/mail-1.4-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/qdox/qdox/1.6/qdox-1.6.jar" sourcepath="M2_REPO/qdox/qdox/1.6/qdox-1.6-sources.jar"/>
   <classpathentry kind="var" path="M2_REPO/quartz/quartz/1.6.0/quartz-1.6.0.jar"/>
+  <classpathentry kind="var" path="M2_REPO/javax/xml/soap/saaj-api/1.3/saaj-api-1.3.jar"/>
+  <classpathentry kind="var" path="M2_REPO/javax/xml/stream/stax-api/1.0-2/stax-api-1.0-2.jar" sourcepath="M2_REPO/javax/xml/stream/stax-api/1.0-2/stax-api-1.0-2-sources.jar"/>
   <classpathentry kind="var" path="M2_REPO/trove/trove/1.0.2/trove-1.0.2.jar"/>
   <classpathentry kind="var" path="M2_REPO/apache-slide/webdavlib/2.0/webdavlib-2.0.jar"/>
   <classpathentry kind="var" path="M2_REPO/apache-xerces/xercesImpl/2.7.1/xercesImpl-2.7.1.jar"/>

Modified: projects/ejb3/trunk/core/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- projects/ejb3/trunk/core/.settings/org.eclipse.jdt.core.prefs	2008-04-11 07:12:16 UTC (rev 72000)
+++ projects/ejb3/trunk/core/.settings/org.eclipse.jdt.core.prefs	2008-04-11 08:04:37 UTC (rev 72001)
@@ -1,4 +1,4 @@
-#Wed Apr 02 17:08:43 GMT-08:00 2008
+#Fri Apr 11 09:55:41 CEST 2008
 org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
 eclipse.preferences.version=1
 org.eclipse.jdt.core.compiler.source=1.5

Modified: projects/ejb3/trunk/core/build-test.xml
===================================================================
--- projects/ejb3/trunk/core/build-test.xml	2008-04-11 07:12:16 UTC (rev 72000)
+++ projects/ejb3/trunk/core/build-test.xml	2008-04-11 08:04:37 UTC (rev 72001)
@@ -4274,6 +4274,7 @@
 
 
          <jvmarg line="${jvmargs}" />
+         <jvmarg line="-ea" />
          <!--
          <jvmarg line="-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=/dt_socket,address=8787,server=y,suspend=y"/>
          -->

Modified: projects/ejb3/trunk/core/jboss-ejb3-client.xml
===================================================================
--- projects/ejb3/trunk/core/jboss-ejb3-client.xml	2008-04-11 07:12:16 UTC (rev 72000)
+++ projects/ejb3/trunk/core/jboss-ejb3-client.xml	2008-04-11 08:04:37 UTC (rev 72001)
@@ -31,6 +31,7 @@
         <include>org/jboss/ejb3/stateful/StatefulRemoteInvocation.class</include>
         <include>org/jboss/ejb3/ProxyUtils.class</include>
         <include>org/jboss/ejb3/**/*Proxy.class</include>
+        <include>org/jboss/ejb3/**/*Handle*Impl.class</include>
         <include>org/jboss/ejb3/**/*HandleImpl.class</include>
         <include>org/jboss/ejb3/*Container.class</include>
         <include>org/jboss/ejb3/session/SessionContainer.class</include>
@@ -56,4 +57,4 @@
       </includes>
     </fileSet>
   </fileSets>
-</assembly>
\ No newline at end of file
+</assembly>

Modified: projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/BaseContext.java
===================================================================
--- projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/BaseContext.java	2008-04-11 07:12:16 UTC (rev 72000)
+++ projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/BaseContext.java	2008-04-11 08:04:37 UTC (rev 72001)
@@ -44,7 +44,7 @@
    protected RealmMapping rm;
    protected SimpleMetaData metadata;
    
-   protected HashMap<Class, Object> interceptorInstances;
+   protected HashMap<Class<?>, Object> interceptorInstances;
    private Object interceptors[];
    
    /**

Modified: projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/ContainerDelegateWrapper.java
===================================================================
--- projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/ContainerDelegateWrapper.java	2008-04-11 07:12:16 UTC (rev 72000)
+++ projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/ContainerDelegateWrapper.java	2008-04-11 08:04:37 UTC (rev 72001)
@@ -29,7 +29,7 @@
  * Comment
  *
  * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
- * @version $Revision: $
+ * @version $Revision$
  */
 public class ContainerDelegateWrapper<CONTAINER_TYPE extends Container> implements ContainerDelegateWrapperMBean
 {

Modified: projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/ContainerDelegateWrapperMBean.java
===================================================================
--- projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/ContainerDelegateWrapperMBean.java	2008-04-11 07:12:16 UTC (rev 72000)
+++ projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/ContainerDelegateWrapperMBean.java	2008-04-11 08:04:37 UTC (rev 72001)
@@ -29,7 +29,7 @@
  * Comment
  *
  * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
- * @version $Revision: $
+ * @version $Revision$
  */
 public interface ContainerDelegateWrapperMBean
 {

Modified: projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/JndiProxyFactory.java
===================================================================
--- projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/JndiProxyFactory.java	2008-04-11 07:12:16 UTC (rev 72000)
+++ projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/JndiProxyFactory.java	2008-04-11 08:04:37 UTC (rev 72001)
@@ -52,7 +52,7 @@
       {
          ProxyFactory factory = (ProxyFactory) nameCtx.lookup(factoryName);
          
-         Object proxy = factory.createProxy();
+         Object proxy = factory.createProxyBusiness();
          MarshalledValuePair marshalledProxy = new MarshalledValuePair(proxy);
          return marshalledProxy.get();
       }

Modified: projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/ProxyFactory.java
===================================================================
--- projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/ProxyFactory.java	2008-04-11 07:12:16 UTC (rev 72000)
+++ projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/ProxyFactory.java	2008-04-11 08:04:37 UTC (rev 72001)
@@ -31,9 +31,9 @@
 {
    public Object createHomeProxy();
    
-   public Object createProxy();
+   public Object createProxyBusiness();
 
-   public Object createProxy(Object id);
+   public Object createProxyBusiness(Object id);
    
    public void start() throws Exception;
 

Modified: projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/ProxyFactoryHelper.java
===================================================================
--- projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/ProxyFactoryHelper.java	2008-04-11 07:12:16 UTC (rev 72000)
+++ projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/ProxyFactoryHelper.java	2008-04-11 08:04:37 UTC (rev 72001)
@@ -21,6 +21,8 @@
  */
 package org.jboss.ejb3;
 
+import java.lang.reflect.Constructor;
+import java.lang.reflect.InvocationHandler;
 import java.lang.reflect.Method;
 import java.net.URI;
 import java.util.ArrayList;
@@ -833,6 +835,20 @@
       
       return clientBindUrl;
    }
+   
+   /**
+    * Create a Proxy Constructor for the specified interfaces, using the specified CL
+    * 
+    * @param interfaces
+    * @param cl
+    * @return
+    * @throws Exception
+    */
+   public static Constructor<?> createProxyConstructor(Class<?>[] interfaces, ClassLoader cl) throws Exception
+   {
+      Class<?> proxyClass = java.lang.reflect.Proxy.getProxyClass(cl, interfaces);
+      return proxyClass.getConstructor(InvocationHandler.class);
+   }
 
    public static String getHomeJndiName(EJBContainer container)
    {

Modified: projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/cache/NoPassivationCache.java
===================================================================
--- projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/cache/NoPassivationCache.java	2008-04-11 07:12:16 UTC (rev 72000)
+++ projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/cache/NoPassivationCache.java	2008-04-11 08:04:37 UTC (rev 72001)
@@ -42,7 +42,8 @@
    private HashMap<Object, StatefulBeanContext> cacheMap;
    private int createCount = 0;
    private int removeCount = 0;
-
+   private boolean running;
+   
    public void initialize(EJBContainer container) throws Exception
    {
       this.pool = container.getPool();
@@ -55,6 +56,7 @@
 
    public void start()
    {
+      this.running = true;
    }
 
    public void stop()
@@ -63,6 +65,7 @@
       {
          cacheMap.clear();
       }
+      this.running = false;
    }
 
    public StatefulBeanContext create()
@@ -70,7 +73,7 @@
       return create(null, null);
    }
    
-   public StatefulBeanContext create(Class[] initTypes, Object[] initValues)
+   public StatefulBeanContext create(Class<?>[] initTypes, Object[] initValues)
    {
       StatefulBeanContext ctx = null;
       try
@@ -192,4 +195,9 @@
    {
       return cacheMap.size();
    }
+   
+   public boolean isStarted()
+   {
+      return this.running;
+   }
 }

Modified: projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/cache/StatefulCache.java
===================================================================
--- projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/cache/StatefulCache.java	2008-04-11 07:12:16 UTC (rev 72000)
+++ projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/cache/StatefulCache.java	2008-04-11 08:04:37 UTC (rev 72001)
@@ -91,4 +91,6 @@
    int getTotalSize();
    
    public void initialize(EJBContainer container) throws Exception;
+   
+   public boolean isStarted();
 }

Modified: projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/cache/simple/SimpleStatefulCache.java
===================================================================
--- projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/cache/simple/SimpleStatefulCache.java	2008-04-11 07:12:16 UTC (rev 72000)
+++ projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/cache/simple/SimpleStatefulCache.java	2008-04-11 08:04:37 UTC (rev 72001)
@@ -341,7 +341,7 @@
       return ctx;
    }
 
-   public StatefulBeanContext create(Class[] initTypes, Object[] initValues)
+   public StatefulBeanContext create(Class<?>[] initTypes, Object[] initValues)
    {
       StatefulBeanContext ctx = null;
       try
@@ -506,4 +506,9 @@
    {
       return cacheMap.size();
    }
+   
+   public boolean isStarted()
+   {
+      return this.running;
+   }
 }

Modified: projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/cache/tree/StatefulTreeCache.java
===================================================================
--- projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/cache/tree/StatefulTreeCache.java	2008-04-11 07:12:16 UTC (rev 72000)
+++ projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/cache/tree/StatefulTreeCache.java	2008-04-11 08:04:37 UTC (rev 72001)
@@ -728,4 +728,9 @@
          }
       }
    }
+   
+   public boolean isStarted()
+   {
+      return this.running;
+   }
 }

Modified: projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/dependency/EjbLinkDemandMetaData.java
===================================================================
--- projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/dependency/EjbLinkDemandMetaData.java	2008-04-11 07:12:16 UTC (rev 72000)
+++ projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/dependency/EjbLinkDemandMetaData.java	2008-04-11 08:04:37 UTC (rev 72001)
@@ -45,7 +45,7 @@
  * specified.
  *
  * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
- * @version $Revision: $
+ * @version $Revision$
  */
 public class EjbLinkDemandMetaData extends JBossObject
    implements DemandMetaData, Serializable

Modified: projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/javaee/AbstractJavaEEComponent.java
===================================================================
--- projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/javaee/AbstractJavaEEComponent.java	2008-04-11 07:12:16 UTC (rev 72000)
+++ projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/javaee/AbstractJavaEEComponent.java	2008-04-11 08:04:37 UTC (rev 72001)
@@ -25,7 +25,7 @@
  * Comment
  *
  * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
- * @version $Revision: $
+ * @version $Revision$
  */
 public abstract class AbstractJavaEEComponent implements JavaEEComponent
 {

Modified: projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/javaee/JavaEEApplication.java
===================================================================
--- projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/javaee/JavaEEApplication.java	2008-04-11 07:12:16 UTC (rev 72000)
+++ projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/javaee/JavaEEApplication.java	2008-04-11 08:04:37 UTC (rev 72001)
@@ -25,7 +25,7 @@
  * Comment
  *
  * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
- * @version $Revision: $
+ * @version $Revision$
  */
 public interface JavaEEApplication
 {

Modified: projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/javaee/JavaEEComponent.java
===================================================================
--- projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/javaee/JavaEEComponent.java	2008-04-11 07:12:16 UTC (rev 72000)
+++ projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/javaee/JavaEEComponent.java	2008-04-11 08:04:37 UTC (rev 72001)
@@ -27,7 +27,7 @@
  * EE 2.2
  *
  * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
- * @version $Revision: $
+ * @version $Revision$
  */
 public interface JavaEEComponent
 {

Modified: projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/javaee/JavaEEComponentHelper.java
===================================================================
--- projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/javaee/JavaEEComponentHelper.java	2008-04-11 07:12:16 UTC (rev 72000)
+++ projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/javaee/JavaEEComponentHelper.java	2008-04-11 08:04:37 UTC (rev 72001)
@@ -30,7 +30,7 @@
  * Comment
  *
  * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
- * @version $Revision: $
+ * @version $Revision$
  */
 public class JavaEEComponentHelper
 {

Modified: projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/javaee/JavaEEModule.java
===================================================================
--- projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/javaee/JavaEEModule.java	2008-04-11 07:12:16 UTC (rev 72000)
+++ projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/javaee/JavaEEModule.java	2008-04-11 08:04:37 UTC (rev 72001)
@@ -27,7 +27,7 @@
  * Java EE components and an optional module level deployment descriptor.
  *
  * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
- * @version $Revision: $
+ * @version $Revision$
  */
 public interface JavaEEModule
 {

Modified: projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/javaee/SimpleJavaEEApplication.java
===================================================================
--- projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/javaee/SimpleJavaEEApplication.java	2008-04-11 07:12:16 UTC (rev 72000)
+++ projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/javaee/SimpleJavaEEApplication.java	2008-04-11 08:04:37 UTC (rev 72001)
@@ -25,7 +25,7 @@
  * Comment
  *
  * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
- * @version $Revision: $
+ * @version $Revision$
  */
 public class SimpleJavaEEApplication implements JavaEEApplication
 {

Modified: projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/kernel/JNDIKernelRegistryPlugin.java
===================================================================
--- projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/kernel/JNDIKernelRegistryPlugin.java	2008-04-11 07:12:16 UTC (rev 72000)
+++ projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/kernel/JNDIKernelRegistryPlugin.java	2008-04-11 08:04:37 UTC (rev 72001)
@@ -38,7 +38,7 @@
  *
  * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
  * @author <a href="mailto:ajustin at redhat.com">Ales Justin</a>
- * @version $Revision: $
+ * @version $Revision$
  */
 public class JNDIKernelRegistryPlugin implements KernelRegistryPlugin
 {

Modified: projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/mdb/LocalProducerFactory.java
===================================================================
--- projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/mdb/LocalProducerFactory.java	2008-04-11 07:12:16 UTC (rev 72000)
+++ projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/mdb/LocalProducerFactory.java	2008-04-11 08:04:37 UTC (rev 72001)
@@ -55,7 +55,7 @@
       }
    }
 
-   public Object createProxy()
+   public Object createProxyBusiness()
    {
       Class[] interfaces = {producer, ProducerObject.class};
 

Modified: projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/mdb/MessageDrivenContextImpl.java
===================================================================
--- projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/mdb/MessageDrivenContextImpl.java	2008-04-11 07:12:16 UTC (rev 72000)
+++ projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/mdb/MessageDrivenContextImpl.java	2008-04-11 08:04:37 UTC (rev 72001)
@@ -29,7 +29,7 @@
  * Comment
  *
  * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
- * @version $Revision: $
+ * @version $Revision$
  */
 public class MessageDrivenContextImpl extends EJBContextImpl<MessagingContainer, MDBContext> implements MessageDrivenContext
 {

Modified: projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/mdb/MessagingDelegateWrapper.java
===================================================================
--- projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/mdb/MessagingDelegateWrapper.java	2008-04-11 07:12:16 UTC (rev 72000)
+++ projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/mdb/MessagingDelegateWrapper.java	2008-04-11 08:04:37 UTC (rev 72001)
@@ -27,7 +27,7 @@
  * TODO: implement proper mdb stats
  *
  * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
- * @version $Revision: $
+ * @version $Revision$
  */
 public class MessagingDelegateWrapper extends ContainerDelegateWrapper<MessagingContainer>
    implements MessagingDelegateWrapperMBean

Modified: projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/mdb/ProducerFactory.java
===================================================================
--- projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/mdb/ProducerFactory.java	2008-04-11 07:12:16 UTC (rev 72000)
+++ projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/mdb/ProducerFactory.java	2008-04-11 08:04:37 UTC (rev 72001)
@@ -117,11 +117,11 @@
       throw new UnsupportedOperationException("producer can't have a home interface");
    }
    
-   public Object createProxy(Object id)
+   public Object createProxyBusiness(Object id)
    {
       if(id != null)
          throw new IllegalArgumentException("producer proxy must not have an id");
-      return createProxy();
+      return createProxyBusiness();
    }
    
    public void setContainer(Container container)

Modified: projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/mdb/RemoteProducerFactory.java
===================================================================
--- projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/mdb/RemoteProducerFactory.java	2008-04-11 07:12:16 UTC (rev 72000)
+++ projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/mdb/RemoteProducerFactory.java	2008-04-11 08:04:37 UTC (rev 72001)
@@ -65,7 +65,7 @@
    {
    }
 
-   public Object createProxy()
+   public Object createProxyBusiness()
    {
       Class[] interfaces = {producer, ProducerObject.class};
 

Modified: projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/metadata/JBossMessageDrivenBeanGenericWrapper.java
===================================================================
--- projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/metadata/JBossMessageDrivenBeanGenericWrapper.java	2008-04-11 07:12:16 UTC (rev 72000)
+++ projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/metadata/JBossMessageDrivenBeanGenericWrapper.java	2008-04-11 08:04:37 UTC (rev 72001)
@@ -80,7 +80,7 @@
  * Create a wrapper around a JBossGenericBeanMetaData for MDB meta data.
  *
  * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
- * @version $Revision: $
+ * @version $Revision$
  */
 @Deprecated
 public class JBossMessageDrivenBeanGenericWrapper extends JBossMessageDrivenBeanMetaData

Modified: projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/metadata/jpa/spec/PersistenceUnitMetaData.java
===================================================================
--- projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/metadata/jpa/spec/PersistenceUnitMetaData.java	2008-04-11 07:12:16 UTC (rev 72000)
+++ projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/metadata/jpa/spec/PersistenceUnitMetaData.java	2008-04-11 08:04:37 UTC (rev 72001)
@@ -31,7 +31,7 @@
  * A wrapper around Hibernate's PersistenceMetadata.
  *
  * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
- * @version $Revision: $
+ * @version $Revision$
  */
 public class PersistenceUnitMetaData implements MappableMetaData, Serializable
 {

Modified: projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/metadata/jpa/spec/PersistenceUnitsMetaData.java
===================================================================
--- projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/metadata/jpa/spec/PersistenceUnitsMetaData.java	2008-04-11 07:12:16 UTC (rev 72000)
+++ projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/metadata/jpa/spec/PersistenceUnitsMetaData.java	2008-04-11 08:04:37 UTC (rev 72001)
@@ -33,7 +33,7 @@
  * Currently a wrapper around the Hibernate metadata.
  *
  * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
- * @version $Revision: $
+ * @version $Revision$
  */
 public class PersistenceUnitsMetaData extends AbstractMappedMetaData<PersistenceUnitMetaData>
 {

Modified: projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/protocol/jarjar/Handler.java
===================================================================
--- projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/protocol/jarjar/Handler.java	2008-04-11 07:12:16 UTC (rev 72000)
+++ projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/protocol/jarjar/Handler.java	2008-04-11 08:04:37 UTC (rev 72001)
@@ -37,7 +37,7 @@
  *
  * @see javax.persistence.spi.PersistenceUnitInfo#getPersistenceUnitRootUrl()
  * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
- * @version $Revision: $
+ * @version $Revision$
  */
 public class Handler extends URLStreamHandler
 {

Modified: projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/protocol/jarjar/JarJarInputStream.java
===================================================================
--- projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/protocol/jarjar/JarJarInputStream.java	2008-04-11 07:12:16 UTC (rev 72000)
+++ projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/protocol/jarjar/JarJarInputStream.java	2008-04-11 08:04:37 UTC (rev 72001)
@@ -40,7 +40,7 @@
  * using a subset of a jar file.
  *
  * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
- * @version $Revision: $
+ * @version $Revision$
  */
 public class JarJarInputStream extends InputStream
 {

Modified: projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/protocol/jarjar/JarJarURLConnection.java
===================================================================
--- projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/protocol/jarjar/JarJarURLConnection.java	2008-04-11 07:12:16 UTC (rev 72000)
+++ projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/protocol/jarjar/JarJarURLConnection.java	2008-04-11 08:04:37 UTC (rev 72001)
@@ -35,7 +35,7 @@
  * Connect to a jarjar.
  *
  * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
- * @version $Revision: $
+ * @version $Revision$
  */
 public class JarJarURLConnection extends URLConnection
 {

Modified: projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/service/BaseServiceProxyFactory.java
===================================================================
--- projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/service/BaseServiceProxyFactory.java	2008-04-11 07:12:16 UTC (rev 72000)
+++ projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/service/BaseServiceProxyFactory.java	2008-04-11 08:04:37 UTC (rev 72001)
@@ -24,7 +24,6 @@
 import java.lang.reflect.Constructor;
 import java.lang.reflect.InvocationHandler;
 
-import javax.naming.Context;
 import javax.naming.NamingException;
 
 import org.jboss.ejb3.ProxyFactory;
@@ -54,22 +53,22 @@
       throw new UnsupportedOperationException("service can't have a home interface");
    }
    
-   public Object createProxy(Object id)
+   public Object createProxyBusiness(Object id)
    {
       if(id != null)
          throw new IllegalArgumentException("service proxy must not have an id");
-      return createProxy();
+      return createProxyBusiness();
    }
    
    public void start() throws Exception
    {
-      Class[] interfaces = getInterfaces();
+      Class<?>[] interfaces = getInterfaces();
       Class<?> proxyClass = java.lang.reflect.Proxy.getProxyClass(container.getBeanClass().getClassLoader(), interfaces);
       proxyConstructor = proxyClass.getConstructor(InvocationHandler.class);
 
       try
       {
-         Util.rebind(container.getInitialContext(), jndiName, createProxy());
+         Util.rebind(container.getInitialContext(), jndiName, createProxyBusiness());
       } catch (NamingException e)
       {
          NamingException namingException = new NamingException("Could not bind service proxy factory for EJB container with ejb name " + container.getEjbName() + " into JNDI under jndiName: " + container.getInitialContext().getNameInNamespace() + "/" + jndiName);
@@ -83,7 +82,7 @@
       Util.unbind(container.getInitialContext(), jndiName);
    }
 
-   protected abstract Class[] getInterfaces();
+   protected abstract Class<?>[] getInterfaces();
 
    protected final void initializeJndiName() {};
 }

Modified: projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/service/ServiceBeanContext.java
===================================================================
--- projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/service/ServiceBeanContext.java	2008-04-11 07:12:16 UTC (rev 72000)
+++ projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/service/ServiceBeanContext.java	2008-04-11 08:04:37 UTC (rev 72001)
@@ -21,6 +21,8 @@
  */
 package org.jboss.ejb3.service;
 
+import javax.ejb.EJBContext;
+
 import org.jboss.ejb3.session.SessionBeanContext;
 import org.jboss.ejb3.session.SessionContainer;
 
@@ -39,4 +41,11 @@
    {
 
    }
+
+   @Override
+   public EJBContext getEJBContext()
+   {
+      // TODO Auto-generated method stub
+      return null;
+   }
 }

Modified: projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/service/ServiceContainer.java
===================================================================
--- projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/service/ServiceContainer.java	2008-04-11 07:12:16 UTC (rev 72000)
+++ projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/service/ServiceContainer.java	2008-04-11 08:04:37 UTC (rev 72001)
@@ -123,13 +123,13 @@
    }
    
    @Override
-   protected ProxyFactory createProxyFactory(LocalBinding binding)
+   protected ProxyFactory getProxyFactory(LocalBinding binding)
    {
       return new ServiceLocalProxyFactory(this, binding);
    }
    
    @Override
-   protected RemoteProxyFactory createRemoteProxyFactory(RemoteBinding binding)
+   protected RemoteProxyFactory getProxyFactory(RemoteBinding binding)
    {
       // TODO Implement clustering
       return new ServiceRemoteProxyFactory(this, binding);
@@ -535,14 +535,14 @@
    {
       ServiceLocalProxyFactory factory = new ServiceLocalProxyFactory(this, binding);
 
-      return factory.createProxy(id);
+      return factory.createProxyBusiness(id);
    }
    
    public Object createRemoteProxy(Object id, RemoteBinding binding) throws Exception
    {
       ServiceRemoteProxyFactory factory = new ServiceRemoteProxyFactory(this, binding);
 
-      return factory.createProxy(id);
+      return factory.createProxyBusiness(id);
    }
 
    private void registerManagementInterface()

Modified: projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/service/ServiceDelegateWrapper.java
===================================================================
--- projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/service/ServiceDelegateWrapper.java	2008-04-11 07:12:16 UTC (rev 72000)
+++ projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/service/ServiceDelegateWrapper.java	2008-04-11 08:04:37 UTC (rev 72001)
@@ -27,7 +27,7 @@
  * Comment
  *
  * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
- * @version $Revision: $
+ * @version $Revision$
  */
 public class ServiceDelegateWrapper extends ContainerDelegateWrapper<ServiceContainer>
 {

Modified: projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/service/ServiceLocalProxyFactory.java
===================================================================
--- projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/service/ServiceLocalProxyFactory.java	2008-04-11 07:12:16 UTC (rev 72000)
+++ projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/service/ServiceLocalProxyFactory.java	2008-04-11 08:04:37 UTC (rev 72001)
@@ -57,7 +57,7 @@
       return uniqueInterfaces.toArray(new Class<?>[]{});
    }
 
-   public Object createProxy()
+   public Object createProxyBusiness()
    {
       try
       {

Modified: projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/service/ServiceRemoteProxyFactory.java
===================================================================
--- projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/service/ServiceRemoteProxyFactory.java	2008-04-11 07:12:16 UTC (rev 72000)
+++ projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/service/ServiceRemoteProxyFactory.java	2008-04-11 08:04:37 UTC (rev 72001)
@@ -78,7 +78,7 @@
       super.start();
    }
 
-   public Object createProxy()
+   public Object createProxyBusiness()
    {
       try
       {

Modified: projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/session/BaseSessionProxyFactory.java
===================================================================
--- projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/session/BaseSessionProxyFactory.java	2008-04-11 07:12:16 UTC (rev 72000)
+++ projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/session/BaseSessionProxyFactory.java	2008-04-11 08:04:37 UTC (rev 72001)
@@ -25,8 +25,13 @@
 import java.io.IOException;
 import java.io.ObjectInput;
 import java.io.ObjectOutput;
+import java.lang.reflect.Constructor;
+import java.lang.reflect.InvocationHandler;
+import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
+import java.util.Arrays;
 import java.util.HashSet;
+import java.util.List;
 import java.util.Set;
 
 import javax.ejb.EJBException;
@@ -39,15 +44,19 @@
 import javax.ejb.HomeHandle;
 import javax.ejb.Remote;
 import javax.ejb.RemoteHome;
+import javax.naming.NamingException;
 
 import org.jboss.ejb3.EJBContainer;
 import org.jboss.ejb3.Ejb3Registry;
+import org.jboss.ejb3.JBossProxy;
 import org.jboss.ejb3.ProxyFactory;
 import org.jboss.ejb3.ProxyFactoryHelper;
+import org.jboss.ejb3.SpecificationInterfaceType;
 import org.jboss.ejb3.annotation.RemoteBinding;
 import org.jboss.ejb3.proxy.EJBMetaDataImpl;
 import org.jboss.ejb3.proxy.handle.HomeHandleImpl;
 import org.jboss.logging.Logger;
+import org.jboss.util.naming.Util;
 
 /**
  * Comment
@@ -60,18 +69,29 @@
    @SuppressWarnings("unused")
    private static final Logger log = Logger.getLogger(BaseSessionProxyFactory.class);
    
-   private SessionContainer container;
+   private SessionSpecContainer container;
    protected String containerGuid;
    protected String containerClusterUid;
    protected boolean isClustered = false;
+   protected String jndiName;
    
+   /**
+    * Proxy Constructor for the Business Interfaces' Proxy
+    */
+   protected Constructor<?> businessProxyConstructor;
+   
+   /**
+    * Proxy Constructor for the EJBObject/EJBLocalObject Proxy
+    */
+   protected Constructor<?> ejb21ProxyConstructor; 
+   
    private static final String METHOD_PREFIX_EJB21_CREATE = "create";
    
    public BaseSessionProxyFactory()
    {
    }
    
-   protected BaseSessionProxyFactory(SessionContainer container)
+   protected BaseSessionProxyFactory(SessionSpecContainer container)
    {
       assert container != null : "container is null";
       
@@ -83,35 +103,282 @@
       throw new RuntimeException("NYI");
    }
    
-   protected void setContainer(SessionContainer container)
+   /**
+    * Creates the Proxy constructors
+    */
+   protected void createProxyConstructors() throws Exception
    {
+      // Obtain this bean class' CL
+      ClassLoader cl = this.getContainer().getBeanClass().getClassLoader();
+      
+      // Create business proxy constructor
+      Class<?>[] businessInterfaces = this.getInterfacesForBusinessProxy();
+      this.businessProxyConstructor = ProxyFactoryHelper.createProxyConstructor(businessInterfaces, cl);
+      
+      // Create EJB21 proxy constructor
+      Class<?>[] ejb21Interfaces = this.getInterfacesForEjb21Proxy();
+      if (ejb21Interfaces != null)
+      {
+         this.ejb21ProxyConstructor = ProxyFactoryHelper.createProxyConstructor(ejb21Interfaces, cl);
+      }
+         
+      
+      /* plain jdk 
+      Class<?> proxyClass = java.lang.reflect.Proxy.getProxyClass(getContainer().getBeanClass().getClassLoader(), interfaces);
+      final Class<?>[] constructorParams =
+              {InvocationHandler.class};
+      businessProxyConstructor = proxyClass.getConstructor(constructorParams);
+      
+      */
+      
+      /* javassist */
+      /*
+      proxyFactory = new javassist.util.proxy.ProxyFactory()
+      {
+         @Override
+         protected ClassLoader getClassLoader()
+         {
+            return container.getBeanClass().getClassLoader();
+         }
+      };
+      proxyFactory.setInterfaces(interfaces);
+      proxyFactory.setSuperclass(JavassistProxy.class);
+      proxyClass = proxyFactory.createClass();
+      proxyConstructor = proxyClass.getConstructor((Class[]) null);
+      */
+      
+      /* cglib */
+      /*
+      proxyClass = net.sf.cglib.proxy.Proxy.getProxyClass(container.getBeanClass().getClassLoader(), interfaces);
+      final Class[] constructorParams = {net.sf.cglib.proxy.InvocationHandler.class};
+      proxyConstructor = proxyClass.getConstructor(constructorParams);
+      */
+   }
+   
+   protected void bindProxy(Object proxy) throws NamingException
+   {
+      try
+      {
+         log.debug("Binding proxy for " + getContainer().getEjbName() + " in JNDI at " + this.getJndiName());
+         Util.rebind(getContainer().getInitialContext(), this.getJndiName(), proxy);
+      } catch (NamingException e)
+      {
+         NamingException namingException = new NamingException("Could not bind stateless proxy with ejb name "
+               + getContainer().getEjbName() + " into JNDI under jndiName: "
+               + getContainer().getInitialContext().getNameInNamespace() + "/" + this.getJndiName());
+         namingException.setRootCause(e);
+         throw namingException;
+      }
+   }
+   
+   protected Object constructProxyBusiness(InvocationHandler handler)
+   {
+      // Return
+      return this.constructProxy(handler, SpecificationInterfaceType.EJB30_BUSINESS);
+   }
+   
+   protected Object constructEjb21Proxy(InvocationHandler handler)
+   {
+      // Return
+      return this.constructProxy(handler, SpecificationInterfaceType.EJB21);
+   }
+   
+   /**
+    * Construct a new Proxy of the specified type using the 
+    * specified handler as argument to the Constructor
+    * 
+    * @param handler
+    * @param specType
+    * @return
+    */
+   protected Object constructProxy(final InvocationHandler handler, SpecificationInterfaceType specType)
+   {
+      // Initialize
+      Object obj = null;
+
+      try
+      {
+         // Business Proxy
+         if (specType.equals(SpecificationInterfaceType.EJB30_BUSINESS))
+         {
+            obj = this.businessProxyConstructor.newInstance(handler);
+         }
+         // EJBObject/EJBLocalObject
+         else if (specType.equals(SpecificationInterfaceType.EJB21))
+         {
+            // If there's no EJB21 View
+            if (this.ejb21ProxyConstructor == null)
+            {
+               throw new IllegalStateException(
+                     "EJB3 Specification Violation Section 4.3.3: \""
+                           + "Only session beans with a remote EJBObject / local EJBLocalObject interface can call this method.");
+            }
+
+            obj = this.ejb21ProxyConstructor.newInstance(handler);
+         }
+      }
+      catch (InstantiationException e)
+      {
+         throw new RuntimeException(e);
+      }
+      catch (IllegalAccessException e)
+      {
+         throw new RuntimeException(e);
+      }
+      catch (InvocationTargetException e)
+      {
+         Throwable t = e.getTargetException();
+         if (t instanceof RuntimeException)
+            throw (RuntimeException) t;
+         throw new RuntimeException(t);
+      }
+
+      // Ensure Proxy object was created
+      assert obj != null : "Proxy Object must not be null";
+
+      // Return
+      return obj;
+   }
+
+   
+   protected void setContainer(SessionSpecContainer container)
+   {
       this.container = container;
       this.containerGuid = Ejb3Registry.guid(container);
       this.containerClusterUid = Ejb3Registry.clusterUid(container);
       this.isClustered = container.isClustered();
    }
    
-   protected SessionContainer getContainer()
+   protected SessionSpecContainer getContainer()
    {
       if (container == null)
       {
-         container = (SessionContainer)Ejb3Registry.findContainer(containerGuid);
+         container = (SessionSpecContainer)Ejb3Registry.findContainer(containerGuid);
          
          if (container == null && isClustered)
-            container = (SessionContainer)Ejb3Registry.getClusterContainer(containerClusterUid);
+            container = (SessionSpecContainer)Ejb3Registry.getClusterContainer(containerClusterUid);
       }
       
       return container;
    }
    
+   /**
+    * Obtains interfaces to be used in the business proxy
+    * 
+    * @return
+    */
+   protected Class<?>[] getInterfacesForBusinessProxy()
+   {
+      return this.getInterfacesForProxy(this.getProxyAccessType(), SpecificationInterfaceType.EJB30_BUSINESS);
+   }
+   
+   /**
+    * Obtains interfaces to be used in the EJB21 proxy.  Returns null if none defined
+    * 
+    * @return
+    */
+   protected Class<?>[] getInterfacesForEjb21Proxy()
+   {
+      return this.getInterfacesForProxy(this.getProxyAccessType(), SpecificationInterfaceType.EJB21);
+   }
+   
+   /**
+    * Returns an array of interfaces to be used for the proxy;
+    * will return null if none are defined.
+    * 
+    * @param business
+    * @return
+    * @throws IllegalStateException If specified to use EJB21 View and no Remote/Local interfaces defined
+    */
+   private Class<?>[] getInterfacesForProxy(ProxyAccessType accessType, SpecificationInterfaceType specType)
+   {
+
+      // Initialize
+      Set<Class<?>> interfaces = new HashSet<Class<?>>();
+      SessionContainer container = this.getContainer();
+
+      // Initialize array of interfaces
+      Set<Class<?>> intfs = new HashSet<Class<?>>();
+
+      // If Local
+      if (accessType.equals(ProxyAccessType.LOCAL))
+      {
+
+         // If business
+         if (specType.equals(SpecificationInterfaceType.EJB30_BUSINESS))
+         {
+            intfs.addAll(Arrays.asList(ProxyFactoryHelper.getLocalBusinessInterfaces(container)));
+         }
+         // If EJBLocalObject
+         else
+         {
+            // Add local interfaces
+            intfs.addAll(Arrays.asList(ProxyFactoryHelper.getLocalInterfaces(container)));
+            
+            // If no interfaces
+            if (intfs.size() == 0)
+            {
+               return null;
+            }
+            
+            // Add EJBLocalObject
+            intfs.add(EJBLocalObject.class);
+         }
+      }
+      // If remote
+      else
+      {
+         // If business
+         if (specType.equals(SpecificationInterfaceType.EJB30_BUSINESS))
+         {
+            intfs.addAll(Arrays.asList(ProxyFactoryHelper.getRemoteBusinessInterfaces(container)));
+         }
+         // If EJBObject
+         else
+         {
+            // Add remote interfaces
+            intfs.addAll(Arrays.asList(ProxyFactoryHelper.getRemoteInterfaces(container)));
+            
+            // If no interfaces
+            if (intfs.size() == 0)
+            {
+               return null;
+            }
+            
+            // Add EJBObject
+            intfs.add(EJBObject.class);
+         }
+      }
+
+      // Add all interfaces
+      for (Class<?> interfaze : intfs)
+      {
+         interfaces.add(interfaze);
+      }
+
+      // Add JBossProxy
+      interfaces.add(JBossProxy.class);
+
+      // Return
+      return interfaces.toArray(new Class[]
+      {});
+   }
+   
+   /**
+    * Defines the access type for this Proxies created by this Factory
+    * 
+    * @return
+    */
+   protected abstract ProxyAccessType getProxyAccessType();
+   
    protected void setEjb21Objects(BaseSessionRemoteProxy proxy)
    {
-      proxy.setHandle(getHandle());
+      proxy.setHandle(this.createHandle());
       proxy.setHomeHandle(getHomeHandle());
       proxy.setEjbMetaData(getEjbMetaData());
    }
    
-   abstract protected Handle getHandle();
+   abstract protected Handle createHandle();
    
    protected HomeHandle getHomeHandle()
    {
@@ -126,6 +393,11 @@
       return homeHandle;
    }
    
+   protected final String getJndiName()
+   {
+      return this.jndiName;
+   }
+   
    protected EJBMetaData getEjbMetaData()
    {
       Class<?> remote = null;
@@ -297,9 +569,7 @@
       // Ensure EJB2.1 Home returns only local/remote interfaces
       this.validateHomeReturnsNoBusinessInterfaces(home);
    }
-   
-   
-   
+     
    /**
     * Validates that any EJB2.1 Views associated with this ProxyFactory 
     * are valid

Modified: projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/session/BaseSessionRemoteProxy.java
===================================================================
--- projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/session/BaseSessionRemoteProxy.java	2008-04-11 07:12:16 UTC (rev 72000)
+++ projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/session/BaseSessionRemoteProxy.java	2008-04-11 08:04:37 UTC (rev 72001)
@@ -58,6 +58,11 @@
    {
    }
    
+   public Handle getHandle()
+   {
+      return this.handle;
+   }
+   
    public void setHandle(Handle handle)
    {
       this.handle = handle;

Added: projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/session/ProxyAccessType.java
===================================================================
--- projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/session/ProxyAccessType.java	                        (rev 0)
+++ projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/session/ProxyAccessType.java	2008-04-11 08:04:37 UTC (rev 72001)
@@ -0,0 +1,32 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, 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.
+ */
+package org.jboss.ejb3.session;
+
+/**
+ * Defines access type (remote/local) for client view
+ * 
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+public enum ProxyAccessType {
+   REMOTE, LOCAL
+}

Modified: projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/session/ProxyDeployer.java
===================================================================
--- projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/session/ProxyDeployer.java	2008-04-11 07:12:16 UTC (rev 72000)
+++ projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/session/ProxyDeployer.java	2008-04-11 08:04:37 UTC (rev 72001)
@@ -23,7 +23,10 @@
 
 import java.lang.reflect.Constructor;
 import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
 import java.util.List;
+import java.util.Map;
 
 import org.jboss.ejb3.ProxyFactory;
 import org.jboss.ejb3.ProxyFactoryHelper;
@@ -47,7 +50,7 @@
 {
    private static final Logger log = Logger.getLogger(ProxyDeployer.class);
    private SessionContainer container;
-   private ArrayList<ProxyFactory> proxyFactories = new ArrayList<ProxyFactory>();
+   private Map<Object, ProxyFactory> proxyFactories = new HashMap<Object, ProxyFactory>();
    private RemoteBindings remoteBindings;
    private LocalBinding localBinding;
 
@@ -58,7 +61,15 @@
       this.container = container;
    }
 
-   public List<ProxyFactory> getProxyFactories() { return proxyFactories; }
+   public Map<Object, ProxyFactory> getProxyFactories()
+   {
+      return proxyFactories;
+   }
+   
+   public ProxyFactory getProxyFactory(Object key)
+   {
+      return this.getProxyFactories().get(key);
+   }
 
    public void start() throws Exception
    {
@@ -73,7 +84,7 @@
             String factoryImplementationRegistryKey = binding.factory();
             if (factoryImplementationRegistryKey.equals(RemoteBindingDefaults.PROXY_FACTORY_DEFAULT))
             {
-               factory = container.createRemoteProxyFactory(binding);
+               factory = container.getProxyFactory(binding);
             }
             else
             {
@@ -82,15 +93,15 @@
                factory = constructor.newInstance(container, binding);
             }
             factory.start();
-            proxyFactories.add(factory);
+            proxyFactories.put(binding,factory);
          }
       }
 
       if (localBinding != null)
       {
-         ProxyFactory factory = container.createProxyFactory(localBinding);
+         ProxyFactory factory = container.getProxyFactory(localBinding);
          factory.start();
-         proxyFactories.add(factory);
+         proxyFactories.put(localBinding,factory);
       }
    }
 
@@ -118,7 +129,7 @@
    
    public void initializeLocalBindingMetadata()
    {
-      localBinding = (LocalBinding) container.resolveAnnotation(LocalBinding.class);
+      localBinding = container.getAnnotation(LocalBinding.class);
       if (localBinding == null)
       {
          if (ProxyFactoryHelper.getLocalAndBusinessLocalInterfaces(container).length > 0)
@@ -141,10 +152,10 @@
    
    public void initializeRemoteBindingMetadata()
    {
-      remoteBindings = (RemoteBindings) container.resolveAnnotation(RemoteBindings.class);
+      remoteBindings = container.getAnnotation(RemoteBindings.class);
       if (remoteBindings == null)
       {
-         RemoteBinding binding = (RemoteBinding) container.resolveAnnotation(RemoteBinding.class);
+         RemoteBinding binding = container.getAnnotation(RemoteBinding.class);
          if (binding == null)
          {
             log.debug("no declared remote bindings for : " + container.getEjbName());
@@ -180,9 +191,10 @@
 
    public void stop() throws Exception
    {
-      for (int i = 0; i < proxyFactories.size(); i++)
+      // Stop all proxy factories
+      Collection<ProxyFactory> proxyFactories = this.getProxyFactories().values();
+      for(ProxyFactory factory : proxyFactories)
       {
-         ProxyFactory factory = (ProxyFactory) proxyFactories.get(i);
          factory.stop();
       }
    }

Modified: projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/session/SessionBeanContext.java
===================================================================
--- projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/session/SessionBeanContext.java	2008-04-11 07:12:16 UTC (rev 72000)
+++ projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/session/SessionBeanContext.java	2008-04-11 08:04:37 UTC (rev 72001)
@@ -29,9 +29,9 @@
  * An instance of an enterprise bean link to its container.
  *
  * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
- * @version $Revision: $
+ * @version $Revision$
  */
-public abstract class SessionBeanContext extends BaseContext<SessionContainer>
+public abstract class SessionBeanContext<T extends SessionContainer> extends BaseContext<T>
 {
    protected EJBContext ejbContext;
 
@@ -39,24 +39,16 @@
     * Must not break getInstance post condition!
     * @param container
     */
-   protected SessionBeanContext(SessionContainer container)
+   protected SessionBeanContext(T container)
    {
       super(container);
    }
    
-   protected SessionBeanContext(SessionContainer container, Object bean)
+   protected SessionBeanContext(T container, Object bean)
    {
       super(container, bean);
    }
    
-   public EJBContext getEJBContext()
-   {
-      if (ejbContext == null)
-      {
-         SessionContextImpl bsc = new SessionContextImpl(this);
-         ejbContext = bsc;
-      }
-      return ejbContext;
-   }
+   public abstract EJBContext getEJBContext();
 
 }

Modified: projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/session/SessionContainer.java
===================================================================
--- projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/session/SessionContainer.java	2008-04-11 07:12:16 UTC (rev 72000)
+++ projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/session/SessionContainer.java	2008-04-11 08:04:37 UTC (rev 72001)
@@ -88,35 +88,14 @@
    }
    
    /**
-    * @param id
-    * @return
-    * @throws Exception
-    * @deprecated       the binding on which this proxy is bound is unspecified
-    */
-   public Object createLocalProxy(Object id) throws Exception
-   {
-      LocalBinding binding = getAnnotation(LocalBinding.class);
-      return createLocalProxy(id, binding);
-   }
-   
-   /**
-    * Create a local proxy for an enterprise bean identified by id on a given binding.
+    * Returns a remote binding for this container
     * 
-    * @param id             the identifier of the enterprise bean (null for stateless)
-    * @param binding        the binding of the proxy
-    * @return               a proxy to an enterprise bean
-    * @throws Exception
-    */
-   public abstract Object createLocalProxy(Object id, LocalBinding binding) throws Exception;
-   
-   /**
-    * @param id
+    * @deprecated Non-deterministic, more than one binding may be specified 
+    * for this container
     * @return
-    * @throws Exception
-    * @deprecated       the binding on which this proxy is bound is unspecified
     */
    @Deprecated
-   public Object createRemoteProxy(Object id) throws Exception
+   protected RemoteBinding getRemoteBinding()
    {
       RemoteBinding binding = null;
       RemoteBindings bindings = getAnnotation(RemoteBindings.class);
@@ -125,17 +104,8 @@
       else
          binding = getAnnotation(RemoteBinding.class);
       
-      return createRemoteProxy(id, binding);
+      return binding;
    }
-   /**
-    * Create a remote proxy for an enterprise bean identified by id on a given binding.
-    * 
-    * @param id             the identifier of the enterprise bean (null for stateless)
-    * @param binding        the binding of the proxy
-    * @return               a proxy to an enterprise bean
-    * @throws Exception
-    */
-   public abstract Object createRemoteProxy(Object id, RemoteBinding binding) throws Exception;
 
    protected ThreadLocalStack<InvokedMethod> invokedMethod = new ThreadLocalStack<InvokedMethod>();
 
@@ -150,17 +120,15 @@
     * Create a local proxy factory.
     * @return
     */
-   protected abstract ProxyFactory createProxyFactory(LocalBinding binding);
+   protected abstract ProxyFactory getProxyFactory(LocalBinding binding);
    
    /**
     * Create a remote proxy factory on the given binding.
     * 
-    * The jndiBinding is set to a value, the factory is set to it's default value.
-    * 
     * @param binding
     * @return
     */
-   protected abstract RemoteProxyFactory createRemoteProxyFactory(RemoteBinding binding);
+   protected abstract RemoteProxyFactory getProxyFactory(RemoteBinding binding);
    
    public abstract InvocationResponse dynamicInvoke(Object target, Invocation invocation) throws Throwable;
    
@@ -247,7 +215,7 @@
       }
       catch (Exception ignore)
       {
-         log.trace("Proxy deployer stop failed", ignore);
+         log.debug("Proxy deployer stop failed", ignore);
       }
       try
       {
@@ -255,7 +223,7 @@
       }
       catch (Exception ignore)
       {
-         log.trace("Dispatcher unregister target failed", ignore);
+         log.debug("Dispatcher unregister target failed", ignore);
       }
       super.stop();
    }
@@ -474,7 +442,7 @@
       Method unadvisedMethod = info.getUnadvisedMethod();
       if (unadvisedMethod.getName().equals("create"))
       {
-         Class[] initParameterTypes = {};
+         Class<?>[] initParameterTypes = {};
          Object[] initParameterValues = {};
          if (unadvisedMethod.getParameterTypes().length > 0)
          {
@@ -484,7 +452,7 @@
 
          Object id = createSession(initParameterTypes, initParameterValues);
          
-         Object proxy = factory.createProxy(id);
+         Object proxy = factory.createProxyBusiness(id);
 
          return proxy;
       }
@@ -510,7 +478,7 @@
     * @param initParameterValues    the arguments for the home's create method
     * @return   the identifier of the session
     */
-   abstract public Object createSession(Class initParameterTypes[], Object initParameterValues[]);
+   abstract public Object createSession(Class<?> initParameterTypes[], Object initParameterValues[]);
    
    abstract public Object localInvoke(Object id, Method method, Object[] args, FutureHolder provider) throws Throwable;
    
@@ -518,7 +486,7 @@
    
    public Object createSession()
    {
-      return createSession(null, null);
+      return createSession(new Class<?>[]{}, new Object[]{});
    }
    
    /**

Copied: projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/session/SessionContextDelegateBase.java (from rev 71910, projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/session/SessionContextImpl.java)
===================================================================
--- projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/session/SessionContextDelegateBase.java	                        (rev 0)
+++ projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/session/SessionContextDelegateBase.java	2008-04-11 08:04:37 UTC (rev 72001)
@@ -0,0 +1,86 @@
+/*
+ * 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.
+ */
+package org.jboss.ejb3.session;
+
+import javax.ejb.EJBLocalObject;
+import javax.ejb.EJBObject;
+import javax.ejb.SessionContext;
+import javax.xml.rpc.handler.MessageContext;
+
+import org.jboss.ejb3.EJBContextImpl;
+import org.jboss.ejb3.stateless.StatelessBeanContext;
+import org.jboss.logging.Logger;
+
+/**
+ * Comment
+ *
+ * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
+ * @version $Revision$
+ */
+public abstract class SessionContextDelegateBase<J extends SessionContainer> extends EJBContextImpl<J, SessionBeanContext<J>>
+      implements
+         SessionContext
+{
+   // Class Members
+   @SuppressWarnings("unused")
+   private static final Logger log = Logger.getLogger(SessionContextDelegateBase.class);
+   
+   // Constructor
+   public SessionContextDelegateBase(SessionBeanContext<J> beanContext)
+   {
+      super(beanContext);
+   }
+   
+   // Specifications
+   
+   public abstract EJBLocalObject getEJBLocalObject() throws IllegalStateException;
+   
+   public abstract EJBObject getEJBObject() throws IllegalStateException;
+   
+   // Implementations
+   
+   public <T> T getBusinessObject(Class<T> businessInterface) throws IllegalStateException
+   {
+      if(businessInterface == null)
+         throw new IllegalStateException("businessInterface is null");
+      
+      return container.getBusinessObject(beanContext, businessInterface); 
+   }
+   
+   public Class<?> getInvokedBusinessInterface() throws IllegalStateException
+   {
+      return container.getInvokedBusinessInterface();
+   }
+   
+   public MessageContext getMessageContext() throws IllegalStateException
+   {
+      // disallowed for stateful session beans (EJB3 FR 4.4.1 p 81)
+      if(beanContext instanceof StatelessBeanContext)
+      {
+         MessageContext ctx = ((StatelessBeanContext) beanContext).getMessageContextJAXRPC();
+         if(ctx == null)
+            throw new IllegalStateException("No message context found");
+         return ctx;
+      }
+      throw new UnsupportedOperationException("Only stateless beans can have a message context");
+   }
+}


Property changes on: projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/session/SessionContextDelegateBase.java
___________________________________________________________________
Name: svn:keywords
   + Author Date Id Revision
Name: svn:eol-style
   + native

Deleted: projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/session/SessionContextImpl.java
===================================================================
--- projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/session/SessionContextImpl.java	2008-04-11 07:12:16 UTC (rev 72000)
+++ projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/session/SessionContextImpl.java	2008-04-11 08:04:37 UTC (rev 72001)
@@ -1,129 +0,0 @@
-/*
- * 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.
- */
-package org.jboss.ejb3.session;
-
-import javax.ejb.EJBLocalObject;
-import javax.ejb.EJBObject;
-import javax.ejb.SessionContext;
-import javax.xml.rpc.handler.MessageContext;
-
-import org.jboss.ejb3.EJBContextImpl;
-import org.jboss.ejb3.stateless.StatelessBeanContext;
-import org.jboss.logging.Logger;
-
-/**
- * Comment
- *
- * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
- * @version $Revision$
- */
-public class SessionContextImpl extends EJBContextImpl<SessionContainer, SessionBeanContext> implements SessionContext
-{
-   @SuppressWarnings("unused")
-   private static final Logger log = Logger.getLogger(SessionContextImpl.class);
-   
-   public SessionContextImpl(SessionBeanContext beanContext)
-   {
-      super(beanContext);
-   }
-   
-   public <T> T getBusinessObject(Class<T> businessInterface) throws IllegalStateException
-   {
-      if(businessInterface == null)
-         throw new IllegalStateException("businessInterface is null");
-      
-      return container.getBusinessObject(beanContext, businessInterface); 
-   }
-   
-   public EJBLocalObject getEJBLocalObject() throws IllegalStateException
-   {
-      try
-      {
-         Object id = beanContext.getId();
-         EJBLocalObject proxy = null;
-         try
-         {
-            proxy = (EJBLocalObject) container.createLocalProxy(id);
-         }
-         // Proxy does not implement EJBLocalObject
-         catch (ClassCastException cce)
-         {
-            // JIRA EJBTHREE-1057
-            throw new IllegalStateException("EJB3 Specification Violation: " + container.getBeanClassName()
-                  + " does not have a local interface; "
-                  + "EJB3 Spec 4.3.3 Bullet 12: Only session beans with a local EJBLocalObject interface "
-                  + "can call this method.");
-
-         }
-         return proxy;
-      }
-      catch (Exception e)
-      {
-         throw new IllegalStateException(e);
-      }
-   }
-
-   public EJBObject getEJBObject() throws IllegalStateException
-   {
-      try
-      {
-         Object id = beanContext.getId();
-         EJBObject proxy = null;
-         try
-         {
-            proxy = (EJBObject) container.createRemoteProxy(id);
-         }
-         // Proxy does not implement EJBObject
-         catch (ClassCastException cce)
-         {
-            // JIRA EJBTHREE-1057
-            throw new IllegalStateException("EJB3 Specification Violation: " + container.getBeanClassName()
-                  + " does not have a remote interface; "
-                  + "EJB3 Spec 4.3.3 Bullet 10: Only session beans with a remote EJBObject interface "
-                  + "can call this method.");
-         }
-         return proxy;
-      }
-      catch (Exception e)
-      {
-         throw new IllegalStateException(e);
-      }
-   }
-   
-   public Class getInvokedBusinessInterface() throws IllegalStateException
-   {
-      return container.getInvokedBusinessInterface();
-   }
-   
-   public MessageContext getMessageContext() throws IllegalStateException
-   {
-      // disallowed for stateful session beans (EJB3 FR 4.4.1 p 81)
-      if(beanContext instanceof StatelessBeanContext)
-      {
-         MessageContext ctx = ((StatelessBeanContext) beanContext).getMessageContextJAXRPC();
-         if(ctx == null)
-            throw new IllegalStateException("No message context found");
-         return ctx;
-      }
-      throw new UnsupportedOperationException("Only stateless beans can have a message context");
-   }
-}

Added: projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/session/SessionSpecBeanContext.java
===================================================================
--- projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/session/SessionSpecBeanContext.java	                        (rev 0)
+++ projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/session/SessionSpecBeanContext.java	2008-04-11 08:04:37 UTC (rev 72001)
@@ -0,0 +1,45 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, 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.ejb3.session;
+
+/**
+ * Context for Session Beans adhering to EJB3 Specification (SFSB, SLSB)
+ * 
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+public abstract class SessionSpecBeanContext<T extends SessionSpecContainer>
+      extends
+         SessionBeanContext<T>
+{
+
+   protected SessionSpecBeanContext(T container)
+   {
+      super(container);
+   }
+
+   protected SessionSpecBeanContext(T container, Object bean)
+   {
+      super(container, bean);
+   }
+
+}

Added: projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/session/SessionSpecContainer.java
===================================================================
--- projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/session/SessionSpecContainer.java	                        (rev 0)
+++ projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/session/SessionSpecContainer.java	2008-04-11 08:04:37 UTC (rev 72001)
@@ -0,0 +1,77 @@
+package org.jboss.ejb3.session;
+
+import java.util.Hashtable;
+
+import org.jboss.aop.Domain;
+import org.jboss.ejb3.Ejb3Deployment;
+import org.jboss.ejb3.annotation.LocalBinding;
+import org.jboss.ejb3.annotation.RemoteBinding;
+import org.jboss.metadata.ejb.jboss.JBossSessionBeanMetaData;
+
+/**
+ * SessionSpecContainer
+ * 
+ * A SessionContainer with support for Session Beans defined 
+ * specifically by the EJB3 Specification
+ * 
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+public abstract class SessionSpecContainer extends SessionContainer
+{
+   
+   // Constructor
+   
+   public SessionSpecContainer(ClassLoader cl, String beanClassName, String ejbName, Domain domain,
+         Hashtable ctxProperties, Ejb3Deployment deployment, JBossSessionBeanMetaData beanMetaData)
+         throws ClassNotFoundException
+   {
+      super(cl, beanClassName, ejbName, domain, ctxProperties, deployment, beanMetaData);
+   }
+   
+   /**
+    * Create a remote proxy (EJBObject) for an enterprise bean identified by id
+    * 
+    * @param id
+    * @return
+    * @throws Exception
+    */
+   public Object createProxyRemoteEjb21() throws Exception
+   {
+      RemoteBinding binding = this.getRemoteBinding();
+      return this.createProxyRemoteEjb21(binding);
+   }
+   
+   /**
+    * Create a remote proxy (EJBObject) for an enterprise bean identified by id on a given binding
+    * 
+    * @param id
+    * @param binding
+    * @return
+    * @throws Exception
+    */
+   public abstract Object createProxyRemoteEjb21(RemoteBinding binding) throws Exception;
+   
+   /**
+    * Create a local proxy (EJBLocalObject) for an enterprise bean identified by id
+    * 
+    * @param id
+    * @return
+    * @throws Exception
+    */
+   public Object createProxyLocalEjb21() throws Exception
+   {
+      LocalBinding binding = this.getAnnotation(LocalBinding.class);
+      return this.createProxyLocalEjb21(binding);
+   }
+   
+   /**
+    * Create a local proxy (EJBLocalObject) for an enterprise bean identified by id, with
+    * the specified LocalBinding
+    * 
+    * @param id
+    * @return
+    * @throws Exception
+    */
+   public abstract Object createProxyLocalEjb21(LocalBinding binding) throws Exception;
+}

Modified: projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/stateful/BaseStatefulProxyFactory.java
===================================================================
--- projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/stateful/BaseStatefulProxyFactory.java	2008-04-11 07:12:16 UTC (rev 72000)
+++ projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/stateful/BaseStatefulProxyFactory.java	2008-04-11 08:04:37 UTC (rev 72001)
@@ -24,15 +24,7 @@
 import java.io.IOException;
 import java.io.ObjectInput;
 import java.io.ObjectOutput;
-import java.lang.reflect.Constructor;
-import java.lang.reflect.InvocationHandler;
-import java.lang.reflect.InvocationTargetException;
-import java.util.Arrays;
-import java.util.HashSet;
-import java.util.Set;
 
-import javax.ejb.EJBLocalObject;
-import javax.ejb.EJBObject;
 import javax.naming.Context;
 import javax.naming.Name;
 import javax.naming.NamingException;
@@ -40,12 +32,10 @@
 import javax.naming.Reference;
 import javax.naming.StringRefAddr;
 
-import org.jboss.ejb3.JBossProxy;
 import org.jboss.ejb3.JndiProxyFactory;
 import org.jboss.ejb3.ProxyFactory;
-import org.jboss.ejb3.ProxyFactoryHelper;
-import org.jboss.ejb3.SpecificationInterfaceType;
-import org.jboss.ejb3.session.SessionContainer;
+import org.jboss.ejb3.session.BaseSessionProxyFactory;
+import org.jboss.ejb3.session.SessionSpecContainer;
 import org.jboss.logging.Logger;
 import org.jboss.util.naming.Util;
 
@@ -55,32 +45,13 @@
  * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
  * @version $Revision$
  */
-public abstract class BaseStatefulProxyFactory extends org.jboss.ejb3.session.BaseSessionProxyFactory implements ProxyFactory
+public abstract class BaseStatefulProxyFactory extends BaseSessionProxyFactory implements ProxyFactory
 {
    // Class Members
    
    @SuppressWarnings("unused")
    private static final Logger log = Logger.getLogger(BaseStatefulProxyFactory.class);
-   
-   protected static enum ProxyAccessType{
-      REMOTE,LOCAL;
-   }
 
-//   protected Class proxyClass;
-   
-   /**
-    * Proxy Constructor for the Business Interfaces' Proxy
-    */
-   private Constructor<?> businessProxyConstructor;
-   
-   /**
-    * Proxy Constructor for the EJBObject/EJBLocalObject Proxy
-    */
-   private Constructor<?> ejb21ProxyConstructor; 
-   
-//   protected Context proxyFactoryContext;
-   protected String jndiName;
-
    public static final String PROXY_FACTORY_NAME = "StatefulProxyFactory";
    
    /**
@@ -91,7 +62,7 @@
       super();
    }
 
-   public BaseStatefulProxyFactory(SessionContainer container, String jndiName)
+   public BaseStatefulProxyFactory(SessionSpecContainer container, String jndiName)
    {
       super(container);
       
@@ -100,68 +71,6 @@
       this.jndiName = jndiName;
    }
    
-   protected Object constructBusinessProxy(InvocationHandler handler)
-   {
-      // Return
-      return this.constructProxy(handler, SpecificationInterfaceType.EJB30_BUSINESS);
-   }
-   
-   protected Object constructEjb21Proxy(InvocationHandler handler)
-   {
-      // Return
-      return this.constructProxy(handler, SpecificationInterfaceType.EJB21);
-   }
-   
-   /**
-    * Construct a new Proxy of the specified type using the 
-    * specified handler as argument to the Constructor
-    * 
-    * @param handler
-    * @param specType
-    * @return
-    */
-   private Object constructProxy(InvocationHandler handler, SpecificationInterfaceType specType)
-   {
-      // Initialize
-      Object obj = null;
-
-      try
-      {
-         // Business Proxy
-         if (specType.equals(SpecificationInterfaceType.EJB30_BUSINESS))
-         {
-            obj = this.businessProxyConstructor.newInstance(handler);
-         }
-         // EJBObject/EJBLocalObject
-         else if (specType.equals(SpecificationInterfaceType.EJB21))
-         {
-            obj = this.ejb21ProxyConstructor.newInstance(handler);
-         }
-      }
-      catch (InstantiationException e)
-      {
-         throw new RuntimeException(e);
-      }
-      catch (IllegalAccessException e)
-      {
-         throw new RuntimeException(e);
-      }
-      catch (InvocationTargetException e)
-      {
-         Throwable t = e.getTargetException();
-         if (t instanceof RuntimeException)
-            throw (RuntimeException) t;
-         throw new RuntimeException(t);
-      }
-
-      // Ensure Proxy object was created
-      assert obj != null : "Proxy Object must not be null";
-
-      // Return
-      return obj;
-   }
-
-   
    public void init() throws Exception
    {
       // Ensure EJB2.1 View is Complete
@@ -169,44 +78,25 @@
       
       // Create the Proxy Constructors
       this.createProxyConstructors();
-   }
-   
-   /**
-    * Creates the Proxy constructors
-    */
-   protected void createProxyConstructors() throws Exception
-   {
-      // Obtain interfaces to be used in the proxies
-      Class<?>[] businessInterfaces = this.getInterfacesForBusinessProxy();
-      Class<?>[] ejb21Interfaces = this.getInterfacesForEjb21Proxy();
-      
-      // Obtain this bean class' CL
-      ClassLoader cl = this.getContainer().getBeanClass().getClassLoader();
-      
-      // Create proxy classes
-      Class<?> businessProxyClass = java.lang.reflect.Proxy.getProxyClass(cl, businessInterfaces);
-      Class<?> ejb21ProxyClass = java.lang.reflect.Proxy.getProxyClass(cl, ejb21Interfaces);
-      
-      // Obtain and set the proxy constructors 
-      this.businessProxyConstructor = businessProxyClass.getConstructor(InvocationHandler.class);
-      this.ejb21ProxyConstructor = ejb21ProxyClass.getConstructor(InvocationHandler.class);
-   }
+   }   
 
    public void start() throws Exception
    {
-      init();
-
+      this.init();
+      
+      // Bind the Proxy Factory
       Context ctx = getContainer().getInitialContext();
       Name name = ctx.getNameParser("").parse(jndiName);
       ctx = Util.createSubcontext(ctx, name.getPrefix(name.size() - 1));
       String atom = name.get(name.size() - 1);
       RefAddr refAddr = new StringRefAddr(JndiProxyFactory.FACTORY, jndiName + PROXY_FACTORY_NAME);
-      Reference ref = new Reference("java.lang.Object", refAddr, JndiProxyFactory.class.getName(), null);
-      try 
+      Reference ref = new Reference(Object.class.getName(), refAddr, JndiProxyFactory.class.getName(), null);
+      try
       {
          log.debug("Binding reference for " + getContainer().getEjbName() + " in JNDI at " + atom);
          Util.rebind(ctx, atom, ref);
-      } catch (NamingException e)
+      }
+      catch (NamingException e)
       {
          NamingException namingException = new NamingException("Could not bind stateful proxy with ejb name "
                + getContainer().getEjbName() + " into JNDI under jndiName: " + ctx.getNameInNamespace() + "/" + atom);
@@ -214,107 +104,11 @@
          throw namingException;
       }
    }
-   
-   /**
-    * Obtains interfaces to be used in the business proxy
-    * 
-    * @return
-    */
-   protected Class<?>[] getInterfacesForBusinessProxy()
-   {
-      return this.getInterfacesForProxy(this.getProxyAccessType(), SpecificationInterfaceType.EJB30_BUSINESS);
-   }
-   
-   /**
-    * Obtains interfaces to be used in the EJB21 proxy
-    * 
-    * @return
-    */
-   protected Class<?>[] getInterfacesForEjb21Proxy()
-   {
-      return this.getInterfacesForProxy(this.getProxyAccessType(), SpecificationInterfaceType.EJB21);
-   }
-   
-   /**
-    * Returns an array of interfaces to be used for the proxy;
-    * the proxy type will be dependent on 
-    * 
-    * @param business
-    * @return
-    */
-   private Class<?>[] getInterfacesForProxy(ProxyAccessType accessType, SpecificationInterfaceType specType)
-   {
 
-      // Initialize
-      Set<Class<?>> interfaces = new HashSet<Class<?>>();
-      SessionContainer container = this.getContainer();
-
-      // Initialize array of interfaces
-      Set<Class<?>> intfs = new HashSet<Class<?>>();
-
-      // If Local
-      if (accessType.equals(ProxyAccessType.LOCAL))
-      {
-
-         // If business
-         if (specType.equals(SpecificationInterfaceType.EJB30_BUSINESS))
-         {
-            intfs.addAll(Arrays.asList(ProxyFactoryHelper.getLocalBusinessInterfaces(container)));
-         }
-         // If EJBLocalObject
-         else
-         {
-            // Add local interfaces
-            intfs.addAll(Arrays.asList(ProxyFactoryHelper.getLocalInterfaces(container)));
-            
-            // Add EJBLocalObject
-            intfs.add(EJBLocalObject.class);
-         }
-      }
-      // If remote
-      else
-      {
-         // If business
-         if (specType.equals(SpecificationInterfaceType.EJB30_BUSINESS))
-         {
-            intfs.addAll(Arrays.asList(ProxyFactoryHelper.getRemoteBusinessInterfaces(container)));
-         }
-         // If EJBObject
-         else
-         {
-            // Add remote interfaces
-            intfs.addAll(Arrays.asList(ProxyFactoryHelper.getRemoteInterfaces(container)));
-            
-            // Add EJBObject
-            intfs.add(EJBObject.class);
-         }
-      }
-
-      // Add all interfaces
-      for (Class<?> interfaze : intfs)
-      {
-         interfaces.add(interfaze);
-      }
-
-      // Add JBossProxy
-      interfaces.add(JBossProxy.class);
-
-      // Return
-      return interfaces.toArray(new Class[]
-      {});
-   }
-
    public void stop() throws Exception
    {
       Util.unbind(getContainer().getInitialContext(), jndiName);
    }
-   
-   /**
-    * Defines the access type for this Proxies created by this Factory
-    * 
-    * @return
-    */
-   protected abstract ProxyAccessType getProxyAccessType();
 
    protected final void initializeJndiName() {};
    

Added: projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/stateful/BaseStatefulRemoteProxyFactory.java
===================================================================
--- projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/stateful/BaseStatefulRemoteProxyFactory.java	                        (rev 0)
+++ projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/stateful/BaseStatefulRemoteProxyFactory.java	2008-04-11 08:04:37 UTC (rev 72001)
@@ -0,0 +1,164 @@
+package org.jboss.ejb3.stateful;
+
+import javax.ejb.EJBObject;
+import javax.ejb.RemoteHome;
+
+import org.jboss.aop.AspectManager;
+import org.jboss.aop.advice.AdviceStack;
+import org.jboss.ejb3.ProxyFactoryHelper;
+import org.jboss.ejb3.SpecificationInterfaceType;
+import org.jboss.ejb3.annotation.RemoteBinding;
+import org.jboss.ejb3.remoting.RemoteProxyFactory;
+import org.jboss.ejb3.session.ProxyAccessType;
+import org.jboss.ejb3.session.SessionContainer;
+import org.jboss.ejb3.session.SessionSpecContainer;
+import org.jboss.logging.Logger;
+import org.jboss.remoting.InvokerLocator;
+
+public abstract class BaseStatefulRemoteProxyFactory extends BaseStatefulProxyFactory implements RemoteProxyFactory
+{
+   // Class Members
+   
+   private static final Logger log = Logger.getLogger(BaseStatefulRemoteProxyFactory.class);
+   
+   // Instance Members
+   
+   private RemoteBinding binding;
+   
+   private InvokerLocator locator;
+   
+   // Constructor
+   public BaseStatefulRemoteProxyFactory(SessionSpecContainer container, RemoteBinding binding)
+   {
+      super(container, binding.jndiBinding());
+      
+      this.binding = binding;
+      
+      try
+      {
+         String clientBindUrl = ProxyFactoryHelper.getClientBindUrl(this.getBinding());
+         this.locator = new InvokerLocator(clientBindUrl);
+      }
+      catch (Exception e)
+      {
+         throw new RuntimeException(e);
+      }
+   }
+   
+   // Required Implementations
+
+   @Override
+   protected ProxyAccessType getProxyAccessType()
+   {
+      return ProxyAccessType.REMOTE;
+   }
+
+   @Override
+   protected void validateEjb21Views()
+   {
+      // Obtain Container
+      SessionContainer container = this.getContainer();
+      
+      // Obtain @RemoteHome
+      RemoteHome remoteHome = container.getAnnotation(RemoteHome.class);
+
+      // Ensure that if EJB 2.1 Components are defined, they're complete
+      this.validateEjb21Views(remoteHome == null ? null : remoteHome.value(), ProxyFactoryHelper
+            .getRemoteInterfaces(container));
+   }
+   
+   public Object createProxyBusiness()
+   {
+      Object id = getContainer().createSession();
+      return this.createProxyBusiness(id);
+   }
+   
+   public Object createProxyBusiness(Object id)
+   {
+      return this.createProxy(id,SpecificationInterfaceType.EJB30_BUSINESS);
+   }
+   
+   // Specifications
+   
+   abstract String getStackNameInterceptors();
+   
+   // Functional Methods 
+   
+   protected boolean bindHomeAndBusinessTogether(SessionContainer container)
+   {
+      String homeJndiName = ProxyFactoryHelper.getHomeJndiName(container);
+      String remoteBusinessJndiName = ProxyFactoryHelper.getRemoteBusinessJndiName(container);
+      return homeJndiName.equals(remoteBusinessJndiName);
+   }
+   
+   Object createProxy(Object id,SpecificationInterfaceType type)
+   {
+      String stackName = this.getStackNameInterceptors();
+      RemoteBinding binding = this.getBinding();
+      if (binding.interceptorStack() != null && !binding.interceptorStack().trim().equals(""))
+      {
+         stackName = binding.interceptorStack();
+      }
+      AdviceStack stack = AspectManager.instance().getAdviceStack(stackName);
+      if (stack == null) throw new RuntimeException("unable to find interceptor stack: " + stackName);
+      StatefulRemoteProxy proxy = new StatefulRemoteProxy(getContainer(), stack.createInterceptors(getContainer()
+            .getAdvisor(), null), this.getLocator(), id);
+      
+      if(type.equals(SpecificationInterfaceType.EJB21))
+      {
+         this.getContainer();
+         return this.constructEjb21Proxy(proxy);
+      }
+      else
+      {
+         return this.constructProxyBusiness(proxy);
+      }
+   }
+   
+   @Override
+   protected StatefulHandleRemoteImpl createHandle()
+   {
+      EJBObject proxy = this.createProxyEjb21();
+      return this.createHandle(proxy);
+   }
+   
+   protected StatefulHandleRemoteImpl createHandle(EJBObject proxy)
+   {
+      StatefulHandleRemoteImpl handle = new StatefulHandleRemoteImpl(proxy);
+      return handle;
+   } 
+   
+   public EJBObject createProxyEjb21()
+   {
+      Object id = getContainer().createSession();
+      return this.createProxyEjb21(id);
+   }
+   
+   @SuppressWarnings("unchecked")
+   public <T extends EJBObject> T createProxyEjb21(Object id)
+   {      
+      // Cast explicitly to catch improper proxies
+      return (T)this.createProxy(id,SpecificationInterfaceType.EJB21);
+   }
+   
+   @Override
+   public void start() throws Exception
+   {
+      super.start();
+   }
+
+   // Accessors / Mutators
+   
+   RemoteBinding getBinding()
+   {
+      assert this.binding!=null : "RemoteBinding has not been initialized";
+      return this.binding;
+   }
+   
+   InvokerLocator getLocator()
+   {
+      assert this.locator!=null : "InvokerLocator has not been initialized"; 
+      return this.locator;
+   }
+
+}

Modified: projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/stateful/NestedStatefulBeanContext.java
===================================================================
--- projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/stateful/NestedStatefulBeanContext.java	2008-04-11 07:12:16 UTC (rev 72000)
+++ projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/stateful/NestedStatefulBeanContext.java	2008-04-11 08:04:37 UTC (rev 72001)
@@ -29,10 +29,10 @@
 import java.util.List;
 
 import javax.persistence.EntityManager;
+
 import org.jboss.aop.metadata.SimpleMetaData;
-import org.jboss.ejb3.session.SessionContainer;
-
 import org.jboss.ejb3.Ejb3Registry;
+import org.jboss.ejb3.session.SessionSpecContainer;
 
 /**
  * Overrides superclass to not use MarshalledValue in externalization,
@@ -50,7 +50,7 @@
    private static final long serialVersionUID = 7835719320529968045L;
    
 
-   public NestedStatefulBeanContext(SessionContainer container, Object bean)
+   public NestedStatefulBeanContext(StatefulContainer container, Object bean)
    {
       super(container, bean);
    }
@@ -81,7 +81,7 @@
       metadata = (SimpleMetaData) in.readObject();
       bean = in.readObject();
       persistenceContexts = (HashMap<String, EntityManager>)  in.readObject();
-      interceptorInstances = (HashMap<Class, Object>)in.readObject();
+      interceptorInstances = (HashMap<Class<?>, Object>)in.readObject();
       contains = (List<StatefulBeanContext>) in.readObject();
       removed = in.readBoolean();
       replicationIsPassivation = in.readBoolean();

Modified: projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/stateful/ProxiedStatefulBeanContext.java
===================================================================
--- projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/stateful/ProxiedStatefulBeanContext.java	2008-04-11 07:12:16 UTC (rev 72000)
+++ projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/stateful/ProxiedStatefulBeanContext.java	2008-04-11 08:04:37 UTC (rev 72001)
@@ -34,7 +34,6 @@
 
 import org.jboss.aop.metadata.SimpleMetaData;
 import org.jboss.ejb3.interceptor.InterceptorInfo;
-import org.jboss.ejb3.session.SessionContainer;
 
 /**
  * Proxy to a NestedStatefulBeanContext that can be independently passivated,
@@ -280,7 +279,7 @@
 //   }
 //
    @Override
-   public SessionContainer getContainer()
+   public StatefulContainer getContainer()
    {
       return getDelegate().getContainer();
    }

Modified: projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/stateful/StatefulBeanContext.java
===================================================================
--- projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/stateful/StatefulBeanContext.java	2008-04-11 07:12:16 UTC (rev 72000)
+++ projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/stateful/StatefulBeanContext.java	2008-04-11 08:04:37 UTC (rev 72001)
@@ -42,8 +42,7 @@
 import org.jboss.ejb3.cache.Identifiable;
 import org.jboss.ejb3.cache.StatefulCache;
 import org.jboss.ejb3.interceptor.InterceptorInfo;
-import org.jboss.ejb3.session.SessionBeanContext;
-import org.jboss.ejb3.session.SessionContainer;
+import org.jboss.ejb3.session.SessionSpecBeanContext;
 import org.jboss.ejb3.tx.TxUtil;
 import org.jboss.serial.io.MarshalledObject;
 import org.jboss.tm.TxUtils;
@@ -59,7 +58,7 @@
  * 
  * @version $Revision$
  */
-public class StatefulBeanContext extends SessionBeanContext implements Identifiable, Serializable
+public class StatefulBeanContext extends SessionSpecBeanContext<StatefulContainer> implements Identifiable, Serializable
 {
    /** The serialVersionUID */
    private static final long serialVersionUID = -102470788178912606L;
@@ -140,7 +139,7 @@
     * @param container
     * @param beanMO
     */
-   protected StatefulBeanContext(SessionContainer container, MarshalledObject beanMO)
+   protected StatefulBeanContext(StatefulContainer container, MarshalledObject beanMO)
    {
       super(container);
       
@@ -158,7 +157,7 @@
     * @param container
     * @param bean
     */
-   protected StatefulBeanContext(SessionContainer container, Object bean)
+   protected StatefulBeanContext(StatefulContainer container, Object bean)
    {
       super(container, bean);
       
@@ -791,16 +790,16 @@
    }
 
    @Override
-   public SessionContainer getContainer()
+   public StatefulContainer getContainer()
    {
       if (container == null)
       {
-         container = (SessionContainer)Ejb3Registry.findContainer(containerGuid);
-          
+         container = (StatefulContainer) Ejb3Registry.findContainer(containerGuid);
+
          if (isClustered && container == null)
-            container = (SessionContainer)Ejb3Registry.getClusterContainer(containerClusterUid);
+            container = (StatefulContainer) Ejb3Registry.getClusterContainer(containerClusterUid);
       }
-      
+
       return container;
    }
 
@@ -854,7 +853,7 @@
          bean = beanAndInterceptors[0];
          persistenceContexts = (HashMap<String, EntityManager>) beanAndInterceptors[1];
          ArrayList list = (ArrayList) beanAndInterceptors[2];
-         interceptorInstances = new HashMap<Class, Object>();
+         interceptorInstances = new HashMap<Class<?>, Object>();
          if (list != null)
          {
             for (Object o : list)

Modified: projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/stateful/StatefulClusterProxyFactory.java
===================================================================
--- projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/stateful/StatefulClusterProxyFactory.java	2008-04-11 07:12:16 UTC (rev 72000)
+++ projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/stateful/StatefulClusterProxyFactory.java	2008-04-11 08:04:37 UTC (rev 72001)
@@ -27,9 +27,7 @@
 import javax.ejb.RemoteHome;
 import javax.naming.NamingException;
 
-import org.jboss.aop.AspectManager;
 import org.jboss.aop.Dispatcher;
-import org.jboss.aop.advice.AdviceStack;
 import org.jboss.aspects.remoting.FamilyWrapper;
 import org.jboss.aspects.remoting.Remoting;
 import org.jboss.ejb3.ProxyFactory;
@@ -40,7 +38,9 @@
 import org.jboss.ejb3.remoting.LoadBalancePolicyNotRegisteredException;
 import org.jboss.ejb3.remoting.RemoteProxyFactory;
 import org.jboss.ejb3.remoting.RemoteProxyFactoryRegistry;
+import org.jboss.ejb3.session.ProxyAccessType;
 import org.jboss.ejb3.session.SessionContainer;
+import org.jboss.ejb3.session.SessionSpecContainer;
 import org.jboss.ha.client.loadbalance.FirstAvailable;
 import org.jboss.ha.client.loadbalance.LoadBalancePolicy;
 import org.jboss.ha.framework.interfaces.ClusteringTargetsRepository;
@@ -60,29 +60,26 @@
  *
  * @version $Revision$
  */
-public class StatefulClusterProxyFactory extends BaseStatefulProxyFactory 
+public class StatefulClusterProxyFactory extends BaseStatefulRemoteProxyFactory 
    implements RemoteProxyFactory, DistributedReplicantManager.ReplicantListener
 {
    private static final Logger log = Logger.getLogger(StatefulClusterProxyFactory.class);
    
-//   public static final String FACTORY_ATTRIBUTE = ",element=ProxyFactory,partition=";
+   private static String STACK_NAME_CLUSTERED_STATEFUL_SESSION_CLIENT_INTERCEPTORS = "ClusteredStatefulSessionClientInterceptors";
    
-   private RemoteBinding binding;
    private Clustered clustered;
-   private InvokerLocator locator;
    private DistributedReplicantManager drm;
    private HATarget hatarget;
    private String proxyFamilyName;
    private LoadBalancePolicy lbPolicy;
    private FamilyWrapper wrapper;
 
-   public StatefulClusterProxyFactory(SessionContainer container, RemoteBinding binding, Clustered clustered)
+   public StatefulClusterProxyFactory(SessionSpecContainer container, RemoteBinding binding, Clustered clustered)
    {
-      super(container, binding.jndiBinding());
+      super(container, binding);
       
       assert clustered != null : "clustered is null";
       
-      this.binding = binding;
       this.clustered = clustered;
    }
    
@@ -112,14 +109,17 @@
 
    public void start() throws Exception
    {
-      String clientBindUrl = ProxyFactoryHelper.getClientBindUrl(binding);
-      locator = new InvokerLocator(clientBindUrl);
-      String partitionName = ((SessionContainer) getContainer()).getPartitionName();
-      proxyFamilyName = ((SessionContainer) getContainer()).getDeploymentQualifiedName() + locator.getProtocol() + partitionName;
-      HAPartition partition = (HAPartition) getContainer().getInitialContext().lookup("/HAPartition/" + partitionName);
+      this.init();
+      
+      RemoteBinding binding = this.getBinding();
+      InvokerLocator locator = this.getLocator();
+      SessionContainer container = this.getContainer();
+      String partitionName = container.getPartitionName();
+      proxyFamilyName = container.getDeploymentQualifiedName() + locator.getProtocol() + partitionName;
+      HAPartition partition = (HAPartition) this.getContainer().getInitialContext().lookup(
+            "/HAPartition/" + partitionName);
       hatarget = new HATarget(partition, proxyFamilyName, locator, HATarget.ENABLE_INVOCATIONS);
       ClusteringTargetsRepository.initTarget(proxyFamilyName, hatarget.getReplicants());
-      SessionContainer container = (SessionContainer) getContainer();
       container.getClusterFamilies().put(proxyFamilyName, hatarget);
       
       if (clustered.loadBalancePolicy() == null || clustered.loadBalancePolicy().equals(ClusteredDefaults.LOAD_BALANCE_POLICY_DEFAULT))
@@ -155,7 +155,9 @@
          Util.rebind(getContainer().getInitialContext(), jndiName + PROXY_FACTORY_NAME, factoryProxy);
       } catch (NamingException e)
       {
-         NamingException namingException = new NamingException("Could not bind stateful cluster proxy with ejb name " + getContainer().getEjbName() + " into JNDI under jndiName: " + getContainer().getInitialContext().getNameInNamespace() + "/" + jndiName + PROXY_FACTORY_NAME);
+         NamingException namingException = new NamingException("Could not bind stateful cluster proxy with ejb name "
+               + getContainer().getEjbName() + " into JNDI under jndiName: "
+               + getContainer().getInitialContext().getNameInNamespace() + "/" + jndiName + PROXY_FACTORY_NAME);
          namingException.setRootCause(e);
          throw namingException;
       }
@@ -164,20 +166,13 @@
 
    }
 
-   public Object createProxy()
+   @Override
+   String getStackNameInterceptors()
    {
-      String stackName = "ClusteredStatefulSessionClientInterceptors";
-      if (binding.interceptorStack() != null && !binding.interceptorStack().equals(""))
-      {
-         stackName = binding.interceptorStack();
-      }
-      AdviceStack stack = AspectManager.instance().getAdviceStack(stackName);
-      String partitionName = ((SessionContainer) getContainer()).getPartitionName();
-      return constructBusinessProxy(new StatefulClusteredProxy(getContainer(), stack.createInterceptors(this.getContainer()
-            .getAdvisor(), null), wrapper, lbPolicy, partitionName));
+      return StatefulClusterProxyFactory.STACK_NAME_CLUSTERED_STATEFUL_SESSION_CLIENT_INTERCEPTORS;
    }
 
-   public Object createProxy(Object id)
+   public Object createProxyBusiness(Object id)
    {
       throw new RuntimeException("NYI");
    }
@@ -187,21 +182,11 @@
       Dispatcher.singleton.unregisterTarget(getTargetId());
       hatarget.destroy();
       drm.unregisterListener(proxyFamilyName, this);
-      ((SessionContainer) getContainer()).getClusterFamilies().remove(proxyFamilyName);
+      this.getContainer().getClusterFamilies().remove(proxyFamilyName);
       Util.unbind(getContainer().getInitialContext(), jndiName + PROXY_FACTORY_NAME);
       super.stop();
    }
-   
-   protected StatefulHandleImpl getHandle()
-   {
-      StatefulHandleImpl handle = new StatefulHandleImpl();
-      RemoteBinding remoteBinding = this.getContainer().getAnnotation(RemoteBinding.class);
-      if (remoteBinding != null)
-         handle.jndiName = remoteBinding.jndiBinding();
- 
-      return handle;
-   }
-   
+
    /**
     * @return unique name for this proxy factory
     */
@@ -228,5 +213,4 @@
          log.error(e);
       }
    }
-
 }

Modified: projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/stateful/StatefulContainer.java
===================================================================
--- projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/stateful/StatefulContainer.java	2008-04-11 07:12:16 UTC (rev 72000)
+++ projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/stateful/StatefulContainer.java	2008-04-11 08:04:37 UTC (rev 72001)
@@ -26,7 +26,9 @@
 import java.lang.reflect.Method;
 import java.lang.reflect.Modifier;
 import java.rmi.NoSuchObjectException;
+import java.rmi.RemoteException;
 import java.util.ArrayList;
+import java.util.Collection;
 import java.util.Hashtable;
 import java.util.List;
 import java.util.Map;
@@ -73,8 +75,8 @@
 import org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor;
 import org.jboss.ejb3.proxy.EJBMetaDataImpl;
 import org.jboss.ejb3.proxy.handle.HomeHandleImpl;
-import org.jboss.ejb3.remoting.RemoteProxyFactory;
 import org.jboss.ejb3.session.SessionContainer;
+import org.jboss.ejb3.session.SessionSpecContainer;
 import org.jboss.injection.Injector;
 import org.jboss.injection.JndiPropertyInjector;
 import org.jboss.logging.Logger;
@@ -86,7 +88,7 @@
  * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
  * @version $Revision$
  */
-public class StatefulContainer extends SessionContainer implements StatefulObjectFactory<StatefulBeanContext>
+public class StatefulContainer extends SessionSpecContainer implements StatefulObjectFactory<StatefulBeanContext>
 {
    private static final Logger log = Logger.getLogger(StatefulContainer.class);
 
@@ -113,23 +115,95 @@
    }
    
    @Override
-   protected ProxyFactory createProxyFactory(LocalBinding binding)
+   protected StatefulLocalProxyFactory getProxyFactory(LocalBinding binding)
    {
-      return new StatefulLocalProxyFactory(this, binding);
+      StatefulLocalProxyFactory factory = (StatefulLocalProxyFactory) this.proxyDeployer.getProxyFactory(binding);
+
+      if (factory == null)
+      {
+         factory = new StatefulLocalProxyFactory(this, binding);
+
+         try
+         {
+            factory.init();
+         }
+         catch (Exception e)
+         {
+            throw new RuntimeException(e);
+         }
+      }
+      
+      return factory;
    }
    
+   public Object createProxyLocalEjb21(Object id, LocalBinding binding) throws Exception
+   {
+      StatefulLocalProxyFactory proxyFactory = this.getProxyFactory(binding);
+      return proxyFactory.createProxyEjb21(id);
+   }
+   
+   public Object createProxyRemoteEjb21(Object id) throws Exception
+   {
+      RemoteBinding binding = this.getRemoteBinding();
+      return this.createProxyRemoteEjb21(id,binding);
+   }
+
+   public Object createProxyRemoteEjb21(Object id, RemoteBinding binding) throws Exception
+   { 
+      BaseStatefulRemoteProxyFactory proxyFactory = this.getProxyFactory(binding);
+      return proxyFactory.createProxyEjb21(id);
+   }
+   
+   public Object createProxyLocalEjb21(Object id) throws Exception
+   {
+      LocalBinding binding = this.getAnnotation(LocalBinding.class);
+      return this.createProxyLocalEjb21(id,binding);
+   }
+   
    @Override
-   protected RemoteProxyFactory createRemoteProxyFactory(RemoteBinding binding)
+   public Object createProxyLocalEjb21(LocalBinding binding) throws Exception
    {
-      Clustered clustered = getAnnotation(Clustered.class);
-      if (clustered != null)
+      Object id = this.createSession();
+      return this.createProxyLocalEjb21(id,binding);
+   }
+
+   @Override
+   public Object createProxyRemoteEjb21(RemoteBinding binding) throws Exception
+   {
+      Object id = this.createSession();
+      return this.createProxyRemoteEjb21(id, binding);
+   }
+   
+   @Override
+   protected BaseStatefulRemoteProxyFactory getProxyFactory(RemoteBinding binding)
+   {
+      BaseStatefulRemoteProxyFactory factory = (BaseStatefulRemoteProxyFactory) this.proxyDeployer
+            .getProxyFactory(binding);
+
+      if (factory == null)
       {
-         return new StatefulClusterProxyFactory(this, binding, clustered);
+
+         Clustered clustered = getAnnotation(Clustered.class);
+         if (clustered != null)
+         {
+            factory = new StatefulClusterProxyFactory(this, binding, clustered);
+         }
+         else
+         {
+            factory = new StatefulRemoteProxyFactory(this, binding);
+         }
+         
+         try
+         {
+            factory.init();
+         }
+         catch(Exception e)
+         {
+            throw new RuntimeException(e);
+         }
       }
-      else
-      {
-         return new StatefulRemoteProxyFactory(this, binding);
-      }
+
+      return factory;
    }
    
    public void destroy(StatefulBeanContext obj)
@@ -142,17 +216,34 @@
       return mbean;
    }
    
+   /**
+    * Creates and starts the configured cache, if not
+    * started already
+    * 
+    * @throws Exception
+    */
+   protected void createAndStartCache() throws Exception {
+      
+      // If Cache is initialized, exit
+      if(this.cache!=null && this.cache.isStarted())
+      {
+         return;
+      }
+      
+      Cache cacheConfig = getAnnotation(Cache.class);
+      CacheFactoryRegistry registry = getCacheFactoryRegistry();
+      Ejb3CacheFactory factory = registry.getCacheFactory(cacheConfig.value());
+      this.cache = factory.createCache();
+      this.cache.initialize(this);
+      this.cache.start();
+   }
+   
    public void start() throws Exception
    {
       try
       {
          super.start();
-         Cache cacheConfig = getAnnotation(Cache.class);
-         CacheFactoryRegistry registry = getCacheFactoryRegistry();
-         Ejb3CacheFactory factory = registry.getCacheFactory(cacheConfig.value());
-         cache = factory.createCache();
-         cache.initialize(this);
-         cache.start();
+         this.createAndStartCache();
       }
       catch (Exception e)
       {
@@ -177,6 +268,16 @@
 
    public StatefulCache getCache()
    {
+      // Ensure initialized
+      try{
+         this.createAndStartCache();
+      }
+      catch (Exception e)
+      {
+         throw new RuntimeException(e);
+      }
+      
+      // Return
       return cache;
    }
    
@@ -295,16 +396,17 @@
     *
     * @return
     */
-   public Object createSession(Class[] initTypes, Object[] initValues)
+   public Object createSession(Class<?>[] initTypes, Object[] initValues)
    {
       ClassLoader oldLoader = Thread.currentThread().getContextClassLoader();
       pushEnc();
       try
       {
          Thread.currentThread().setContextClassLoader(classloader);
-         StatefulBeanContext ctx = getCache().create(initTypes, initValues);
+         StatefulCache cache = this.getCache();
+         StatefulBeanContext ctx = cache.create(initTypes, initValues);
          // Since we return the key here, the context is not in use.
-         getCache().release(ctx);
+         cache.release(ctx);
          return ctx.getId();
       }
       finally
@@ -693,7 +795,7 @@
          StatefulLocalProxyFactory factory = new StatefulLocalProxyFactory(this, binding);
          factory.init();
 
-         Object proxy = factory.createEjb21Proxy(initParameterTypes,
+         Object proxy = factory.createProxyEjb21(initParameterTypes,
                  initParameterValues);
 
          return proxy;
@@ -710,30 +812,28 @@
       }
    }
    
+   public Object createLocalProxy(Object id) throws Exception
+   {
+      return this.createLocalProxy(id, this.getAnnotation(LocalBinding.class));
+   }
+   
    public Object createLocalProxy(Object id, LocalBinding binding) throws Exception
    {
       StatefulLocalProxyFactory factory = new StatefulLocalProxyFactory(this, binding);
       factory.init();
 
-      return factory.createProxy(id);
+      return factory.createProxyBusiness(id);
    }
    
    public Object createRemoteProxy(Object id, RemoteBinding binding) throws Exception
    {
-      //      RemoteBinding binding = null;
-      //      RemoteBindings bindings = (RemoteBindings) resolveAnnotation(RemoteBindings.class);
-      //      if (bindings != null)
-      //         binding = bindings.value()[0];
-      //      else
-      //         binding = (RemoteBinding) resolveAnnotation(RemoteBinding.class);
-
       StatefulRemoteProxyFactory factory = new StatefulRemoteProxyFactory(this, binding);
       factory.init();
 
       if (id != null)
-         return factory.createProxy(id);
+         return factory.createProxyBusiness(id);
       else
-         return factory.createProxy();
+         return factory.createProxyBusiness();
    }
    
    public boolean isClustered()
@@ -773,9 +873,9 @@
 
          Object proxy = null;
          if (newStatefulInvocation.getId() != null)
-            proxy = factory.createEjb21Proxy(newStatefulInvocation.getId());
+            proxy = factory.createProxyEjb21(newStatefulInvocation.getId());
          else
-            proxy = factory.createEjb21Proxy();
+            proxy = factory.createProxyEjb21();
 
          InvocationResponse response = marshallResponse(statefulInvocation, proxy, newStatefulInvocation.getResponseContextInfo());
          if (newStatefulInvocation.getId() != null)
@@ -843,11 +943,10 @@
          StatefulContainerInvocation newStatefulInvocation = buildInvocation(
                  info, statefulInvocation);
 
-         StatefulHandleImpl handle = new StatefulHandleImpl();
-         handle.id = newStatefulInvocation.getId();
-         RemoteBinding remoteBinding = this.getAnnotation(RemoteBinding.class);
-         if (remoteBinding != null)
-            handle.jndiName = remoteBinding.jndiBinding();
+         ProxyFactory proxyFactory = this.getProxyFactory(this.getAnnotation(RemoteBinding.class));
+         BaseStatefulRemoteProxyFactory statefulRemoteProxyFactory = (BaseStatefulRemoteProxyFactory) proxyFactory;
+         EJBObject proxy = (EJBObject) statefulRemoteProxyFactory.createProxyEjb21(newStatefulInvocation.getId());
+         StatefulHandleRemoteImpl handle = new StatefulHandleRemoteImpl(proxy);
          InvocationResponse response = marshallResponse(statefulInvocation, handle, null);
          return response;
       }
@@ -987,15 +1086,16 @@
       }
       if (found == false) throw new IllegalStateException(businessInterface.getName() + " is not a business interface for container " + this);
 
-      for (ProxyFactory factory : proxyDeployer.getProxyFactories())
+      Collection<ProxyFactory> proxyFactories = this.proxyDeployer.getProxyFactories().values();
+      for (ProxyFactory factory : proxyFactories)
       {
          if (isRemote && factory instanceof StatefulRemoteProxyFactory)
          {
-            return ((StatefulRemoteProxyFactory) factory).createProxy(ctx.getId());
+            return ((StatefulRemoteProxyFactory) factory).createProxyBusiness(ctx.getId());
          }
          else if (!isRemote && factory instanceof StatefulLocalProxyFactory)
          {
-            return ((StatefulLocalProxyFactory) factory).createProxy(ctx.getId());
+            return ((StatefulLocalProxyFactory) factory).createProxyBusiness(ctx.getId());
          }
       }
       throw new IllegalStateException("Unable to create proxy for getBusinessObject as a proxy factory was not found");
@@ -1013,9 +1113,16 @@
       if(!(target instanceof Handle))
          throw new RemoveException("EJB 3 3.6.2.2: Session beans do not have a primary key");
       
-      StatefulHandleImpl handle = (StatefulHandleImpl) target;
+      StatefulHandleRemoteImpl handle = (StatefulHandleRemoteImpl) target;
 
-      destroySession(handle.id);   
+      try
+      {
+         handle.getEJBObject().remove();
+      }
+      catch(RemoteException re)
+      {
+         throw new RemoveException(re.getMessage());
+      }
    }
    
    protected void removeHandle(Handle arg) throws Exception

Deleted: projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/stateful/StatefulHandleImpl.java
===================================================================
--- projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/stateful/StatefulHandleImpl.java	2008-04-11 07:12:16 UTC (rev 72000)
+++ projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/stateful/StatefulHandleImpl.java	2008-04-11 08:04:37 UTC (rev 72001)
@@ -1,181 +0,0 @@
-/*
- * 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.
- */
-package org.jboss.ejb3.stateful;
-
-import java.rmi.RemoteException;
-import java.rmi.ServerException;
-import java.security.AccessControlException;
-import java.util.Hashtable;
-import java.lang.reflect.InvocationHandler;
-import java.lang.reflect.Method;
-import java.lang.reflect.Proxy;
-
-import javax.ejb.EJBObject;
-import javax.ejb.Handle;
-import javax.naming.InitialContext;
-
-import org.jboss.ejb3.InitialContextFactory;
-import org.jboss.invocation.Invoker;
-import org.jboss.logging.Logger;
-import org.jboss.naming.NamingContextFactory;
-
-/**
- * An EJB stateful session bean handle.
- *
- * @author  <a href="mailto:marc.fleury at jboss.org">Marc Fleury</a>
- * @author  <a href="mailto:jason at planet57.com">Jason Dillon</a>
- * @author <a href="bill at burkecentral.com">Bill Burke</a>
- * @author <a href="bdecoste at jboss.com">William DeCoste</a>
- * @version $Revision$
- */
-public class StatefulHandleImpl
-   implements Handle
-{
-   private static final Logger log = Logger.getLogger(StatefulHandleImpl.class);
-   
-   /** Serial Version Identifier. */
-   static final long serialVersionUID = -6324520755180597156L;
-
-   /** A reference to {@link Handle#getEJBObject}. */
-   protected static final Method GET_EJB_OBJECT;
-
-   /** The value of our local Invoker.ID to detect when we are local. */
-   private Object invokerID = null;
-
-   /**
-    * Initialize <tt>Handle</tt> method references.
-    */
-   static
-   {
-      try
-      {
-         GET_EJB_OBJECT = Handle.class.getMethod("getEJBObject", new Class[0]);
-      }
-      catch(Exception e)
-      {
-         e.printStackTrace();
-         throw new ExceptionInInitializerError(e);
-      }
-   }
-   
-   public StatefulHandleImpl()
-   {
-      
-   }
-   
-   /** The identity of the bean. */
-   public int objectName;
-   public String jndiName;
-   public String invokerProxyBinding;
-   public Invoker invoker;
-   public Object id;
-
-   /** The JNDI env in effect when the home handle was created */
-   protected Hashtable jndiEnv;
-
-   /** Create an ejb handle for a stateful session bean.
-    * @param objectName - the session container jmx name
-    * @param jndiName - the session home ejb name
-    * @param invoker - the invoker to request the EJBObject from
-    * @param invokerProxyBinding - the type of invoker binding
-    * @param id - the session id
-    */ 
-   public StatefulHandleImpl(
-      int objectName,
-      String jndiName,
-      Invoker invoker,
-      String invokerProxyBinding,
-      Object id,
-      Object invokerID)
-   {
-      this.jndiName = jndiName;
-      this.id = id;
-      this.jndiEnv = (Hashtable) NamingContextFactory.lastInitialContextEnv.get();
-      try
-      {
-         String property = System.getProperty("org.jboss.ejb.sfsb.handle.V327");
-         if (property != null)
-         {
-            this.invokerProxyBinding = invokerProxyBinding;
-            this.invokerID = invokerID;
-            this.objectName = objectName;
-            this.invoker = invoker;
-         }
-      }
-      catch (AccessControlException ignored)
-      {
-      }
-
-   }
-
-   /**
-    * @return the internal session identifier
-    */
-   public Object getID()
-   {
-      return id;
-   }
-
-   /**
-    * @return the jndi name
-    */
-   public String getJNDIName()
-   {
-      return jndiName;
-   }
-
-   /**
-    * Handle implementation.
-    *
-    * This differs from Stateless and Entity handles which just invoke
-    * standard methods (<tt>create</tt> and <tt>findByPrimaryKey</tt>
-    * respectively) on the Home interface (proxy).
-    * There is no equivalent option for stateful SBs, so a direct invocation
-    * on the container has to be made to locate the bean by its id (the
-    * stateful SB container provides an implementation of
-    * <tt>getEJBObject</tt>).
-    *
-    * This means the security context has to be set here just as it would
-    * be in the Proxy.
-    *
-    * @return  <tt>EJBObject</tt> reference.
-    *
-    * @throws ServerException    Could not get EJBObject.
-    */
-   public EJBObject getEJBObject() throws RemoteException
-   {
-      try
-      {
-         InitialContext ic = InitialContextFactory.getInitialContext(jndiEnv);
-    
-         Proxy proxy = (Proxy) ic.lookup(jndiName);
-
-         return (EJBObject) proxy;
-      }
-      catch (Throwable t)
-      {
-         t.printStackTrace();
-         throw new RemoteException("Error during getEJBObject", t);
-      }
-   }
-}
-

Added: projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/stateful/StatefulHandleRemoteImpl.java
===================================================================
--- projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/stateful/StatefulHandleRemoteImpl.java	                        (rev 0)
+++ projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/stateful/StatefulHandleRemoteImpl.java	2008-04-11 08:04:37 UTC (rev 72001)
@@ -0,0 +1,72 @@
+/*
+ * 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.
+ */
+package org.jboss.ejb3.stateful;
+
+import java.rmi.RemoteException;
+
+import javax.ejb.EJBObject;
+import javax.ejb.Handle;
+
+import org.jboss.logging.Logger;
+
+/**
+ * An EJB stateful session bean handle.
+ *
+ * @author  <a href="mailto:marc.fleury at jboss.org">Marc Fleury</a>
+ * @author  <a href="mailto:jason at planet57.com">Jason Dillon</a>
+ * @author <a href="bill at burkecentral.com">Bill Burke</a>
+ * @author <a href="bdecoste at jboss.com">William DeCoste</a>
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a> 
+ * @version $Revision$
+ */
+public class StatefulHandleRemoteImpl implements Handle
+{
+   private static final Logger log = Logger.getLogger(StatefulHandleRemoteImpl.class);
+
+   /** Serial Version Identifier. */
+   static final long serialVersionUID = -6324520755180597156L;
+
+   // Instance Members
+
+   private EJBObject proxy;
+
+   // Constructor
+
+   public StatefulHandleRemoteImpl(EJBObject proxy)
+   {
+      this.proxy = proxy;
+   }
+
+   // Required Implementations
+
+   /**
+    * Handle implementation.
+    *
+    * Returns the proxy  
+    *
+    * @throws RemoteException 
+    */
+   public EJBObject getEJBObject() throws RemoteException
+   {
+      return this.proxy;
+   }
+}


Property changes on: projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/stateful/StatefulHandleRemoteImpl.java
___________________________________________________________________
Name: svn:keywords
   + Author Date Id Revision
Name: svn:eol-style
   + native

Modified: projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/stateful/StatefulHomeRemoteProxy.java
===================================================================
--- projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/stateful/StatefulHomeRemoteProxy.java	2008-04-11 07:12:16 UTC (rev 72000)
+++ projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/stateful/StatefulHomeRemoteProxy.java	2008-04-11 08:04:37 UTC (rev 72001)
@@ -70,10 +70,9 @@
    {
    }
 
-   public void setHandle(StatefulHandleImpl handle)
+   public void setHandle(StatefulHandleRemoteImpl handle)
    {
       this.handle = handle;
-      handle.id = id;
    }
 
    public void setHomeHandle(HomeHandle homeHandle)

Modified: projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/stateful/StatefulLocalProxyFactory.java
===================================================================
--- projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/stateful/StatefulLocalProxyFactory.java	2008-04-11 07:12:16 UTC (rev 72000)
+++ projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/stateful/StatefulLocalProxyFactory.java	2008-04-11 08:04:37 UTC (rev 72001)
@@ -25,20 +25,20 @@
 import java.io.ObjectInput;
 import java.io.ObjectOutput;
 import java.rmi.dgc.VMID;
-import java.util.Arrays;
-import java.util.HashSet;
-import java.util.Set;
 
+import javax.ejb.EJBLocalObject;
 import javax.ejb.LocalHome;
 import javax.naming.NamingException;
 
 import org.jboss.ejb3.Ejb3Registry;
-import org.jboss.ejb3.JBossProxy;
 import org.jboss.ejb3.ProxyFactoryHelper;
 import org.jboss.ejb3.SpecificationInterfaceType;
 import org.jboss.ejb3.annotation.LocalBinding;
+import org.jboss.ejb3.session.ProxyAccessType;
 import org.jboss.ejb3.session.SessionContainer;
-import org.jboss.ejb3.stateful.BaseStatefulProxyFactory.ProxyAccessType;
+import org.jboss.ejb3.session.SessionSpecContainer;
+import org.jboss.proxy.ejb.handle.StatefulHandleImpl;
+import org.jboss.util.NotImplementedException;
 import org.jboss.util.naming.Util;
 
 
@@ -60,7 +60,7 @@
       super();
    }
    
-   public StatefulLocalProxyFactory(SessionContainer container, LocalBinding binding)
+   public StatefulLocalProxyFactory(SessionSpecContainer container, LocalBinding binding)
    {
       super(container, binding.jndiBinding());
    }
@@ -136,33 +136,34 @@
       }
    }
 
-   public Object createProxy()
+   public Object createProxyBusiness()
    {
       SessionContainer sfsb = (SessionContainer) getContainer();
       Object id = sfsb.createSession();
-      return this.createProxy(id);
+      return this.createProxyBusiness(id);
    }
 
-   public Object createEjb21Proxy()
+   public EJBLocalObject createProxyEjb21()
    {
       Object id = getContainer().createSession();
-      return this.createEjb21Proxy(id);
+      return this.createProxyEjb21(id);
    }
 
-   public Object createProxy(Object id)
+   public Object createProxyBusiness(Object id)
    {
       return this.createProxy(id, SpecificationInterfaceType.EJB30_BUSINESS);
    }
 
-   public Object createEjb21Proxy(Object id)
+   @SuppressWarnings("unchecked")
+   public <T extends EJBLocalObject> T createProxyEjb21(Object id)
    {
-      return this.createProxy(id, SpecificationInterfaceType.EJB21);
+      return (T)this.createProxy(id, SpecificationInterfaceType.EJB21);
    }
 
    private Object createProxy(Object id, SpecificationInterfaceType type)
    {
       StatefulLocalProxy proxy = new StatefulLocalProxy(this.getContainer(), id, vmid);
-      return type.equals(SpecificationInterfaceType.EJB30_BUSINESS) ? this.constructBusinessProxy(proxy) : this
+      return type.equals(SpecificationInterfaceType.EJB30_BUSINESS) ? this.constructProxyBusiness(proxy) : this
             .constructEjb21Proxy(proxy);
    }
    
@@ -173,20 +174,15 @@
       return this.createProxy(id, SpecificationInterfaceType.EJB30_BUSINESS);
    }
    
-   public Object createEjb21Proxy(Class<?>[] initTypes, Object[] initValues){
+   public Object createProxyEjb21(Class<?>[] initTypes, Object[] initValues){
       SessionContainer sfsb = (SessionContainer) getContainer();
       Object id = sfsb.createSession(initTypes, initValues);
       return this.createProxy(id, SpecificationInterfaceType.EJB21);
    }
 
-   protected StatefulHandleImpl getHandle()
+   protected StatefulHandleImpl createHandle()
    {
-      StatefulHandleImpl handle = new StatefulHandleImpl();
-      LocalBinding remoteBinding = this.getContainer().getAnnotation(LocalBinding.class);
-      if (remoteBinding != null)
-         handle.jndiName = remoteBinding.jndiBinding();
-
-      return handle;
+      throw new NotImplementedException("NYI");
    }
    
    @Override

Modified: projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/stateful/StatefulRemoteProxy.java
===================================================================
--- projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/stateful/StatefulRemoteProxy.java	2008-04-11 07:12:16 UTC (rev 72000)
+++ projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/stateful/StatefulRemoteProxy.java	2008-04-11 08:04:37 UTC (rev 72001)
@@ -80,10 +80,9 @@
    {
    }
    
-   public void setHandle(StatefulHandleImpl handle)
+   public void setHandle(StatefulHandleRemoteImpl handle)
    {
       this.handle = handle;
-      handle.id = id;
    }
    
    public void setHomeHandle(HomeHandle homeHandle)
@@ -150,10 +149,10 @@
 
    public Object getAsynchronousProxy(Object proxy)
    {
-      Class[] infs = proxy.getClass().getInterfaces();
+      Class<?>[] infs = proxy.getClass().getInterfaces();
       if (!ProxyUtils.isAsynchronous(infs))
       {
-         Class[] interfaces = ProxyUtils.addAsynchProviderInterface(infs);
+         Class<?>[] interfaces = ProxyUtils.addAsynchProviderInterface(infs);
          AsynchMixin mixin = new AsynchMixin();
          Interceptor[] newInterceptors = ProxyUtils.addAsynchProxyInterceptor(mixin, interceptors);
          StatefulRemoteProxy handler = new StatefulRemoteProxy(mixin, containerId, containerGuid, newInterceptors, uri);

Modified: projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/stateful/StatefulRemoteProxyFactory.java
===================================================================
--- projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/stateful/StatefulRemoteProxyFactory.java	2008-04-11 07:12:16 UTC (rev 72000)
+++ projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/stateful/StatefulRemoteProxyFactory.java	2008-04-11 08:04:37 UTC (rev 72001)
@@ -34,11 +34,12 @@
 import org.jboss.aspects.remoting.PojiProxy;
 import org.jboss.ejb3.ProxyFactory;
 import org.jboss.ejb3.ProxyFactoryHelper;
-import org.jboss.ejb3.SpecificationInterfaceType;
 import org.jboss.ejb3.annotation.RemoteBinding;
 import org.jboss.ejb3.remoting.IsLocalProxyFactoryInterceptor;
 import org.jboss.ejb3.remoting.RemoteProxyFactory;
+import org.jboss.ejb3.session.BaseSessionRemoteProxy;
 import org.jboss.ejb3.session.SessionContainer;
+import org.jboss.ejb3.session.SessionSpecContainer;
 import org.jboss.logging.Logger;
 import org.jboss.remoting.InvokerLocator;
 import org.jboss.util.naming.Util;
@@ -51,68 +52,24 @@
  *
  * @version $Revision$
  */
-public class StatefulRemoteProxyFactory extends BaseStatefulProxyFactory implements RemoteProxyFactory
+public class StatefulRemoteProxyFactory extends BaseStatefulRemoteProxyFactory implements RemoteProxyFactory
 {
    private static final Logger log = Logger.getLogger(StatefulRemoteProxyFactory.class);
    
-//   public static final String FACTORY_ATTRIBUTE = ",element=ProxyFactory";
-   
    private static final String STACK_NAME_STATEFUL_SESSION_CLIENT_INTERCEPTORS = "StatefulSessionClientInterceptors";
-   
-   private RemoteBinding binding;
-   private InvokerLocator locator;
 
-   public StatefulRemoteProxyFactory(SessionContainer container, RemoteBinding binding)
+   public StatefulRemoteProxyFactory(SessionSpecContainer container, RemoteBinding binding)
    {
-      super(container, binding.jndiBinding());
-      
-      this.binding = binding;
+      super(container, binding);
    }
-   
-   /**
-    * Defines the access type for this Proxies created by this Factory
-    * 
-    * @return
-    */
-   @Override
-   protected ProxyAccessType getProxyAccessType(){
-      return ProxyAccessType.REMOTE;
-   }
-   
-   protected void validateEjb21Views()
-   { 
-      // Obtain Container
-      SessionContainer container = this.getContainer();
-      
-      // Obtain @RemoteHome
-      RemoteHome remoteHome = container.getAnnotation(RemoteHome.class);
 
-      // Ensure that if EJB 2.1 Components are defined, they're complete
-      this.validateEjb21Views(remoteHome == null ? null : remoteHome.value(), ProxyFactoryHelper
-            .getRemoteInterfaces(container));
-
-   }
-   
-   protected boolean bindHomeAndBusinessTogether(SessionContainer container)
-   {
-      return ProxyFactoryHelper.getHomeJndiName(container).equals(ProxyFactoryHelper.getRemoteBusinessJndiName(container));
-   }
-
-   public void init() throws Exception
-   {
-      super.init();
-      String clientBindUrl = ProxyFactoryHelper.getClientBindUrl(binding);
-      locator = new InvokerLocator(clientBindUrl);
-   }
-
+   @Override
    public void start() throws Exception
    {
-      init();
-
       super.start();
       Class<?>[] interfaces = {ProxyFactory.class};
       String targetId = getTargetId();
-      String clientBindUrl = ProxyFactoryHelper.getClientBindUrl(binding);
+      String clientBindUrl = ProxyFactoryHelper.getClientBindUrl(this.getBinding());
       Object factoryProxy = createPojiProxy(targetId, interfaces, clientBindUrl);
       log.debug("Binding proxy factory for " + getContainer().getEjbName() + " in JNDI at " + jndiName + PROXY_FACTORY_NAME + " with client bind url " + clientBindUrl);
       try
@@ -128,17 +85,18 @@
       assert !Dispatcher.singleton.isRegistered(targetId) : targetId + " is already registered";
       Dispatcher.singleton.registerTarget(targetId, this);
 
-      SessionContainer statefulContainer = (SessionContainer) getContainer();
-      RemoteHome remoteHome = (RemoteHome) statefulContainer.resolveAnnotation(RemoteHome.class);
+      SessionContainer statefulContainer = this.getContainer();
+      RemoteHome remoteHome = statefulContainer.getAnnotation(RemoteHome.class);
       if (remoteHome != null && !bindHomeAndBusinessTogether(statefulContainer))
       {
          Object homeProxy = createHomeProxy(remoteHome.value());
-         String homeJndiName = ProxyFactoryHelper.getHomeJndiName(getContainer());
+         String homeJndiName = ProxyFactoryHelper.getHomeJndiName(this.getContainer());
          log.debug("Binding home proxy at " + homeJndiName);
-         Util.rebind(getContainer().getInitialContext(), homeJndiName, homeProxy);
+         Util.rebind(this.getContainer().getInitialContext(), homeJndiName, homeProxy);
       }
    }
 
+   @Override
    public void stop() throws Exception
    {
       Util.unbind(getContainer().getInitialContext(), jndiName + PROXY_FACTORY_NAME);
@@ -153,20 +111,20 @@
       super.stop();
    }
 
-
    public Object createHomeProxy(Class<?> homeInterface)
    {
       try
       {
-         Object containerId = getContainer().getObjectName().getCanonicalName();
          String stackName = StatefulRemoteProxyFactory.STACK_NAME_STATEFUL_SESSION_CLIENT_INTERCEPTORS;
+         RemoteBinding binding = this.getBinding();
          if (binding.interceptorStack() != null && !binding.interceptorStack().trim().equals(""))
          {
             stackName = binding.interceptorStack();
          }
          AdviceStack stack = AspectManager.instance().getAdviceStack(stackName);
          if (stack == null) throw new RuntimeException("unable to find interceptor stack: " + stackName);
-         StatefulHomeRemoteProxy proxy = new StatefulHomeRemoteProxy(getContainer(), stack.createInterceptors(getContainer().getAdvisor(), null), locator);
+         StatefulHomeRemoteProxy proxy = new StatefulHomeRemoteProxy(getContainer(), stack.createInterceptors(
+               getContainer().getAdvisor(), null), this.getLocator());
 
          setEjb21Objects(proxy);
          Class<?>[] intfs = {homeInterface};
@@ -178,50 +136,20 @@
       }
    }
    
-   public Object createProxy()
+   @Override
+   protected void setEjb21Objects(BaseSessionRemoteProxy proxy)
    {
-      Object id = getContainer().createSession();
-      return this.createProxy(id);
+      proxy.setHandle(this.createHandle());
+      proxy.setHomeHandle(getHomeHandle());
+      proxy.setEjbMetaData(getEjbMetaData());
    }
-   public Object createEjb21Proxy()
-   {
-      Object id = getContainer().createSession();
-      return this.createEjb21Proxy(id);
-   }
-
-   protected StatefulHandleImpl getHandle()
-   {
-      StatefulHandleImpl handle = new StatefulHandleImpl();
-      handle.jndiName = jndiName;
-
-      return handle;
-   }
-
-   public Object createProxy(Object id)
-   {
-      return this.createProxy(id,SpecificationInterfaceType.EJB30_BUSINESS);
-   }
    
-   public Object createEjb21Proxy(Object id)
+   @Override
+   String getStackNameInterceptors()
    {
-      return this.createProxy(id,SpecificationInterfaceType.EJB21);
+      return StatefulRemoteProxyFactory.STACK_NAME_STATEFUL_SESSION_CLIENT_INTERCEPTORS;
    }
    
-   private Object createProxy(Object id,SpecificationInterfaceType type)
-   {
-      String stackName = StatefulRemoteProxyFactory.STACK_NAME_STATEFUL_SESSION_CLIENT_INTERCEPTORS;
-      if (binding.interceptorStack() != null && !binding.interceptorStack().trim().equals(""))
-      {
-         stackName = binding.interceptorStack();
-      }
-      AdviceStack stack = AspectManager.instance().getAdviceStack(stackName);
-      if (stack == null) throw new RuntimeException("unable to find interceptor stack: " + stackName);
-      StatefulRemoteProxy proxy = new StatefulRemoteProxy(getContainer(), stack.createInterceptors(getContainer().getAdvisor(), null), locator, id);
-      this.setEjb21Objects(proxy);
-      return type.equals(SpecificationInterfaceType.EJB21) ? this.constructEjb21Proxy(proxy) : this
-            .constructBusinessProxy(proxy);
-   }
-   
    /**
     * @return unique name for this proxy factory
     */

Added: projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/stateful/StatefulSessionContextDelegate.java
===================================================================
--- projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/stateful/StatefulSessionContextDelegate.java	                        (rev 0)
+++ projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/stateful/StatefulSessionContextDelegate.java	2008-04-11 08:04:37 UTC (rev 72001)
@@ -0,0 +1,102 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, 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.
+ */
+package org.jboss.ejb3.stateful;
+
+import javax.ejb.EJBLocalObject;
+import javax.ejb.EJBObject;
+
+import org.jboss.ejb3.session.SessionBeanContext;
+import org.jboss.ejb3.session.SessionContextDelegateBase;
+
+/**
+ * StatefulSessionContextDelegate
+ * 
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ * @param <T>
+ */
+public class StatefulSessionContextDelegate extends SessionContextDelegateBase<StatefulContainer>
+{
+
+   public StatefulSessionContextDelegate(SessionBeanContext<StatefulContainer> beanContext)
+   {
+      super(beanContext);
+   }
+   
+   @Override
+   public EJBLocalObject getEJBLocalObject() throws IllegalStateException
+   {
+      try
+      {
+         Object id = beanContext.getId();
+         EJBLocalObject proxy = null;
+         try
+         {
+               proxy = (EJBLocalObject) container.createProxyLocalEjb21(id);
+         }
+         // Proxy does not implement EJBLocalObject
+         catch (ClassCastException cce)
+         {
+            // JIRA EJBTHREE-1057
+            throw new IllegalStateException("EJB3 Specification Violation: " + container.getBeanClassName()
+                  + " does not have a local interface; "
+                  + "EJB3 Spec 4.3.3 Bullet 12: Only session beans with a local EJBLocalObject interface "
+                  + "can call this method.");
+
+         }
+         return proxy;
+      }
+      catch (Exception e)
+      {
+         throw new IllegalStateException(e);
+      }
+   }
+   
+   @Override
+   public EJBObject getEJBObject() throws IllegalStateException
+   {
+      try
+      {
+         Object id = beanContext.getId();
+         EJBObject proxy = null;
+         try
+         {
+            proxy = (EJBObject) container.createProxyRemoteEjb21(id);
+         }
+         // Proxy does not implement EJBObject
+         catch (ClassCastException cce)
+         {
+            // JIRA EJBTHREE-1057
+            throw new IllegalStateException("EJB3 Specification Violation: " + container.getBeanClassName()
+                  + " does not have a remote interface; "
+                  + "EJB3 Spec 4.3.3 Bullet 10: Only session beans with a remote EJBObject interface "
+                  + "can call this method.");
+         }
+         return proxy;
+      }
+      catch (Exception e)
+      {
+         throw new IllegalStateException(e);
+      }
+   }
+
+}

Modified: projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/stateful/StatefulSessionContextImpl.java
===================================================================
--- projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/stateful/StatefulSessionContextImpl.java	2008-04-11 07:12:16 UTC (rev 72000)
+++ projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/stateful/StatefulSessionContextImpl.java	2008-04-11 08:04:37 UTC (rev 72001)
@@ -37,8 +37,6 @@
 import javax.xml.rpc.handler.MessageContext;
 
 import org.jboss.ejb3.Ejb3Registry;
-import org.jboss.ejb3.session.SessionBeanContext;
-import org.jboss.ejb3.session.SessionContextImpl;
 
 /**
  * A session context that is serializable.
@@ -95,11 +93,11 @@
       this.isClustered = isClustered;
    }
    
-   public StatefulSessionContextImpl(SessionBeanContext beanContext)
+   public StatefulSessionContextImpl(StatefulBeanContext beanContext)
    {
       assert beanContext != null : "beanContext is null";
       
-      this.delegate = new SessionContextImpl(beanContext);
+      this.delegate = new StatefulSessionContextDelegate(beanContext);
       this.containerGuid = Ejb3Registry.guid(beanContext.getContainer());
       this.containerClusterUid =Ejb3Registry.clusterUid(beanContext.getContainer());
       this.id = beanContext.getId();
@@ -129,7 +127,7 @@
          if (container == null && isClustered)
             container = (StatefulContainer)Ejb3Registry.getClusterContainer(containerClusterUid);
          
-         delegate = new SessionContextImpl(container.getCache().get(id, false));
+         delegate = new StatefulSessionContextDelegate(container.getCache().get(id, false));
       }
       return delegate;
    }

Modified: projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/stateless/BaseStatelessProxyFactory.java
===================================================================
--- projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/stateless/BaseStatelessProxyFactory.java	2008-04-11 07:12:16 UTC (rev 72000)
+++ projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/stateless/BaseStatelessProxyFactory.java	2008-04-11 08:04:37 UTC (rev 72001)
@@ -21,23 +21,9 @@
  */
 package org.jboss.ejb3.stateless;
 
-import java.io.Serializable;
-import java.lang.reflect.Constructor;
-import java.lang.reflect.InvocationHandler;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.lang.reflect.Proxy;
-
-import javassist.util.proxy.MethodHandler;
-import javassist.util.proxy.ProxyObject;
-
-import javax.naming.Context;
-import javax.naming.NamingException;
-
-import org.jboss.aop.Advisor;
-import org.jboss.ejb3.Container;
 import org.jboss.ejb3.ProxyFactory;
-import org.jboss.ejb3.session.SessionContainer;
+import org.jboss.ejb3.session.ProxyAccessType;
+import org.jboss.ejb3.session.SessionSpecContainer;
 import org.jboss.logging.Logger;
 import org.jboss.util.naming.Util;
 
@@ -50,14 +36,8 @@
 public abstract class BaseStatelessProxyFactory extends org.jboss.ejb3.session.BaseSessionProxyFactory implements ProxyFactory
 {
    private static final Logger log = Logger.getLogger(BaseStatelessProxyFactory.class);
-
-//   protected Class proxyClass;
-//   protected Context proxyFactoryContext;
-   protected String jndiName;
    
-   private Constructor proxyConstructor;
-   
-   public BaseStatelessProxyFactory(SessionContainer container, String jndiName)
+   public BaseStatelessProxyFactory(SessionSpecContainer container, String jndiName)
    {
       super(container);
       
@@ -93,121 +73,41 @@
    }
    */
    
-   /**
-    * Adapt the InvocationHandler to MethodHandler.
-    * 
-    * This is a named class because it implements both MethodHandler and Serializable.
-    */
-   private static class MethodHandlerAdapter implements MethodHandler, Serializable
-   {
-      private static final long serialVersionUID = 1L;
-      
-      private InvocationHandler delegate;
-      
-      private MethodHandlerAdapter(InvocationHandler delegate)
-      {
-         if(delegate == null)
-            throw new IllegalArgumentException("delegate must not be null");
-         this.delegate = delegate;
-      }
-      
-      public Object invoke(Object self, Method thisMethod, Method process, Object[] args) throws Throwable
-      {
-         return delegate.invoke(self, thisMethod, args);
-      }         
-   }
+//   /**
+//    * Adapt the InvocationHandler to MethodHandler.
+//    * 
+//    * This is a named class because it implements both MethodHandler and Serializable.
+//    */
+//   private static class MethodHandlerAdapter implements MethodHandler, Serializable
+//   {
+//      private static final long serialVersionUID = 1L;
+//      
+//      private InvocationHandler delegate;
+//      
+//      private MethodHandlerAdapter(InvocationHandler delegate)
+//      {
+//         if(delegate == null)
+//            throw new IllegalArgumentException("delegate must not be null");
+//         this.delegate = delegate;
+//      }
+//      
+//      public Object invoke(Object self, Method thisMethod, Method process, Object[] args) throws Throwable
+//      {
+//         return delegate.invoke(self, thisMethod, args);
+//      }         
+//   }
    
-   /**
-    * Hide the fact that I'm now using javassist.
-    * 
-    * @param handler    a JDK proxy InvocationHandler
-    * @return           a true proxy
-    */
-   protected Object constructProxy(final InvocationHandler handler)
-   {
-      try
-      {
-         /* plain jdk */
-         Object args[] = { handler };
-         Object proxy = proxyConstructor.newInstance(args);
-         
-         /* javassist */
-         /*
-         MethodHandler realHandler = new MethodHandlerAdapter(handler);
-//         ProxyObject proxy = (ProxyObject) proxyConstructor.newInstance((Object[]) null);
-//         proxy.setHandler(realHandler);
-         JavassistProxy proxy = (JavassistProxy) proxyConstructor.newInstance((Object[]) null);
-         proxy.setMethodHandler(realHandler);
-         JavassistProxy.pokeInterfaces(proxy, getInterfaces());
-         */
-         
-         /* cglib */
-         /*
-         Object args[] = { new CGLibInvocationHandlerAdapter(handler) };
-         Object proxy = proxyConstructor.newInstance(args);
-         */
-         
-         return proxy;
-      }
-      catch (IllegalArgumentException e)
-      {
-         throw new RuntimeException(e);
-      }
-      catch (InstantiationException e)
-      {
-         throw new RuntimeException(e);
-      }
-      catch (IllegalAccessException e)
-      {
-         throw new RuntimeException(e);
-      }
-      catch (InvocationTargetException e)
-      {
-         throw new RuntimeException(e.getTargetException());
-      }
-   }
    
-   public final Object createProxy(Object id)
+   public final Object createProxyBusiness(Object id)
    {
       assert id == null : "stateless bean must not have an id";
-      return createProxy();
+      return createProxyBusiness();
    }
    
    public void init() throws Exception
    {
-      initializeJndiName();
-      Class<?>[] interfaces = getInterfaces();
+      this.createProxyConstructors();
       this.validateEjb21Views();
-      
-      
-      /* plain jdk */
-      Class<?> proxyClass = java.lang.reflect.Proxy.getProxyClass(getContainer().getBeanClass().getClassLoader(), interfaces);
-      final Class<?>[] constructorParams =
-              {InvocationHandler.class};
-      proxyConstructor = proxyClass.getConstructor(constructorParams);
-      
-      /* javassist */
-      /*
-      proxyFactory = new javassist.util.proxy.ProxyFactory()
-      {
-         @Override
-         protected ClassLoader getClassLoader()
-         {
-            return container.getBeanClass().getClassLoader();
-         }
-      };
-      proxyFactory.setInterfaces(interfaces);
-      proxyFactory.setSuperclass(JavassistProxy.class);
-      proxyClass = proxyFactory.createClass();
-      proxyConstructor = proxyClass.getConstructor((Class[]) null);
-      */
-      
-      /* cglib */
-      /*
-      proxyClass = net.sf.cglib.proxy.Proxy.getProxyClass(container.getBeanClass().getClassLoader(), interfaces);
-      final Class[] constructorParams = {net.sf.cglib.proxy.InvocationHandler.class};
-      proxyConstructor = proxyClass.getConstructor(constructorParams);
-      */
    }
 
    /* for debugging purposes * /
@@ -229,7 +129,7 @@
    {
       init();
 
-      Object proxy = createProxy();
+      Object proxy = createProxyBusiness();
       //describeClass(proxy.getClass());
       bindProxy(proxy);
    }
@@ -238,24 +138,9 @@
    {
       Util.unbind(getContainer().getInitialContext(), jndiName);
    }
-
-   protected abstract Class<?>[] getInterfaces();
    
    protected abstract void validateEjb21Views();
+   
+   protected abstract ProxyAccessType getProxyAccessType();
 
-   protected final void initializeJndiName() {};
-
-   protected void bindProxy(Object proxy) throws NamingException
-   {
-      try
-      {
-         log.debug("Binding proxy for " + getContainer().getEjbName() + " in JNDI at " + jndiName);
-         Util.rebind(getContainer().getInitialContext(), jndiName, proxy);
-      } catch (NamingException e)
-      {
-         NamingException namingException = new NamingException("Could not bind stateless proxy with ejb name " + getContainer().getEjbName() + " into JNDI under jndiName: " + getContainer().getInitialContext().getNameInNamespace() + "/" + jndiName);
-         namingException.setRootCause(e);
-         throw namingException;
-      }
-   }
 }

Added: projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/stateless/BaseStatelessRemoteProxyFactory.java
===================================================================
--- projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/stateless/BaseStatelessRemoteProxyFactory.java	                        (rev 0)
+++ projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/stateless/BaseStatelessRemoteProxyFactory.java	2008-04-11 08:04:37 UTC (rev 72001)
@@ -0,0 +1,134 @@
+package org.jboss.ejb3.stateless;
+
+import javax.ejb.EJBObject;
+import javax.ejb.RemoteHome;
+
+import org.jboss.aop.AspectManager;
+import org.jboss.aop.advice.AdviceStack;
+import org.jboss.ejb3.ProxyFactoryHelper;
+import org.jboss.ejb3.SpecificationInterfaceType;
+import org.jboss.ejb3.annotation.RemoteBinding;
+import org.jboss.ejb3.remoting.RemoteProxyFactory;
+import org.jboss.ejb3.session.ProxyAccessType;
+import org.jboss.ejb3.session.SessionContainer;
+import org.jboss.ejb3.session.SessionSpecContainer;
+import org.jboss.remoting.InvokerLocator;
+
+public abstract class BaseStatelessRemoteProxyFactory extends BaseStatelessProxyFactory implements RemoteProxyFactory
+{
+   
+   // Instance Members
+   
+   private RemoteBinding binding;
+   
+   private InvokerLocator locator;
+   
+   // Constructor
+   public BaseStatelessRemoteProxyFactory(SessionSpecContainer container, RemoteBinding binding)
+   {
+      super(container, binding.jndiBinding());
+      
+      this.binding = binding;
+      
+      try
+      {
+         String clientBindUrl = ProxyFactoryHelper.getClientBindUrl(this.getBinding());
+         this.locator = new InvokerLocator(clientBindUrl);
+      }
+      catch (Exception e)
+      {
+         throw new RuntimeException(e);
+      }
+   }
+   
+   // Required Implementations
+
+   @Override
+   protected final ProxyAccessType getProxyAccessType()
+   {
+      return ProxyAccessType.REMOTE;
+   }  
+   
+   @Override
+   protected final void validateEjb21Views()
+   {
+      // Obtain Container
+      SessionContainer container = this.getContainer();
+      
+      // Obtain @RemoteHome
+      RemoteHome remoteHome = container.getAnnotation(RemoteHome.class);
+
+      // Ensure that if EJB 2.1 Components are defined, they're complete
+      this.validateEjb21Views(remoteHome == null ? null : remoteHome.value(), ProxyFactoryHelper
+            .getRemoteInterfaces(container));
+   }
+   
+   // Specifications
+   
+   abstract String getStackNameInterceptors();
+   
+   // Functional Methods 
+   
+   protected boolean bindHomeAndBusinessTogether(SessionContainer container)
+   {
+      String homeJndiName = ProxyFactoryHelper.getHomeJndiName(container);
+      String remoteBusinessJndiName = ProxyFactoryHelper.getRemoteBusinessJndiName(container);
+      return homeJndiName.equals(remoteBusinessJndiName);
+   }
+   
+   public Object createProxyBusiness()
+   {
+      return this.createProxy(SpecificationInterfaceType.EJB30_BUSINESS);
+   }
+   
+   public Object createProxy(SpecificationInterfaceType type)
+   {
+      String stackName = this.getStackNameInterceptors();
+      if (binding.interceptorStack() != null && !binding.interceptorStack().equals(""))
+      {
+         stackName = binding.interceptorStack();
+      }
+      AdviceStack stack = AspectManager.instance().getAdviceStack(stackName);
+      StatelessRemoteProxy proxy = new StatelessRemoteProxy(getContainer(),
+            stack.createInterceptors(getContainer().getAdvisor(), null), locator);
+      
+      if(type.equals(SpecificationInterfaceType.EJB21))
+      {
+         return this.constructEjb21Proxy(proxy);
+      }
+      else
+      {
+         return this.constructProxyBusiness(proxy);
+      }
+   }
+   
+   @Override
+   protected final StatelessHandleRemoteImpl createHandle()
+   {
+      EJBObject proxy = this.createProxyEjb21();
+      StatelessHandleRemoteImpl handle = new StatelessHandleRemoteImpl(proxy);
+      return handle;
+   }
+   
+   @SuppressWarnings("unchecked")
+   public <T extends EJBObject> T createProxyEjb21()
+   {
+      // Cast explicitly to catch improper proxies
+      return (T)this.createProxy(SpecificationInterfaceType.EJB21);
+   }
+
+   // Accessors / Mutators
+   
+   RemoteBinding getBinding()
+   {
+      assert this.binding!=null : "RemoteBinding has not been initialized";
+      return this.binding;
+   }
+   
+   InvokerLocator getLocator()
+   {
+      assert this.locator!=null : "InvokerLocator has not been initialized"; 
+      return this.locator;
+   }
+
+}

Modified: projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/stateless/StatelessBeanContext.java
===================================================================
--- projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/stateless/StatelessBeanContext.java	2008-04-11 07:12:16 UTC (rev 72000)
+++ projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/stateless/StatelessBeanContext.java	2008-04-11 08:04:37 UTC (rev 72001)
@@ -21,11 +21,9 @@
  */
 package org.jboss.ejb3.stateless;
 
-import javax.xml.ws.WebServiceContext;
+import javax.ejb.EJBContext;
 
-import org.jboss.ejb3.BaseContext;
-import org.jboss.ejb3.session.SessionBeanContext;
-import org.jboss.ejb3.session.SessionContainer;
+import org.jboss.ejb3.session.SessionSpecBeanContext;
 import org.jboss.injection.lang.reflect.BeanProperty;
 
 
@@ -35,12 +33,12 @@
  * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
  * @version $Revision$
  */
-public class StatelessBeanContext extends SessionBeanContext
+public class StatelessBeanContext extends SessionSpecBeanContext<StatelessContainer>
 {
    private javax.xml.rpc.handler.MessageContext jaxrpcMessageContext;
    private BeanProperty webServiceContextProperty;
    
-   protected StatelessBeanContext(SessionContainer container, Object bean)
+   protected StatelessBeanContext(StatelessContainer container, Object bean)
    {
       super(container, bean);
    }
@@ -68,4 +66,12 @@
    public void remove()
    {
    }
+   
+   @Override
+   public EJBContext getEJBContext()
+   {
+      if(ejbContext == null)
+         ejbContext = new StatelessSessionContextImpl(this);
+      return ejbContext;
+   }
 }

Modified: projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/stateless/StatelessClusterProxyFactory.java
===================================================================
--- projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/stateless/StatelessClusterProxyFactory.java	2008-04-11 07:12:16 UTC (rev 72000)
+++ projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/stateless/StatelessClusterProxyFactory.java	2008-04-11 08:04:37 UTC (rev 72001)
@@ -33,6 +33,7 @@
 import org.jboss.aspects.remoting.FamilyWrapper;
 import org.jboss.ejb3.JBossProxy;
 import org.jboss.ejb3.ProxyFactoryHelper;
+import org.jboss.ejb3.SpecificationInterfaceType;
 import org.jboss.ejb3.annotation.Clustered;
 import org.jboss.ejb3.annotation.RemoteBinding;
 import org.jboss.ejb3.annotation.defaults.ClusteredDefaults;
@@ -40,6 +41,7 @@
 import org.jboss.ejb3.remoting.RemoteProxyFactory;
 import org.jboss.ejb3.remoting.RemoteProxyFactoryRegistry;
 import org.jboss.ejb3.session.SessionContainer;
+import org.jboss.ejb3.session.SessionSpecContainer;
 import org.jboss.ha.client.loadbalance.LoadBalancePolicy;
 import org.jboss.ha.client.loadbalance.RandomRobin;
 import org.jboss.ha.framework.interfaces.ClusteringTargetsRepository;
@@ -56,11 +58,13 @@
  * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
  * @version $Revision$
  */
-public class StatelessClusterProxyFactory extends BaseStatelessProxyFactory  
+public class StatelessClusterProxyFactory extends BaseStatelessRemoteProxyFactory  
    implements RemoteProxyFactory, DistributedReplicantManager.ReplicantListener
 {
    private static final Logger log = Logger.getLogger(StatelessClusterProxyFactory.class);
 
+   private static final String STACK_NAME_CLUSTERED_STATELESS_SESSION_CLIENT_INTERCEPTORS = "ClusteredStatelessSessionClientInterceptors";
+   
    private RemoteBinding binding;
    private Clustered clustered;
    private InvokerLocator locator;
@@ -71,9 +75,9 @@
    private FamilyWrapper wrapper;
    private Object proxy;
 
-   public StatelessClusterProxyFactory(SessionContainer container, RemoteBinding binding, Clustered clustered)
+   public StatelessClusterProxyFactory(SessionSpecContainer container, RemoteBinding binding, Clustered clustered)
    {
-      super(container, binding.jndiBinding());
+      super(container, binding);
       
       assert clustered != null : "clustered is null";
       
@@ -81,42 +85,6 @@
       this.clustered = clustered;
    }
 
-   protected Class<?>[] getInterfaces()
-   {
-      // Initialize
-      Set<Class<?>> interfaces = new HashSet<Class<?>>();
-      
-      // Obtain remote and business remote interfaces
-      Class<?>[] remoteAndBusinessRemoteInterfaces = ProxyFactoryHelper
-            .getRemoteAndBusinessRemoteInterfaces(getContainer());
-      
-      // Add all remote and business remotes
-      for(Class<?> interfaze : remoteAndBusinessRemoteInterfaces)
-      {
-         interfaces.add(interfaze);
-      }
-      
-      // Add JBossProxy
-      interfaces.add( JBossProxy.class);
-      
-      // Return
-      return interfaces.toArray(new Class[]{});
-   }
-   
-   protected void validateEjb21Views()
-   { 
-      // Obtain Container
-      SessionContainer container = this.getContainer();
-      
-      // Obtain @RemoteHome
-      RemoteHome remoteHome = container.getAnnotation(RemoteHome.class);
-
-      // Ensure that if EJB 2.1 Components are defined, they're complete
-      this.validateEjb21Views(remoteHome == null ? null : remoteHome.value(), ProxyFactoryHelper
-            .getRemoteInterfaces(container));
-
-   }
-
    public void start() throws Exception
    {
       String clientBindUrl = ProxyFactoryHelper.getClientBindUrl(binding);
@@ -165,10 +133,10 @@
       ((StatelessContainer) getContainer()).getClusterFamilies().remove(proxyFamilyName);
    }
 
-   public Object createProxy()
+   public Object createProxyBusiness()
    {
       Object containerId = getContainer().getObjectName().getCanonicalName();
-      String stackName = "ClusteredStatelessSessionClientInterceptors";
+      String stackName = this.getStackNameInterceptors();
       if (binding.interceptorStack() != null && !binding.interceptorStack().equals(""))
       {
          stackName = binding.interceptorStack();
@@ -180,18 +148,10 @@
       */
       String partitionName = ((StatelessContainer) getContainer()).getPartitionName();
       
-      proxy = constructProxy(new StatelessClusteredProxy(getContainer(), stack.createInterceptors(getContainer().getAdvisor(), null), 
-            wrapper, lbPolicy, partitionName));
+      proxy = constructProxy(new StatelessClusteredProxy(getContainer(), stack.createInterceptors(getContainer()
+            .getAdvisor(), null), wrapper, lbPolicy, partitionName), SpecificationInterfaceType.EJB30_BUSINESS);
       return proxy;
    }
-
-   protected StatelessHandleImpl getHandle()
-   {
-      StatelessHandleImpl handle = new StatelessHandleImpl();
-      handle.jndiName = binding.jndiBinding();
- 
-      return handle;
-   }
    
    public synchronized void replicantsChanged (String key, 
          List newReplicants, 
@@ -213,4 +173,10 @@
          log.error(e);
       }
    }
+
+   @Override
+   String getStackNameInterceptors()
+   {
+      return StatelessClusterProxyFactory.STACK_NAME_CLUSTERED_STATELESS_SESSION_CLIENT_INTERCEPTORS;
+   }
 }

Modified: projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/stateless/StatelessContainer.java
===================================================================
--- projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/stateless/StatelessContainer.java	2008-04-11 07:12:16 UTC (rev 72000)
+++ projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/stateless/StatelessContainer.java	2008-04-11 08:04:37 UTC (rev 72001)
@@ -45,15 +45,12 @@
 import org.jboss.ejb3.BeanContextLifecycleCallback;
 import org.jboss.ejb3.EJBContainerInvocation;
 import org.jboss.ejb3.Ejb3Deployment;
-import org.jboss.ejb3.ProxyFactory;
 import org.jboss.ejb3.ProxyFactoryHelper;
 import org.jboss.ejb3.ProxyUtils;
 import org.jboss.ejb3.annotation.Clustered;
 import org.jboss.ejb3.annotation.LocalBinding;
 import org.jboss.ejb3.annotation.RemoteBinding;
-import org.jboss.ejb3.annotation.RemoteBindings;
-import org.jboss.ejb3.remoting.RemoteProxyFactory;
-import org.jboss.ejb3.session.SessionContainer;
+import org.jboss.ejb3.session.SessionSpecContainer;
 import org.jboss.ejb3.timerservice.TimedObjectInvoker;
 import org.jboss.ejb3.timerservice.TimerServiceFactory;
 import org.jboss.injection.lang.reflect.BeanProperty;
@@ -61,7 +58,6 @@
 import org.jboss.metadata.ejb.jboss.JBossSessionBeanMetaData;
 import org.jboss.metadata.ejb.spec.NamedMethodMetaData;
 import org.jboss.proxy.ejb.handle.HomeHandleImpl;
-import org.jboss.proxy.ejb.handle.StatelessHandleImpl;
 import org.jboss.wsf.spi.SPIProvider;
 import org.jboss.wsf.spi.SPIProviderResolver;
 import org.jboss.wsf.spi.invocation.ExtensibleWebServiceContext;
@@ -77,7 +73,7 @@
  * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
  * @version $Revision$
  */
-public class StatelessContainer extends SessionContainer
+public class StatelessContainer extends SessionSpecContainer
   implements TimedObjectInvoker, ServiceEndpointContainer
 {
    private static final Logger log = Logger.getLogger(StatelessContainer.class);
@@ -101,23 +97,77 @@
    }
    
    @Override
-   protected ProxyFactory createProxyFactory(LocalBinding binding)
+   protected StatelessLocalProxyFactory getProxyFactory(LocalBinding binding)
    {
-      return new StatelessLocalProxyFactory(this, binding);
+      StatelessLocalProxyFactory factory = (StatelessLocalProxyFactory) this.proxyDeployer.getProxyFactory(binding);
+
+      if (factory == null)
+      {
+         factory = new StatelessLocalProxyFactory(this, binding);
+         try
+         {
+            factory.init();
+         }
+         catch (Exception e)
+         {
+            throw new RuntimeException(e);
+         }
+      }
+
+      return factory;
    }
    
    @Override
-   protected RemoteProxyFactory createRemoteProxyFactory(RemoteBinding binding)
+   protected BaseStatelessRemoteProxyFactory getProxyFactory(RemoteBinding binding)
    {
-      Clustered clustered = getAnnotation(Clustered.class);
-      if(clustered != null)
-         return new StatelessClusterProxyFactory(this, binding, clustered);
-      else
-         return new StatelessRemoteProxyFactory(this, binding);
+      BaseStatelessRemoteProxyFactory factory = (BaseStatelessRemoteProxyFactory) this.proxyDeployer
+            .getProxyFactory(binding);
+
+      if (factory == null)
+      {
+         Clustered clustered = getAnnotation(Clustered.class);
+         if (clustered != null)
+            factory = new StatelessClusterProxyFactory(this, binding, clustered);
+         else
+            factory = new StatelessRemoteProxyFactory(this, binding);
+         
+         try
+         {
+            factory.init();
+         }
+         catch (Exception e)
+         {
+            throw new RuntimeException(e);
+         }
+      }
+
+      return factory;
    }
    
-   public Object createSession(Class initTypes[], Object initArgs[])
+   /**
+    * Create a local proxy (EJBLocalObject) for an enterprise bean identified by id, with
+    * the specified LocalBinding
+    * 
+    * @param id
+    * @return
+    * @throws Exception
+    */
+   @Override
+   public Object createProxyLocalEjb21(LocalBinding binding) throws Exception
    {
+      StatelessLocalProxyFactory proxyFactory = this.getProxyFactory(binding);
+      return proxyFactory.createProxyEjb21();
+   }
+   
+   @Override
+   public Object createProxyRemoteEjb21(RemoteBinding binding) throws Exception
+   {
+      BaseStatelessRemoteProxyFactory proxyFactory = this.getProxyFactory(binding);
+      return proxyFactory.createProxyEjb21();
+   }
+   
+   public Object createSession(Class<?> initTypes[], Object initArgs[])
+   {
       if((initTypes != null && initTypes.length > 0) || (initArgs != null && initArgs.length > 0))
          throw new IllegalArgumentException("stateless bean create method must take no arguments (EJB3 4.5)");
       // a stateless bean has no sessions
@@ -370,10 +420,11 @@
       Method unadvisedMethod = info.getUnadvisedMethod();
       if (unadvisedMethod.getName().equals("getHandle"))
       {
-         StatelessHandleImpl handle = null;
-         RemoteBinding remoteBindingAnnotation = (RemoteBinding) resolveAnnotation(RemoteBinding.class);
-         if (remoteBindingAnnotation != null)
-            handle = new StatelessHandleImpl(remoteBindingAnnotation.jndiBinding());
+         
+         StatelessHandleRemoteImpl handle = null;
+         RemoteBinding binding = this.getAnnotation(RemoteBinding.class);
+         BaseStatelessRemoteProxyFactory factory = this.getProxyFactory(binding);
+         handle = factory.createHandle();
 
          return handle;
       }
@@ -385,7 +436,7 @@
       {
          HomeHandleImpl homeHandle = null;
 
-         RemoteBinding remoteBindingAnnotation = (RemoteBinding) resolveAnnotation(RemoteBinding.class);
+         RemoteBinding remoteBindingAnnotation = this.getAnnotation(RemoteBinding.class);
          if (remoteBindingAnnotation != null)
             homeHandle = new HomeHandleImpl(ProxyFactoryHelper.getHomeJndiName(this));
 
@@ -409,14 +460,13 @@
    {
       if (method.getName().equals("create"))
       {
-         LocalBinding binding = (LocalBinding) resolveAnnotation(LocalBinding.class);
+         LocalBinding binding = this.getAnnotation(LocalBinding.class);
          
          // FIXME: why this binding? Could be another one. (there is only one local binding, but that's another bug)
          
-         StatelessLocalProxyFactory factory = new StatelessLocalProxyFactory(this, binding);
-         factory.init();
+         StatelessLocalProxyFactory factory = this.getProxyFactory(binding);
 
-         Object proxy = factory.createProxy();
+         Object proxy = factory.createProxyEjb21();
 
          return proxy;
       }
@@ -425,52 +475,17 @@
          return null;
       }
    }
-   
-   public Object createLocalProxy(Object id, LocalBinding binding) throws Exception
-   {
-      StatelessLocalProxyFactory factory = new StatelessLocalProxyFactory(this, binding);
-      factory.init();
 
-      Object proxy = factory.createProxy();
-
-      return proxy;
-   }
-   
-   public Object createRemoteProxy(Object id, RemoteBinding binding) throws Exception
-   {
-//      RemoteBinding binding = null;
-//
-//      RemoteBindings bindings = (RemoteBindings) resolveAnnotation(RemoteBindings.class);
-//      if (bindings != null)
-//         binding = bindings.value()[0];
-//      else
-//         binding = (RemoteBinding) resolveAnnotation(RemoteBinding.class);
-
-      StatelessRemoteProxyFactory factory = new StatelessRemoteProxyFactory(this, binding);
-      factory.init();
-
-      return factory.createProxy();
-   }
-
    protected Object invokeHomeMethod(MethodInfo info, MethodInvocation invocation) throws Throwable
    {
       Method unadvisedMethod = info.getUnadvisedMethod();
       if (unadvisedMethod.getName().equals("create"))
       {
-         RemoteBinding binding = null;
-
-         RemoteBindings bindings = (RemoteBindings) resolveAnnotation(RemoteBindings.class);
-         if (bindings != null)
-            binding = bindings.value()[0];
-         else
-            binding = (RemoteBinding) resolveAnnotation(RemoteBinding.class);
-
-         // FIXME: why this binding? Better select the proper one.
+         RemoteBinding binding = this.getRemoteBinding();
          
-         StatelessRemoteProxyFactory factory = new StatelessRemoteProxyFactory(this, binding);
-         factory.init();
-
-         return factory.createProxy();
+         BaseStatelessRemoteProxyFactory factory = this.getProxyFactory(binding);
+         
+         return factory.createProxyEjb21();
       }
       else // remove
       {

Deleted: projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/stateless/StatelessHandleImpl.java
===================================================================
--- projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/stateless/StatelessHandleImpl.java	2008-04-11 07:12:16 UTC (rev 72000)
+++ projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/stateless/StatelessHandleImpl.java	2008-04-11 08:04:37 UTC (rev 72001)
@@ -1,130 +0,0 @@
-/*
- * 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.
- */
-package org.jboss.ejb3.stateless;
-
-import java.rmi.RemoteException;
-import java.rmi.ServerException;
-import java.lang.reflect.Method;
-import java.lang.reflect.Proxy;
-import java.io.ObjectStreamField;
-import java.io.ObjectInputStream;
-import java.io.IOException;
-import java.io.ObjectOutputStream;
-import java.util.Hashtable;
-
-import javax.naming.InitialContext;
-import javax.ejb.Handle;
-import javax.ejb.EJBObject;
-import javax.ejb.EJBHome;
-
-import org.jboss.ejb3.InitialContextFactory;
-import org.jboss.naming.NamingContextFactory;
-
-/**
- * An EJB stateless session bean handle.
- *
- * @author  <a href="mailto:marc.fleury at jboss.org">Marc Fleury</a>
- * @author Scott.Stark at jboss.org
- * @version $Revision$
- */
-public class StatelessHandleImpl
-      implements Handle
-{
-   /** Serial Version Identifier. */
-   static final long serialVersionUID = 3811452873535097661L;
-   private static final ObjectStreamField[] serialPersistentFields =
-      new ObjectStreamField[]
-   {
-      new ObjectStreamField("jndiName", String.class),
-      new ObjectStreamField("jndiEnv", Hashtable.class)
-   };
-
-   /** The JNDI name of the home inteface binding */
-   public String jndiName;
-   /** The JNDI env in effect when the home handle was created */
-   private Hashtable jndiEnv;
-
-   // Constructors --------------------------------------------------
-
-   public StatelessHandleImpl()
-   {
-      
-   }
-   
-   /**
-    * Construct a <tt>StatelessHandleImpl</tt>.
-    *
-    * @param handle    The initial context handle that will be used
-    *                  to restore the naming context or null to use
-    *                  a fresh InitialContext object.
-    * @param name      JNDI name.
-    */
-   public StatelessHandleImpl(String jndiName)
-   {
-      this.jndiName = jndiName;
-      this.jndiEnv = (Hashtable) NamingContextFactory.lastInitialContextEnv.get();
-   }
-
-   // Public --------------------------------------------------------
-
-   public EJBObject getEJBObject() throws RemoteException
-   {
-      try
-      {
-         InitialContext ic = InitialContextFactory.getInitialContext(jndiEnv);
-    
-         Proxy proxy = (Proxy) ic.lookup(jndiName);
-
-         return (EJBObject) proxy;
-      }
-      catch (Throwable t)
-      {
-         t.printStackTrace();
-         throw new RemoteException("Error during getEJBObject", t);
-      }
-   }
-
-   /**
-    * @return the jndi name
-    */
-   public String getJNDIName()
-   {
-      return jndiName;
-   }
-
-   private void readObject(ObjectInputStream ois)
-      throws IOException, ClassNotFoundException
-   {
-      ObjectInputStream.GetField getField = ois.readFields();
-      jndiName = (String) getField.get("jndiName", null);
-      jndiEnv = (Hashtable) getField.get("jndiEnv", null);
-   }
-
-   private void writeObject(ObjectOutputStream oos)
-      throws IOException
-   {
-      ObjectOutputStream.PutField putField = oos.putFields();
-      putField.put("jndiName", jndiName);
-      putField.put("jndiEnv", jndiEnv);
-      oos.writeFields();
-   }
-}

Added: projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/stateless/StatelessHandleRemoteImpl.java
===================================================================
--- projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/stateless/StatelessHandleRemoteImpl.java	                        (rev 0)
+++ projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/stateless/StatelessHandleRemoteImpl.java	2008-04-11 08:04:37 UTC (rev 72001)
@@ -0,0 +1,71 @@
+/*
+ * 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.
+ */
+package org.jboss.ejb3.stateless;
+
+import java.rmi.RemoteException;
+
+import javax.ejb.EJBObject;
+import javax.ejb.Handle;
+
+/**
+ * An EJB stateless session bean handle.
+ *
+ * @author  <a href="mailto:marc.fleury at jboss.org">Marc Fleury</a>
+ * @author Scott.Stark at jboss.org
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision$
+ */
+public class StatelessHandleRemoteImpl
+      implements Handle
+{
+   /** Serial Version Identifier. */
+   static final long serialVersionUID = 3811452873535097661L;
+   
+   private EJBObject proxy;
+
+   // Constructors --------------------------------------------------
+
+   public StatelessHandleRemoteImpl()
+   {
+      
+   }
+   
+   /**
+    * Construct a <tt>StatelessHandleImpl</tt>.
+    *
+    * @param handle    The initial context handle that will be used
+    *                  to restore the naming context or null to use
+    *                  a fresh InitialContext object.
+    * @param name      JNDI name.
+    */
+   public StatelessHandleRemoteImpl(EJBObject proxy)
+   {
+      this.proxy = proxy;
+   }
+
+   // Public --------------------------------------------------------
+
+   public EJBObject getEJBObject() throws RemoteException
+   {
+      return this.proxy;
+   }
+}


Property changes on: projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/stateless/StatelessHandleRemoteImpl.java
___________________________________________________________________
Name: svn:keywords
   + Author Date Id Revision
Name: svn:eol-style
   + native

Modified: projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/stateless/StatelessLocalProxyFactory.java
===================================================================
--- projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/stateless/StatelessLocalProxyFactory.java	2008-04-11 07:12:16 UTC (rev 72000)
+++ projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/stateless/StatelessLocalProxyFactory.java	2008-04-11 08:04:37 UTC (rev 72001)
@@ -21,17 +21,15 @@
  */
 package org.jboss.ejb3.stateless;
 
-import java.util.Arrays;
-import java.util.HashSet;
-import java.util.Set;
-
+import javax.ejb.EJBLocalObject;
 import javax.ejb.LocalHome;
 
 import org.jboss.ejb3.EJBContainer;
-import org.jboss.ejb3.JBossProxy;
 import org.jboss.ejb3.ProxyFactoryHelper;
+import org.jboss.ejb3.SpecificationInterfaceType;
 import org.jboss.ejb3.annotation.LocalBinding;
-import org.jboss.ejb3.session.SessionContainer;
+import org.jboss.ejb3.session.ProxyAccessType;
+import org.jboss.ejb3.session.SessionSpecContainer;
 import org.jboss.logging.Logger;
 import org.jboss.util.naming.Util;
 
@@ -46,47 +44,17 @@
 {
    private static final Logger log = Logger.getLogger(StatelessLocalProxyFactory.class);
    
-   public StatelessLocalProxyFactory(SessionContainer container, LocalBinding binding)
+   public StatelessLocalProxyFactory(SessionSpecContainer container, LocalBinding binding)
    {
       super(container, binding.jndiBinding());
    }
-
-   protected Class<?>[] getInterfaces()
+   
+   @Override
+   protected ProxyAccessType getProxyAccessType()
    {
-      EJBContainer statelessContainer = this.getContainer();
-      LocalHome localHome = statelessContainer.getAnnotation(LocalHome.class);
-
-      boolean bindTogether = false;
-
-      if (localHome != null && bindHomeAndBusinessTogether(statelessContainer))
-         bindTogether = true;
-
-      // Obtain all local interfaces
-      Set<Class<?>> localInterfaces = new HashSet<Class<?>>();
-      localInterfaces.addAll(Arrays.asList(ProxyFactoryHelper.getLocalAndBusinessLocalInterfaces(getContainer())));
-
-      // Ensure local interfaces defined
-      if (localInterfaces.size() > 0)
-      {
-         // Add JBossProxy
-         localInterfaces.add(JBossProxy.class);
-
-         // If binding along w/ home, add home
-         if (bindTogether)
-         {
-            localInterfaces.add(localHome.value());
-         }
-      }
-      else
-      {
-         // No remote interfaces defined, log warning
-         log.warn("[EJBTHREE-933] NPE when deploying web service beans");
-      }
-
-      // Return
-      return localInterfaces.toArray(new Class<?>[]
-      {});
+      return ProxyAccessType.LOCAL;
    }
+
    
    protected void validateEjb21Views(){
       
@@ -109,7 +77,7 @@
    {
       super.start();
       EJBContainer statelessContainer = (EJBContainer) getContainer();
-      LocalHome localHome = (LocalHome) statelessContainer.resolveAnnotation(LocalHome.class);
+      LocalHome localHome = statelessContainer.getAnnotation(LocalHome.class);
       if (localHome != null && !bindHomeAndBusinessTogether(statelessContainer))
       {
          Class<?>[] interfaces = {localHome.value()};
@@ -123,8 +91,8 @@
    public void stop() throws Exception
    {
       super.stop();
-      EJBContainer statelessContainer = (EJBContainer) getContainer();
-      LocalHome localHome = (LocalHome) statelessContainer.resolveAnnotation(LocalHome.class);
+      SessionSpecContainer statelessContainer = this.getContainer();
+      LocalHome localHome = statelessContainer.getAnnotation(LocalHome.class);
       if (localHome != null && !bindHomeAndBusinessTogether(statelessContainer))
       {
          Util.unbind(getContainer().getInitialContext(), ProxyFactoryHelper.getLocalHomeJndiName(getContainer()));
@@ -132,42 +100,30 @@
    }
 
 
-   public Object createProxy()
+   public Object createProxyBusiness()
    {
-      /*
-      try
-      {
-         Object[] args = {new StatelessLocalProxy(container)};
-         return proxyConstructor.newInstance(args);
-      }
-      catch (InstantiationException e)
-      {
-         throw new RuntimeException(e);  //To change body of catch statement use Options | File Templates.
-      }
-      catch (IllegalAccessException e)
-      {
-         throw new RuntimeException(e);  //To change body of catch statement use Options | File Templates.
-      }
-      catch (IllegalArgumentException e)
-      {
-         throw new RuntimeException(e);  //To change body of catch statement use Options | File Templates.
-      }
-      catch (InvocationTargetException e)
-      {
-         throw new RuntimeException(e.getTargetException());  //To change body of catch statement use Options | File Templates.
-      }
-      */
-      return constructProxy(new StatelessLocalProxy(getContainer()));
+      return this.constructProxyBusiness(new StatelessLocalProxy(getContainer()));
    }
-
-   protected StatelessHandleImpl getHandle()
+   
+   @SuppressWarnings("unchecked")
+   public <T extends EJBLocalObject> T createProxyEjb21()
    {
-      StatelessHandleImpl handle = new StatelessHandleImpl();
-      LocalBinding remoteBinding = (LocalBinding) getContainer().resolveAnnotation(LocalBinding.class);
-      if (remoteBinding != null)
-         handle.jndiName = remoteBinding.jndiBinding();
-
-      return handle;
+      return (T)this.createProxy(SpecificationInterfaceType.EJB21);
    }
+   
+   private Object createProxy(SpecificationInterfaceType type)
+   {
+      StatelessLocalProxy proxy = new StatelessLocalProxy(this.getContainer());
+      return type.equals(SpecificationInterfaceType.EJB30_BUSINESS) ? this.constructProxyBusiness(proxy) : this
+            .constructEjb21Proxy(proxy);
+   }
 
+   @Override
+   protected StatelessHandleRemoteImpl createHandle()
+   {
+      // Local beans have no Handle
+      //TODO Rework the contract such that this method does not need to be
+      // defined for local proxy factories
+      return null;
+   }
 }

Modified: projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/stateless/StatelessRemoteProxyFactory.java
===================================================================
--- projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/stateless/StatelessRemoteProxyFactory.java	2008-04-11 07:12:16 UTC (rev 72000)
+++ projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/stateless/StatelessRemoteProxyFactory.java	2008-04-11 08:04:37 UTC (rev 72001)
@@ -21,24 +21,18 @@
  */
 package org.jboss.ejb3.stateless;
 
-import java.util.Arrays;
-import java.util.HashSet;
-import java.util.Set;
-
 import javax.ejb.RemoteHome;
 import javax.naming.NamingException;
 
 import org.jboss.aop.AspectManager;
 import org.jboss.aop.advice.AdviceStack;
-import org.jboss.ejb3.EJBContainer;
-import org.jboss.ejb3.JBossProxy;
 import org.jboss.ejb3.ProxyFactoryHelper;
 import org.jboss.ejb3.annotation.RemoteBinding;
 import org.jboss.ejb3.remoting.RemoteProxyFactory;
-import org.jboss.ejb3.session.SessionContainer;
+import org.jboss.ejb3.session.SessionSpecContainer;
 import org.jboss.logging.Logger;
-import org.jboss.util.naming.Util;
 import org.jboss.remoting.InvokerLocator;
+import org.jboss.util.naming.Util;
 
 
 /**
@@ -47,88 +41,32 @@
  * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
  * @version $Revision$
  */
-public class StatelessRemoteProxyFactory extends BaseStatelessProxyFactory implements RemoteProxyFactory
+public class StatelessRemoteProxyFactory extends BaseStatelessRemoteProxyFactory implements RemoteProxyFactory
 {
    private static final Logger log = Logger.getLogger(StatelessRemoteProxyFactory.class);
+   
+   private static final String STACK_NAME_STATELESS_SESSION_CLIENT_INTERCEPTORS = "StatelessSessionClientInterceptors";
 
-   protected RemoteBinding binding;
-   protected InvokerLocator locator;
-
-   public StatelessRemoteProxyFactory(SessionContainer container, RemoteBinding binding)
+   public StatelessRemoteProxyFactory(SessionSpecContainer container, RemoteBinding binding)
    {
-      super(container, binding.jndiBinding());
-      
-      this.binding = binding;
+      super(container, binding);
    }
-
-   protected Class<?>[] getInterfaces()
-   {
-      SessionContainer container = this.getContainer();
-      RemoteHome remoteHome = container.getAnnotation(RemoteHome.class);
-
-      boolean bindTogether = false;
-
-      if (remoteHome != null && bindHomeAndBusinessTogether(container))
-         bindTogether = true;
-
-      // Obtain all remote interfaces
-      Set<Class<?>> remoteInterfaces = new HashSet<Class<?>>();
-      remoteInterfaces.addAll(Arrays.asList(ProxyFactoryHelper.getRemoteAndBusinessRemoteInterfaces(getContainer())));
-
-      // Ensure remote interfaces defined
-      if (remoteInterfaces.size() > 0)
-      {
-         // Add JBossProxy
-         remoteInterfaces.add(JBossProxy.class);
-
-         // If binding along w/ home, add home
-         if (bindTogether)
-         {
-            remoteInterfaces.add(remoteHome.value());
-         }
-      }
-      else
-      {
-         // No remote interfaces defined, log warning
-         log.warn("[EJBTHREE-933] NPE when deploying web service beans");
-      }
-
-      // Return
-      return remoteInterfaces.toArray(new Class<?>[]
-      {});
-   }
    
-   protected void validateEjb21Views()
+   protected boolean bindHomeAndBusinessTogether(SessionSpecContainer container)
    {
-      // Obtain Container
-      EJBContainer container = this.getContainer();
-
-      // Obtain @RemoteHome
-      RemoteHome remoteHome = container.getAnnotation(RemoteHome.class);
-
-      // Ensure that if EJB 2.1 Components are defined, they're complete
-      this.validateEjb21Views(remoteHome == null ? null : remoteHome.value(), ProxyFactoryHelper
-            .getRemoteInterfaces(container));
-   }
-   
-   protected boolean bindHomeAndBusinessTogether(EJBContainer container)
-   {
       return ProxyFactoryHelper.getHomeJndiName(container).equals(ProxyFactoryHelper.getRemoteBusinessJndiName(container));
    }
 
    public void init() throws Exception
    {
       super.init();
-      String clientBindUrl = ProxyFactoryHelper.getClientBindUrl(binding);
-      locator = new InvokerLocator(clientBindUrl);
    }
 
    public void start() throws Exception
    {
       super.start();
-      EJBContainer statelessContainer = (EJBContainer) getContainer();
-      RemoteHome remoteHome = (RemoteHome) statelessContainer.resolveAnnotation(RemoteHome.class);
-      if (remoteHome != null && !bindHomeAndBusinessTogether(statelessContainer))
+      RemoteHome remoteHome = this.getContainer().getAnnotation(RemoteHome.class);
+      if (remoteHome != null && !bindHomeAndBusinessTogether(this.getContainer()))
       {
          Object homeProxy = createHomeProxy(remoteHome.value());
          String jndiName = ProxyFactoryHelper.getHomeJndiName(getContainer());
@@ -150,29 +88,21 @@
    public void stop() throws Exception
    {
       super.stop();
-      EJBContainer statelessContainer = (EJBContainer) getContainer();
-      RemoteHome remoteHome = (RemoteHome) statelessContainer.resolveAnnotation(RemoteHome.class);
+      SessionSpecContainer statelessContainer = this.getContainer();
+      RemoteHome remoteHome = this.getContainer().getAnnotation(RemoteHome.class);
       if (remoteHome != null && !bindHomeAndBusinessTogether(statelessContainer))
       {
          Util.unbind(getContainer().getInitialContext(), ProxyFactoryHelper.getHomeJndiName(getContainer()));
       }
    }
 
-   protected StatelessHandleImpl getHandle()
+   public Object createHomeProxy(Class<?> homeInterface)
    {
-      StatelessHandleImpl handle = new StatelessHandleImpl();
-      RemoteBinding remoteBinding = (RemoteBinding) getContainer().resolveAnnotation(RemoteBinding.class);
-      if (remoteBinding != null)
-         handle.jndiName = remoteBinding.jndiBinding() ;
-
-      return handle;
-   }
-
-   public Object createHomeProxy(Class homeInterface)
-   {
       try
       {
-         String stackName = "StatelessSessionClientInterceptors";
+         String stackName = this.getStackNameInterceptors();
+         RemoteBinding binding = this.getBinding();
+         InvokerLocator locator = this.getLocator();
          if (binding.interceptorStack() != null && !binding.interceptorStack().equals(""))
          {
             stackName = binding.interceptorStack();
@@ -181,27 +111,19 @@
          StatelessRemoteProxy proxy = new StatelessRemoteProxy(getContainer(),
                stack.createInterceptors(getContainer().getAdvisor(), null), locator);
          setEjb21Objects(proxy);
-         Class[] interfaces = {homeInterface};
+         Class<?>[] interfaces = {homeInterface};
          return java.lang.reflect.Proxy.newProxyInstance(getContainer().getBeanClass().getClassLoader(), interfaces, proxy);
       }
       catch (IllegalArgumentException e)
       {
-         throw new RuntimeException(e);  //To change body of catch statement use Options | File Templates.
+         throw new RuntimeException(e);
       }
    }
 
-   public Object createProxy()
+   @Override
+   String getStackNameInterceptors()
    {
-      String stackName = "StatelessSessionClientInterceptors";
-      if (binding.interceptorStack() != null && !binding.interceptorStack().equals(""))
-      {
-         stackName = binding.interceptorStack();
-      }
-      AdviceStack stack = AspectManager.instance().getAdviceStack(stackName);
-      StatelessRemoteProxy proxy = new StatelessRemoteProxy(getContainer(),
-            stack.createInterceptors(getContainer().getAdvisor(), null), locator);
-      setEjb21Objects(proxy);
-      return constructProxy(proxy);
+      return StatelessRemoteProxyFactory.STACK_NAME_STATELESS_SESSION_CLIENT_INTERCEPTORS;
    }
 
 }

Added: projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/stateless/StatelessSessionContextDelegate.java
===================================================================
--- projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/stateless/StatelessSessionContextDelegate.java	                        (rev 0)
+++ projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/stateless/StatelessSessionContextDelegate.java	2008-04-11 08:04:37 UTC (rev 72001)
@@ -0,0 +1,73 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, 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.
+ */
+package org.jboss.ejb3.stateless;
+
+import javax.ejb.EJBLocalObject;
+import javax.ejb.EJBObject;
+
+import org.jboss.ejb3.session.SessionBeanContext;
+import org.jboss.ejb3.session.SessionContextDelegateBase;
+
+/**
+ * StatelessSessionContextDelegate
+ * 
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ * @param <T>
+ */
+public class StatelessSessionContextDelegate extends SessionContextDelegateBase<StatelessContainer>
+{
+
+   public StatelessSessionContextDelegate(SessionBeanContext<StatelessContainer> beanContext)
+   {
+      super(beanContext);
+   }
+   
+   @Override
+   public EJBLocalObject getEJBLocalObject() throws IllegalStateException
+   {
+      try
+      {
+         EJBLocalObject proxy = (EJBLocalObject) container.createProxyLocalEjb21();
+         return proxy;
+      }
+      catch (Exception e)
+      {
+         throw new IllegalStateException(e);
+      }
+   }
+   
+   @Override
+   public EJBObject getEJBObject() throws IllegalStateException
+   {
+      try
+      {
+         EJBObject proxy = (EJBObject) container.createProxyRemoteEjb21();
+         return proxy;
+      }
+      catch (Exception e)
+      {
+         throw new IllegalStateException(e);
+      }
+   }
+
+}

Added: projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/stateless/StatelessSessionContextImpl.java
===================================================================
--- projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/stateless/StatelessSessionContextImpl.java	                        (rev 0)
+++ projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/stateless/StatelessSessionContextImpl.java	2008-04-11 08:04:37 UTC (rev 72001)
@@ -0,0 +1,151 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, 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.ejb3.stateless;
+
+import java.io.Serializable;
+import java.security.Identity;
+import java.security.Principal;
+import java.util.Properties;
+
+import javax.ejb.EJBHome;
+import javax.ejb.EJBLocalHome;
+import javax.ejb.EJBLocalObject;
+import javax.ejb.EJBObject;
+import javax.ejb.SessionContext;
+import javax.ejb.TimerService;
+import javax.transaction.UserTransaction;
+import javax.xml.rpc.handler.MessageContext;
+
+/**
+ * A session context that is serializable.
+ * 
+ * Since a session context can be serialized with a bean it must not have a
+ * direct reference to StatelesssSessionContextDelegate.
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: 68144 $
+ */
+public class StatelessSessionContextImpl implements Serializable, SessionContext
+{
+   private static final long serialVersionUID = 1L;
+
+   private transient SessionContext delegate;
+
+   public StatelessSessionContextImpl(StatelessBeanContext beanContext)
+   {
+      assert beanContext != null : "beanContext is null";
+
+      this.delegate = new StatelessSessionContextDelegate(beanContext);
+   }
+
+   public <T> T getBusinessObject(Class<T> businessInterface) throws IllegalStateException
+   {
+      return getDelegate().getBusinessObject(businessInterface);
+   }
+
+   protected SessionContext getDelegate()
+   {
+      return delegate;
+   }
+
+   public EJBLocalObject getEJBLocalObject() throws IllegalStateException
+   {
+      return getDelegate().getEJBLocalObject();
+   }
+
+   public EJBObject getEJBObject() throws IllegalStateException
+   {
+      return getDelegate().getEJBObject();
+   }
+
+   public Class<?> getInvokedBusinessInterface() throws IllegalStateException
+   {
+      return getDelegate().getInvokedBusinessInterface();
+   }
+
+   public MessageContext getMessageContext() throws IllegalStateException
+   {
+      return getDelegate().getMessageContext();
+   }
+
+   @SuppressWarnings("deprecation")
+   public Identity getCallerIdentity()
+   {
+      return getDelegate().getCallerIdentity();
+   }
+
+   public Principal getCallerPrincipal()
+   {
+      return getDelegate().getCallerPrincipal();
+   }
+
+   public EJBHome getEJBHome()
+   {
+      return getDelegate().getEJBHome();
+   }
+
+   public EJBLocalHome getEJBLocalHome()
+   {
+      return getDelegate().getEJBLocalHome();
+   }
+
+   public Properties getEnvironment()
+   {
+      return getDelegate().getEnvironment();
+   }
+
+   public boolean getRollbackOnly() throws IllegalStateException
+   {
+      return getDelegate().getRollbackOnly();
+   }
+
+   public TimerService getTimerService() throws IllegalStateException
+   {
+      return getDelegate().getTimerService();
+   }
+
+   public UserTransaction getUserTransaction() throws IllegalStateException
+   {
+      return getDelegate().getUserTransaction();
+   }
+
+   @SuppressWarnings("deprecation")
+   public boolean isCallerInRole(Identity role)
+   {
+      return getDelegate().isCallerInRole(role);
+   }
+
+   public boolean isCallerInRole(String roleName)
+   {
+      return getDelegate().isCallerInRole(roleName);
+   }
+
+   public Object lookup(String name)
+   {
+      return getDelegate().lookup(name);
+   }
+
+   public void setRollbackOnly() throws IllegalStateException
+   {
+      getDelegate().setRollbackOnly();
+   }
+}

Modified: projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/util/Debugger.java
===================================================================
--- projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/util/Debugger.java	2008-04-11 07:12:16 UTC (rev 72000)
+++ projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/util/Debugger.java	2008-04-11 08:04:37 UTC (rev 72001)
@@ -25,7 +25,7 @@
  * Comment
  *
  * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
- * @version $Revision: $
+ * @version $Revision$
  */
 public class Debugger
 {

Modified: projects/ejb3/trunk/core/src/main/java/org/jboss/injection/InjectorFactory.java
===================================================================
--- projects/ejb3/trunk/core/src/main/java/org/jboss/injection/InjectorFactory.java	2008-04-11 07:12:16 UTC (rev 72000)
+++ projects/ejb3/trunk/core/src/main/java/org/jboss/injection/InjectorFactory.java	2008-04-11 08:04:37 UTC (rev 72001)
@@ -27,7 +27,7 @@
  * Allows the creation of injectors.
  *
  * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
- * @version $Revision: $
+ * @version $Revision$
  */
 public interface InjectorFactory<I extends Injector>
 {

Modified: projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/bank/TellerRemoteProxyFactory.java
===================================================================
--- projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/bank/TellerRemoteProxyFactory.java	2008-04-11 07:12:16 UTC (rev 72000)
+++ projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/bank/TellerRemoteProxyFactory.java	2008-04-11 08:04:37 UTC (rev 72001)
@@ -22,7 +22,7 @@
 package org.jboss.ejb3.test.bank;
 
 import org.jboss.ejb3.annotation.RemoteBinding;
-import org.jboss.ejb3.session.SessionContainer;
+import org.jboss.ejb3.session.SessionSpecContainer;
 import org.jboss.logging.Logger;
 
 /**
@@ -35,20 +35,8 @@
 {
    private static final Logger log = Logger.getLogger(TellerRemoteProxyFactory.class);
    
-   public TellerRemoteProxyFactory(SessionContainer container, RemoteBinding binding)
+   public TellerRemoteProxyFactory(SessionSpecContainer container, RemoteBinding binding)
    {
       super(container, binding);
    }
-
-   protected Class[] getInterfaces()
-   {
-      Class[] remoteInterfaces = super.getInterfaces();
-
-      Class[] interfaces = new Class[remoteInterfaces.length + 1];
-
-      System.arraycopy(remoteInterfaces, 0, interfaces, 0, remoteInterfaces.length);
-      interfaces[remoteInterfaces.length] = org.jboss.ejb3.test.bank.ProxyFactoryInterface.class;
-
-      return interfaces;
-   }
 }

Modified: projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1025/OrderService.java
===================================================================
--- projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1025/OrderService.java	2008-04-11 07:12:16 UTC (rev 72000)
+++ projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1025/OrderService.java	2008-04-11 08:04:37 UTC (rev 72001)
@@ -25,7 +25,7 @@
  * Comment
  *
  * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
- * @version $Revision: $
+ * @version $Revision$
  */
 public interface OrderService
 {

Modified: projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1025/OrderServiceBean.java
===================================================================
--- projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1025/OrderServiceBean.java	2008-04-11 07:12:16 UTC (rev 72000)
+++ projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1025/OrderServiceBean.java	2008-04-11 08:04:37 UTC (rev 72001)
@@ -29,7 +29,7 @@
  * This is an illegal construct.
  *
  * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
- * @version $Revision: $
+ * @version $Revision$
  */
 @Stateless
 @Local

Modified: projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1060/CommonRemote.java
===================================================================
--- projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1060/CommonRemote.java	2008-04-11 07:12:16 UTC (rev 72000)
+++ projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1060/CommonRemote.java	2008-04-11 08:04:37 UTC (rev 72001)
@@ -25,7 +25,7 @@
  * Comment
  *
  * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
- * @version $Revision: $
+ * @version $Revision$
  */
 public interface CommonRemote
 {

Modified: projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1060/InvokedBusinessInterfaceBean.java
===================================================================
--- projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1060/InvokedBusinessInterfaceBean.java	2008-04-11 07:12:16 UTC (rev 72000)
+++ projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1060/InvokedBusinessInterfaceBean.java	2008-04-11 08:04:37 UTC (rev 72001)
@@ -30,7 +30,7 @@
  * Comment
  *
  * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
- * @version $Revision: $
+ * @version $Revision$
  */
 @Stateless
 @Remote({Remote1.class, Remote2.class})

Modified: projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1060/Remote1.java
===================================================================
--- projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1060/Remote1.java	2008-04-11 07:12:16 UTC (rev 72000)
+++ projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1060/Remote1.java	2008-04-11 08:04:37 UTC (rev 72001)
@@ -25,7 +25,7 @@
  * Comment
  *
  * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
- * @version $Revision: $
+ * @version $Revision$
  */
 public interface Remote1 extends CommonRemote
 {

Modified: projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1060/Remote2.java
===================================================================
--- projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1060/Remote2.java	2008-04-11 07:12:16 UTC (rev 72000)
+++ projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1060/Remote2.java	2008-04-11 08:04:37 UTC (rev 72001)
@@ -25,7 +25,7 @@
  * Comment
  *
  * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
- * @version $Revision: $
+ * @version $Revision$
  */
 public interface Remote2 extends CommonRemote
 {

Modified: projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1060/TestFailedException.java
===================================================================
--- projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1060/TestFailedException.java	2008-04-11 07:12:16 UTC (rev 72000)
+++ projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1060/TestFailedException.java	2008-04-11 08:04:37 UTC (rev 72001)
@@ -25,7 +25,7 @@
  * Comment
  *
  * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
- * @version $Revision: $
+ * @version $Revision$
  */
 public class TestFailedException extends Exception
 {

Modified: projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1060/Tester.java
===================================================================
--- projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1060/Tester.java	2008-04-11 07:12:16 UTC (rev 72000)
+++ projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1060/Tester.java	2008-04-11 08:04:37 UTC (rev 72001)
@@ -27,7 +27,7 @@
  * Comment
  *
  * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
- * @version $Revision: $
+ * @version $Revision$
  */
 @Remote
 public interface Tester

Modified: projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1060/TesterBean.java
===================================================================
--- projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1060/TesterBean.java	2008-04-11 07:12:16 UTC (rev 72000)
+++ projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1060/TesterBean.java	2008-04-11 08:04:37 UTC (rev 72001)
@@ -30,7 +30,7 @@
  * Comment
  *
  * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
- * @version $Revision: $
+ * @version $Revision$
  */
 @Stateless
 public class TesterBean implements Tester

Modified: projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1060/unit/InvokedBusinessInterfaceUnitTestCase.java
===================================================================
--- projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1060/unit/InvokedBusinessInterfaceUnitTestCase.java	2008-04-11 07:12:16 UTC (rev 72000)
+++ projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1060/unit/InvokedBusinessInterfaceUnitTestCase.java	2008-04-11 08:04:37 UTC (rev 72001)
@@ -31,7 +31,7 @@
  * Test to see if the proper invoked business interface is returned.
  *
  * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
- * @version $Revision: $
+ * @version $Revision$
  */
 public class InvokedBusinessInterfaceUnitTestCase extends JBossTestCase
 {

Modified: projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1062/Calculator.java
===================================================================
--- projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1062/Calculator.java	2008-04-11 07:12:16 UTC (rev 72000)
+++ projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1062/Calculator.java	2008-04-11 08:04:37 UTC (rev 72001)
@@ -25,7 +25,7 @@
  * Comment
  *
  * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
- * @version $Revision: $
+ * @version $Revision$
  */
 public interface Calculator extends SuperInterface
 {

Modified: projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1062/CalculatorBean.java
===================================================================
--- projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1062/CalculatorBean.java	2008-04-11 07:12:16 UTC (rev 72000)
+++ projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1062/CalculatorBean.java	2008-04-11 08:04:37 UTC (rev 72001)
@@ -30,7 +30,7 @@
  * in effect the calculator bean only implements the calculator interface.
  *
  * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
- * @version $Revision: $
+ * @version $Revision$
  */
 @Stateless
 @Local

Modified: projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1062/CommonBase.java
===================================================================
--- projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1062/CommonBase.java	2008-04-11 07:12:16 UTC (rev 72000)
+++ projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1062/CommonBase.java	2008-04-11 08:04:37 UTC (rev 72001)
@@ -25,7 +25,7 @@
  * A common base for beans that implements an interface.
  *
  * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
- * @version $Revision: $
+ * @version $Revision$
  */
 public abstract class CommonBase implements CommonInterface
 {

Modified: projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1062/CommonInterface.java
===================================================================
--- projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1062/CommonInterface.java	2008-04-11 07:12:16 UTC (rev 72000)
+++ projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1062/CommonInterface.java	2008-04-11 08:04:37 UTC (rev 72001)
@@ -25,7 +25,7 @@
  * Comment
  *
  * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
- * @version $Revision: $
+ * @version $Revision$
  */
 public interface CommonInterface
 {

Modified: projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1062/MyStatelessBean.java
===================================================================
--- projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1062/MyStatelessBean.java	2008-04-11 07:12:16 UTC (rev 72000)
+++ projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1062/MyStatelessBean.java	2008-04-11 08:04:37 UTC (rev 72001)
@@ -30,7 +30,7 @@
  * But it extends a common base which also implements an interface.
  * 
  * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
- * @version $Revision: $
+ * @version $Revision$
  */
 @Stateless
 public class MyStatelessBean extends CommonBase implements MyStatelessLocal

Modified: projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1062/MyStatelessLocal.java
===================================================================
--- projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1062/MyStatelessLocal.java	2008-04-11 07:12:16 UTC (rev 72000)
+++ projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1062/MyStatelessLocal.java	2008-04-11 08:04:37 UTC (rev 72001)
@@ -25,7 +25,7 @@
  * This business interface should not be annotated.
  *
  * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
- * @version $Revision: $
+ * @version $Revision$
  */
 public interface MyStatelessLocal
 {

Modified: projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1062/SuperBean.java
===================================================================
--- projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1062/SuperBean.java	2008-04-11 07:12:16 UTC (rev 72000)
+++ projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1062/SuperBean.java	2008-04-11 08:04:37 UTC (rev 72001)
@@ -25,7 +25,7 @@
  * Comment
  *
  * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
- * @version $Revision: $
+ * @version $Revision$
  */
 public abstract class SuperBean implements SuperInterface
 {

Modified: projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1062/SuperInterface.java
===================================================================
--- projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1062/SuperInterface.java	2008-04-11 07:12:16 UTC (rev 72000)
+++ projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1062/SuperInterface.java	2008-04-11 08:04:37 UTC (rev 72001)
@@ -25,7 +25,7 @@
  * Comment
  *
  * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
- * @version $Revision: $
+ * @version $Revision$
  */
 public interface SuperInterface
 {

Modified: projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1066/Adder.java
===================================================================
--- projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1066/Adder.java	2008-04-11 07:12:16 UTC (rev 72000)
+++ projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1066/Adder.java	2008-04-11 08:04:37 UTC (rev 72001)
@@ -25,7 +25,7 @@
  * Comment
  *
  * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
- * @version $Revision: $
+ * @version $Revision$
  */
 public interface Adder
 {

Modified: projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1066/CalculatorBean.java
===================================================================
--- projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1066/CalculatorBean.java	2008-04-11 07:12:16 UTC (rev 72000)
+++ projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1066/CalculatorBean.java	2008-04-11 08:04:37 UTC (rev 72001)
@@ -28,7 +28,7 @@
  * - Subtractor 
  *
  * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
- * @version $Revision: $
+ * @version $Revision$
  */
 public class CalculatorBean implements Adder, Subtractor
 {

Modified: projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1066/Subtractor.java
===================================================================
--- projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1066/Subtractor.java	2008-04-11 07:12:16 UTC (rev 72000)
+++ projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1066/Subtractor.java	2008-04-11 08:04:37 UTC (rev 72001)
@@ -25,7 +25,7 @@
  * Comment
  *
  * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
- * @version $Revision: $
+ * @version $Revision$
  */
 public interface Subtractor
 {

Modified: projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1122/unit/MultipleDefinitionsOfSameBusinessInterfaceUnitTestCase.java
===================================================================
--- projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1122/unit/MultipleDefinitionsOfSameBusinessInterfaceUnitTestCase.java	2008-04-11 07:12:16 UTC (rev 72000)
+++ projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1122/unit/MultipleDefinitionsOfSameBusinessInterfaceUnitTestCase.java	2008-04-11 08:04:37 UTC (rev 72001)
@@ -100,22 +100,14 @@
 
    // Internal Helper Methods
 
-   private void internalTestRemoteView(String jndiName)
+   private void internalTestRemoteView(String jndiName) throws Exception
    {
       // Initialize
       TestRemoteBusinessInterface test = null;
 
       // Lookup
-      try
-      {
-         test = (TestRemoteBusinessInterface) this.getInitialContext().lookup(
-               jndiName);
-      }
-      catch (Throwable t)
-      {
-         log.error(t);
-         JBossTestCase.fail(t.getMessage());
-      }
+      test = (TestRemoteBusinessInterface) this.getInitialContext().lookup(jndiName);
+      
       // Ensure lookup succeeds; bean is deployed
       JBossTestCase.assertNotNull(test);
 
@@ -131,21 +123,14 @@
       }
    }
 
-   private void internalTestLocalView(String remoteDelegateJndiName)
+   private void internalTestLocalView(String remoteDelegateJndiName) throws Exception
    {
       // Initialize
       TestRemoteBusinessInterface test = null;
 
       // Lookup
-      try
-      {
-         test = (TestRemoteBusinessInterface) this.getInitialContext().lookup(remoteDelegateJndiName);
-      }
-      catch (Throwable t)
-      {
-         log.error(t);
-         JBossTestCase.fail(t.getMessage());
-      }
+      test = (TestRemoteBusinessInterface) this.getInitialContext().lookup(remoteDelegateJndiName);
+      
       // Ensure lookup succeeds; bean is deployed
       JBossTestCase.assertNotNull(test);
 

Modified: projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree471/A.java
===================================================================
--- projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree471/A.java	2008-04-11 07:12:16 UTC (rev 72000)
+++ projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree471/A.java	2008-04-11 08:04:37 UTC (rev 72001)
@@ -23,7 +23,7 @@
 
 /**
  * @author <a href="mailto:amay at ingenta.com">Andrew May</a>
- * @version $Revision: $
+ * @version $Revision$
  */
 public interface A
 {

Modified: projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree471/ABean.java
===================================================================
--- projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree471/ABean.java	2008-04-11 07:12:16 UTC (rev 72000)
+++ projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree471/ABean.java	2008-04-11 08:04:37 UTC (rev 72001)
@@ -23,7 +23,7 @@
 
 /**
  * @author <a href="mailto:amay at ingenta.com">Andrew May</a>
- * @version $Revision: $
+ * @version $Revision$
  */
 abstract public class ABean implements A
 {

Modified: projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree471/B.java
===================================================================
--- projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree471/B.java	2008-04-11 07:12:16 UTC (rev 72000)
+++ projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree471/B.java	2008-04-11 08:04:37 UTC (rev 72001)
@@ -23,7 +23,7 @@
 
 /**
  * @author <a href="mailto:amay at ingenta.com">Andrew May</a>
- * @version $Revision: $
+ * @version $Revision$
  */
 public interface B extends A
 {

Modified: projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree471/BBean.java
===================================================================
--- projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree471/BBean.java	2008-04-11 07:12:16 UTC (rev 72000)
+++ projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree471/BBean.java	2008-04-11 08:04:37 UTC (rev 72001)
@@ -27,7 +27,7 @@
 
 /**
  * @author <a href="mailto:amay at ingenta.com">Andrew May</a>
- * @version $Revision: $
+ * @version $Revision$
  */
 @Stateless
 @Remote(B.class)

Modified: projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree471/Client.java
===================================================================
--- projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree471/Client.java	2008-04-11 07:12:16 UTC (rev 72000)
+++ projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree471/Client.java	2008-04-11 08:04:37 UTC (rev 72001)
@@ -28,7 +28,7 @@
 
 /**
  * @author <a href="mailto:amay at ingenta.com">Andrew May</a>
- * @version $Revision: $
+ * @version $Revision$
  */
 public class Client
 {

Modified: projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree471/Intercept.java
===================================================================
--- projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree471/Intercept.java	2008-04-11 07:12:16 UTC (rev 72000)
+++ projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree471/Intercept.java	2008-04-11 08:04:37 UTC (rev 72001)
@@ -26,7 +26,7 @@
 
 /**
  * @author <a href="mailto:amay at ingenta.com">Andrew May</a>
- * @version $Revision: $
+ * @version $Revision$
  */
 public class Intercept
 {

Modified: projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree471/unit/SuperInterceptUnitTestCase.java
===================================================================
--- projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree471/unit/SuperInterceptUnitTestCase.java	2008-04-11 07:12:16 UTC (rev 72000)
+++ projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree471/unit/SuperInterceptUnitTestCase.java	2008-04-11 08:04:37 UTC (rev 72001)
@@ -30,7 +30,7 @@
  * Interceptor must also apply to super-methods.
  *
  * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
- * @version $Revision: $
+ * @version $Revision$
  */
 public class SuperInterceptUnitTestCase extends JBossTestCase
 {

Modified: projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree786/Remove.java
===================================================================
--- projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree786/Remove.java	2008-04-11 07:12:16 UTC (rev 72000)
+++ projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree786/Remove.java	2008-04-11 08:04:37 UTC (rev 72001)
@@ -26,7 +26,7 @@
  *
  * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
  * @author <a href="mailto:arubinge at redhat.com">ALR</a>
- * @version $Revision: $
+ * @version $Revision$
  */
 public interface Remove
 {

Modified: projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree959/Status.java
===================================================================
--- projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree959/Status.java	2008-04-11 07:12:16 UTC (rev 72000)
+++ projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree959/Status.java	2008-04-11 08:04:37 UTC (rev 72001)
@@ -27,7 +27,7 @@
  * Comment
  *
  * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
- * @version $Revision: $
+ * @version $Revision$
  */
 @Remote
 public interface Status

Modified: projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree959/StatusBean.java
===================================================================
--- projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree959/StatusBean.java	2008-04-11 07:12:16 UTC (rev 72000)
+++ projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree959/StatusBean.java	2008-04-11 08:04:37 UTC (rev 72001)
@@ -27,7 +27,7 @@
  * Dirty bean to check status of MyStatefulBean
  *
  * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
- * @version $Revision: $
+ * @version $Revision$
  */
 @Stateless
 public class StatusBean implements Status

Modified: projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree973/SpyMe.java
===================================================================
--- projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree973/SpyMe.java	2008-04-11 07:12:16 UTC (rev 72000)
+++ projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree973/SpyMe.java	2008-04-11 08:04:37 UTC (rev 72001)
@@ -25,7 +25,7 @@
  * Allows for some security checks.
  *
  * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
- * @version $Revision: $
+ * @version $Revision$
  */
 public interface SpyMe extends WhoAmI
 {

Modified: projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree973/WhoAmI.java
===================================================================
--- projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree973/WhoAmI.java	2008-04-11 07:12:16 UTC (rev 72000)
+++ projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree973/WhoAmI.java	2008-04-11 08:04:37 UTC (rev 72001)
@@ -25,7 +25,7 @@
  * Report the caller principal.
  *
  * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
- * @version $Revision: $
+ * @version $Revision$
  */
 public interface WhoAmI
 {

Modified: projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree985/OptionalEnvEntry.java
===================================================================
--- projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree985/OptionalEnvEntry.java	2008-04-11 07:12:16 UTC (rev 72000)
+++ projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree985/OptionalEnvEntry.java	2008-04-11 08:04:37 UTC (rev 72001)
@@ -25,7 +25,7 @@
  * Comment
  *
  * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
- * @version $Revision: $
+ * @version $Revision$
  */
 public interface OptionalEnvEntry
 {

Modified: projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree985/OptionalEnvEntryBean.java
===================================================================
--- projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree985/OptionalEnvEntryBean.java	2008-04-11 07:12:16 UTC (rev 72000)
+++ projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree985/OptionalEnvEntryBean.java	2008-04-11 08:04:37 UTC (rev 72001)
@@ -31,7 +31,7 @@
  * Return the value of a burried env entry.
  *
  * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
- * @version $Revision: $
+ * @version $Revision$
  */
 @Stateless
 @Remote(OptionalEnvEntry.class)

Modified: projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree986/Foo.java
===================================================================
--- projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree986/Foo.java	2008-04-11 07:12:16 UTC (rev 72000)
+++ projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree986/Foo.java	2008-04-11 08:04:37 UTC (rev 72001)
@@ -28,7 +28,7 @@
  *
  * @author <a href="mailto:yvan.borgne at lapeyre.fr">Yvan Borgne</a>
  * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
- * @version $Revision: $
+ * @version $Revision$
  */
 @Remote
 public interface Foo

Modified: projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree986/FooBean.java
===================================================================
--- projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree986/FooBean.java	2008-04-11 07:12:16 UTC (rev 72000)
+++ projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree986/FooBean.java	2008-04-11 08:04:37 UTC (rev 72001)
@@ -28,7 +28,7 @@
  *
  * @author <a href="mailto:yvan.borgne at lapeyre.fr">Yvan Borgne</a>
  * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
- * @version $Revision: $
+ * @version $Revision$
  */
 @Stateless
 public class FooBean implements Foo

Modified: projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree989/ResUrlChecker.java
===================================================================
--- projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree989/ResUrlChecker.java	2008-04-11 07:12:16 UTC (rev 72000)
+++ projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree989/ResUrlChecker.java	2008-04-11 08:04:37 UTC (rev 72001)
@@ -27,7 +27,7 @@
  * Comment
  *
  * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
- * @version $Revision: $
+ * @version $Revision$
  */
 public interface ResUrlChecker
 {

Modified: projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree989/ResUrlCheckerBean.java
===================================================================
--- projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree989/ResUrlCheckerBean.java	2008-04-11 07:12:16 UTC (rev 72000)
+++ projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree989/ResUrlCheckerBean.java	2008-04-11 08:04:37 UTC (rev 72001)
@@ -34,7 +34,7 @@
  * Let's see what we can do with resources of the URL breed.
  *
  * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
- * @version $Revision: $
+ * @version $Revision$
  */
 @Stateless
 @Remote(ResUrlChecker.class)

Modified: projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/interceptormetadata/MockDependencyPolicy.java
===================================================================
--- projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/interceptormetadata/MockDependencyPolicy.java	2008-04-11 07:12:16 UTC (rev 72000)
+++ projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/interceptormetadata/MockDependencyPolicy.java	2008-04-11 08:04:37 UTC (rev 72001)
@@ -27,7 +27,7 @@
  * Comment
  *
  * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
- * @version $Revision: $
+ * @version $Revision$
  */
 public class MockDependencyPolicy implements DependencyPolicy
 {

Modified: projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/reference21_30/HomedStatefulSession30Bean.java
===================================================================
--- projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/reference21_30/HomedStatefulSession30Bean.java	2008-04-11 07:12:16 UTC (rev 72000)
+++ projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/reference21_30/HomedStatefulSession30Bean.java	2008-04-11 08:04:37 UTC (rev 72001)
@@ -30,8 +30,6 @@
 import javax.ejb.Stateful;
 import javax.naming.InitialContext;
 
-import org.jboss.ejb3.annotation.LocalBinding;
-import org.jboss.ejb3.annotation.RemoteBinding;
 import org.jboss.logging.Logger;
 
 /**
@@ -43,8 +41,6 @@
 @LocalHome(StatefulSession30LocalHome.class)
 @Local({LocalStatefulSession30Business.class,LocalStatefulSession30.class})
 @Remote(StatefulSession30.class)
- at RemoteBinding(jndiBinding = "HomedStatefulSession30Remote")
- at LocalBinding(jndiBinding = "HomedLocalStatefulSession30")
 public class HomedStatefulSession30Bean implements java.io.Serializable
 {
    

Modified: projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/reference21_30/Session21Bean.java
===================================================================
--- projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/reference21_30/Session21Bean.java	2008-04-11 07:12:16 UTC (rev 72000)
+++ projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/reference21_30/Session21Bean.java	2008-04-11 08:04:37 UTC (rev 72001)
@@ -23,7 +23,6 @@
 
 import javax.ejb.SessionContext;
 import javax.naming.InitialContext;
-import javax.naming.NamingEnumeration;
 
 import org.jboss.ejb3.Container;
 import org.jboss.logging.Logger;
@@ -45,7 +44,6 @@
    {
       try {
          InitialContext jndiContext = new InitialContext();
-         
          Session30 session = (Session30)jndiContext.lookup(Container.ENC_CTX_NAME + "/env/Session30");
          return session.access();
       } catch (Exception e)

Modified: projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/reference21_30/Session30Bean.java
===================================================================
--- projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/reference21_30/Session30Bean.java	2008-04-11 07:12:16 UTC (rev 72000)
+++ projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/reference21_30/Session30Bean.java	2008-04-11 08:04:37 UTC (rev 72001)
@@ -48,7 +48,7 @@
 @RemoteHome(Session30Home.class)
 @LocalHome(Session30LocalHome.class)
 @LocalHomeBinding(jndiBinding = Session30LocalHome.JNDI_NAME_SESSION_30)
- at EJBs({@EJB(name="injected", beanInterface=org.jboss.ejb3.test.reference21_30.Session21.class, beanName="Session21")})
+ at EJBs({@EJB(name="injected", beanInterface=org.jboss.ejb3.test.reference21_30.Session21Home.class, beanName="Session21")})
 
 public class Session30Bean implements Session30RemoteBusiness, LocalSession30Business
 {
@@ -63,7 +63,8 @@
    {
       try {
          InitialContext jndiContext = new InitialContext();
-         Session21 session = (Session21)jndiContext.lookup(Container.ENC_CTX_NAME + "/env/injected");
+         Session21Home sessionHome = (Session21Home) jndiContext.lookup(Container.ENC_CTX_NAME + "/env/injected");
+         Session21 session = sessionHome.create();
          return session.access();
       } catch (Exception e)
       {

Modified: projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/reference21_30/Test2Bean.java
===================================================================
--- projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/reference21_30/Test2Bean.java	2008-04-11 07:12:16 UTC (rev 72000)
+++ projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/reference21_30/Test2Bean.java	2008-04-11 08:04:37 UTC (rev 72001)
@@ -40,7 +40,7 @@
    {
       InitialContext jndiContext = new InitialContext();
       
-      Test3 session = (Test3)jndiContext.lookup("java:comp/env/ejb/Test3");
+      Test3Business session = (Test3Business)jndiContext.lookup("java:comp/env/ejb/Test3");
       session.testAccess();
      
       Test3Home home = (Test3Home)jndiContext.lookup("java:comp/env/ejb/Test3Home");

Modified: projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/reference21_30/unit/EarTestCase.java
===================================================================
--- projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/reference21_30/unit/EarTestCase.java	2008-04-11 07:12:16 UTC (rev 72000)
+++ projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/reference21_30/unit/EarTestCase.java	2008-04-11 08:04:37 UTC (rev 72001)
@@ -21,15 +21,15 @@
  */
 package org.jboss.ejb3.test.reference21_30.unit;
 
-import javax.naming.*;
+import javax.naming.InitialContext;
 
-import org.jboss.ejb3.test.reference21_30.*;
-import org.jboss.logging.Logger;
+import junit.framework.Test;
 
+import org.jboss.ejb3.test.reference21_30.Test2;
+import org.jboss.ejb3.test.reference21_30.Test2Home;
 import org.jboss.ejb3.test.reference21_30.Test3;
-
-import junit.framework.Test;
-
+import org.jboss.ejb3.test.reference21_30.Test3Home;
+import org.jboss.logging.Logger;
 import org.jboss.test.JBossTestCase;
 
 /**
@@ -53,7 +53,8 @@
    {
       InitialContext jndiContext = new InitialContext();
       
-      Test3 test3 = (Test3)jndiContext.lookup("Test3Remote");
+      Test3Home test3Home = (Test3Home) jndiContext.lookup("Test3/home");
+      Test3 test3 = test3Home.create(); 
       assertNotNull(test3);
       test3.testAccess();
       

Modified: projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/reference21_30/unit/ReferenceTestCase.java
===================================================================
--- projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/reference21_30/unit/ReferenceTestCase.java	2008-04-11 07:12:16 UTC (rev 72000)
+++ projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/reference21_30/unit/ReferenceTestCase.java	2008-04-11 08:04:37 UTC (rev 72001)
@@ -32,6 +32,7 @@
 import junit.framework.Test;
 
 import org.jboss.ejb3.test.reference21_30.Session21;
+import org.jboss.ejb3.test.reference21_30.Session21Home;
 import org.jboss.ejb3.test.reference21_30.Session30;
 import org.jboss.ejb3.test.reference21_30.Session30Home;
 import org.jboss.ejb3.test.reference21_30.Session30RemoteBusiness;
@@ -62,7 +63,8 @@
    {
       InitialContext jndiContext = new InitialContext();
       
-      Session21 session = (Session21)jndiContext.lookup("Session21Remote");
+      Session21Home home = (Session21Home)jndiContext.lookup("Session21/home");
+      Session21 session = home.create();
       String access = session.access();
       assertEquals("Session21", access);
       access = session.access30();
@@ -73,7 +75,8 @@
    {
       InitialContext jndiContext = new InitialContext();
  
-      Session30 session = (Session30) jndiContext.lookup("Session30Remote");
+      Session30Home sessionHome = (Session30Home) jndiContext.lookup("Session30/home");
+      Session30 session = sessionHome.create();
       String access = session.access();
       assertEquals("Session30", access);
       access = session.access21();

Modified: projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/stateful/Stateful21.java
===================================================================
--- projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/stateful/Stateful21.java	2008-04-11 07:12:16 UTC (rev 72000)
+++ projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/stateful/Stateful21.java	2008-04-11 08:04:37 UTC (rev 72001)
@@ -27,7 +27,7 @@
  * A remote interface for a stateful bean.
  * 
  * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
- * @version $Revision: $
+ * @version $Revision$
  */
 public interface Stateful21 extends Stateful, EJBObject
 {

Modified: projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/stateful/StatefulRemoteProxyFactory.java
===================================================================
--- projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/stateful/StatefulRemoteProxyFactory.java	2008-04-11 07:12:16 UTC (rev 72000)
+++ projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/stateful/StatefulRemoteProxyFactory.java	2008-04-11 08:04:37 UTC (rev 72001)
@@ -22,7 +22,7 @@
 package org.jboss.ejb3.test.stateful;
 
 import org.jboss.ejb3.annotation.RemoteBinding;
-import org.jboss.ejb3.session.SessionContainer;
+import org.jboss.ejb3.session.SessionSpecContainer;
 import org.jboss.logging.Logger;
 
 /**
@@ -36,21 +36,8 @@
    @SuppressWarnings("unused")
    private static final Logger log = Logger.getLogger(StatefulRemoteProxyFactory.class);
    
-   public StatefulRemoteProxyFactory(SessionContainer container, RemoteBinding binding)
+   public StatefulRemoteProxyFactory(SessionSpecContainer container, RemoteBinding binding)
    {
       super(container, binding);
    }
-
-   @Override
-   protected Class<?>[] getInterfacesForBusinessProxy()
-   {
-      Class<?>[] remoteInterfaces = super.getInterfacesForBusinessProxy();
-
-      Class<?>[] interfaces = new Class[remoteInterfaces.length + 1];
-
-      System.arraycopy(remoteInterfaces, 0, interfaces, 0, remoteInterfaces.length);
-      interfaces[remoteInterfaces.length] = org.jboss.ejb3.test.stateful.ProxyFactoryInterface.class;
-
-      return interfaces;
-   }
 }

Modified: projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/statefulproxyfactoryoverride/StatefulRemoteProxyFactory.java
===================================================================
--- projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/statefulproxyfactoryoverride/StatefulRemoteProxyFactory.java	2008-04-11 07:12:16 UTC (rev 72000)
+++ projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/statefulproxyfactoryoverride/StatefulRemoteProxyFactory.java	2008-04-11 08:04:37 UTC (rev 72001)
@@ -22,7 +22,7 @@
 package org.jboss.ejb3.test.statefulproxyfactoryoverride;
 
 import org.jboss.ejb3.annotation.RemoteBinding;
-import org.jboss.ejb3.session.SessionContainer;
+import org.jboss.ejb3.session.SessionSpecContainer;
 import org.jboss.logging.Logger;
 
 /**
@@ -35,22 +35,9 @@
 {
    @SuppressWarnings("unused")
    private static final Logger log = Logger.getLogger(StatefulRemoteProxyFactory.class);
-   
-   public StatefulRemoteProxyFactory(SessionContainer container, RemoteBinding binding)
+
+   public StatefulRemoteProxyFactory(SessionSpecContainer container, RemoteBinding binding)
    {
       super(container, binding);
    }
-
-   @Override
-   protected Class<?>[] getInterfacesForBusinessProxy()
-   {
-      Class<?>[] remoteInterfaces = super.getInterfacesForBusinessProxy();
-
-      Class<?>[] interfaces = new Class[remoteInterfaces.length + 1];
-
-      System.arraycopy(remoteInterfaces, 0, interfaces, 0, remoteInterfaces.length);
-      interfaces[remoteInterfaces.length] = org.jboss.ejb3.test.statefulproxyfactoryoverride.ProxyFactoryInterface.class;
-
-      return interfaces;
-   }
 }

Modified: projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/strictpool/unit/MDBCallable.java
===================================================================
--- projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/strictpool/unit/MDBCallable.java	2008-04-11 07:12:16 UTC (rev 72000)
+++ projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/strictpool/unit/MDBCallable.java	2008-04-11 08:04:37 UTC (rev 72001)
@@ -40,7 +40,7 @@
  * Send a JMS text message and expect a reply.
  * 
  * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
- * @version $Revision: $
+ * @version $Revision$
  */
 public class MDBCallable implements Callable<String>
 {

Modified: projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/threadlocal/MockBean.java
===================================================================
--- projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/threadlocal/MockBean.java	2008-04-11 07:12:16 UTC (rev 72000)
+++ projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/threadlocal/MockBean.java	2008-04-11 08:04:37 UTC (rev 72001)
@@ -27,7 +27,7 @@
  * Comment
  *
  * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
- * @version $Revision: $
+ * @version $Revision$
  */
 public class MockBean
 {

Modified: projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/threadlocal/MockBeanContext.java
===================================================================
--- projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/threadlocal/MockBeanContext.java	2008-04-11 07:12:16 UTC (rev 72000)
+++ projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/threadlocal/MockBeanContext.java	2008-04-11 08:04:37 UTC (rev 72001)
@@ -35,7 +35,7 @@
  * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
  * @version $Revision$
  */
-public class MockBeanContext implements BeanContext
+public class MockBeanContext implements BeanContext<Container>
 {
    private static Logger log = Logger.getLogger(MockBeanContext.class);
    

Modified: projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/xpcalt/Inspector.java
===================================================================
--- projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/xpcalt/Inspector.java	2008-04-11 07:12:16 UTC (rev 72000)
+++ projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/xpcalt/Inspector.java	2008-04-11 08:04:37 UTC (rev 72001)
@@ -27,7 +27,7 @@
  * Comment
  *
  * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
- * @version $Revision: $
+ * @version $Revision$
  */
 @Remote
 public interface Inspector

Modified: projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/xpcalt/InspectorBean.java
===================================================================
--- projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/xpcalt/InspectorBean.java	2008-04-11 07:12:16 UTC (rev 72000)
+++ projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/xpcalt/InspectorBean.java	2008-04-11 08:04:37 UTC (rev 72001)
@@ -29,7 +29,7 @@
  * A stateless bean to check on the persistence unit
  *
  * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
- * @version $Revision: $
+ * @version $Revision$
  */
 @Stateless
 public class InspectorBean implements Inspector

Modified: projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/xpcalt/Keeper.java
===================================================================
--- projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/xpcalt/Keeper.java	2008-04-11 07:12:16 UTC (rev 72000)
+++ projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/xpcalt/Keeper.java	2008-04-11 08:04:37 UTC (rev 72001)
@@ -27,7 +27,7 @@
  * Comment
  *
  * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
- * @version $Revision: $
+ * @version $Revision$
  */
 @Remote
 public interface Keeper extends Master

Modified: projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/xpcalt/LowEnd.java
===================================================================
--- projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/xpcalt/LowEnd.java	2008-04-11 07:12:16 UTC (rev 72000)
+++ projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/xpcalt/LowEnd.java	2008-04-11 08:04:37 UTC (rev 72001)
@@ -28,7 +28,7 @@
  * Comment
  *
  * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
- * @version $Revision: $
+ * @version $Revision$
  */
 @Local
 public interface LowEnd

Modified: projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/xpcalt/Master.java
===================================================================
--- projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/xpcalt/Master.java	2008-04-11 07:12:16 UTC (rev 72000)
+++ projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/xpcalt/Master.java	2008-04-11 08:04:37 UTC (rev 72001)
@@ -27,7 +27,7 @@
  * Comment
  *
  * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
- * @version $Revision: $
+ * @version $Revision$
  */
 @Remote
 public interface Master

Modified: projects/ejb3/trunk/plugin/pom.xml
===================================================================
--- projects/ejb3/trunk/plugin/pom.xml	2008-04-11 07:12:16 UTC (rev 72000)
+++ projects/ejb3/trunk/plugin/pom.xml	2008-04-11 08:04:37 UTC (rev 72001)
@@ -105,7 +105,7 @@
     <dependency>
       <groupId>org.jboss.ejb3</groupId>
       <artifactId>jboss-ejb3-interceptors</artifactId>
-      <version>0.13.0-SNAPSHOT</version>
+      <version>0.12.0</version>
     </dependency>
     <dependency>
       <groupId>org.jboss.ejb3</groupId>




More information about the jboss-cvs-commits mailing list