[jboss-cvs] JBossAS SVN: r85763 - in projects/ejb3/trunk: core and 93 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Thu Mar 12 01:14:39 EDT 2009
Author: ALRubinger
Date: 2009-03-12 01:14:38 -0400 (Thu, 12 Mar 2009)
New Revision: 85763
Added:
projects/ejb3/trunk/proxy-spi/jboss-ejb3-proxy-spi-client.xml
projects/ejb3/trunk/proxy/jboss-ejb3-proxy-impl-client.xml
projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/
projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/factory/
projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/factory/ProxyFactory.java
projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/factory/ProxyFactoryBase.java
projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/factory/session/
projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/factory/session/SessionProxyFactory.java
projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/factory/session/SessionProxyFactoryBase.java
projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/factory/session/SessionSpecProxyFactory.java
projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/factory/session/service/
projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/factory/session/service/ServiceLocalProxyFactory.java
projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/factory/session/service/ServiceProxyFactory.java
projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/factory/session/service/ServiceProxyFactoryBase.java
projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/factory/session/service/ServiceRemoteProxyFactory.java
projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/factory/session/stateful/
projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/factory/session/stateful/StatefulSessionLocalProxyFactory.java
projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/factory/session/stateful/StatefulSessionProxyFactory.java
projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/factory/session/stateful/StatefulSessionProxyFactoryBase.java
projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/factory/session/stateful/StatefulSessionRemoteProxyFactory.java
projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/factory/session/stateless/
projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/factory/session/stateless/StatelessSessionLocalProxyFactory.java
projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/factory/session/stateless/StatelessSessionProxyFactoryBase.java
projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/factory/session/stateless/StatelessSessionRemoteProxyFactory.java
projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/handler/
projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/handler/session/
projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/handler/session/NotEligibleForDirectInvocationException.java
projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/handler/session/SessionLocalProxyInvocationHandler.java
projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/handler/session/SessionProxyInvocationHandler.java
projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/handler/session/SessionProxyInvocationHandlerBase.java
projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/handler/session/SessionRemoteProxyInvocationHandler.java
projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/invocation/
projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/invocation/InvokableContextStatefulRemoteProxyInvocationHack.java
projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/invocation/StatefulRemoteInvocation.java
projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/jndiregistrar/
projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/jndiregistrar/JndiReferenceBinding.java
projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/jndiregistrar/JndiReferenceBindingSet.java
projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/jndiregistrar/JndiServiceRegistrar.java
projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/jndiregistrar/JndiSessionRegistrarBase.java
projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/jndiregistrar/JndiStatefulSessionRegistrar.java
projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/jndiregistrar/JndiStatelessSessionRegistrar.java
projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/objectfactory/
projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/objectfactory/Ejb3RegistrarProxyObjectFactory.java
projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/objectfactory/ProxyFactoryReferenceAddressTypes.java
projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/objectfactory/ProxyObjectFactory.java
projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/objectfactory/session/
projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/objectfactory/session/SessionProxyObjectFactory.java
projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/objectfactory/session/service/
projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/objectfactory/session/service/ServiceProxyObjectFactory.java
projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/objectfactory/session/stateful/
projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/objectfactory/session/stateful/StatefulSessionProxyObjectFactory.java
projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/objectfactory/session/stateless/
projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/objectfactory/session/stateless/StatelessSessionProxyObjectFactory.java
projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/objectstore/
projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/objectstore/ObjectStoreBindings.java
projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/remoting/
projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/remoting/IsLocalProxyFactoryInterceptor.java
projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/remoting/ProxyRemotingUtils.java
projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/remoting/SessionSpecRemotingMetadata.java
projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/remoting/StatefulSessionRemotingMetadata.java
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/SessionTestCaseBase.java
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/Utils.java
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/container/
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/container/ProxyTestClassAdvisor.java
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/container/ProxyTestClassProxyHack.java
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/container/ServiceContainer.java
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/container/SessionContainer.java
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/container/SessionSpecContainer.java
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/container/StatefulContainer.java
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/container/StatelessContainer.java
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/container/unit/
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/ejb/
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/ejb/service/
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/ejb/sfsb/
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/ejb/slsb/
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/ejbthree1517/
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/ejbthree1517/ReturnStaticValueInterceptor.java
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/ejbthree1517/TestClientInterceptorStack.java
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/ejbthree1517/TestClientInterceptorStackBeanBase.java
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/ejbthree1517/TestClientInterceptorStackStatefulBean.java
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/ejbthree1517/TestClientInterceptorStackStatelessBean.java
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/ejbthree1517/unit/
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/ejbthree1529/
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/ejbthree1529/ExplicitInvokerNameBean.java
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/ejbthree1529/ExplicitInvokerNameRemoteBusiness.java
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/ejbthree1529/unit/
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/jndiregistrar/
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/jndiregistrar/BindingTest.java
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/jndiregistrar/ClientBindUrlBindingTest.java
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/jndiregistrar/ClientBindUrlTestBean.java
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/jndiregistrar/JndiBindingTestBean.java
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/jndiregistrar/JndiBindingTestBeanBase.java
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/jndiregistrar/LocalJndiBindingTest.java
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/jndiregistrar/RemoteBindingNoJndiBindingTestBean.java
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/jndiregistrar/RemoteJndiBindingTest.java
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/jndiregistrar/unit/
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/remoteaccess/
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/remoteaccess/unit/
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/session/
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/session/unit/
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/spec_3_4_5/
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/spec_3_4_5/ProxyEqualityTestCaseBase.java
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/spec_3_4_5/unit/
projects/ejb3/trunk/proxy/src/test/resources/org/jboss/ejb3/test/proxy/impl/
projects/ejb3/trunk/proxy/src/test/resources/org/jboss/ejb3/test/proxy/impl/common/
projects/ejb3/trunk/proxy/src/test/resources/org/jboss/ejb3/test/proxy/impl/common/SessionTestCaseBase-jboss-beans.xml
projects/ejb3/trunk/proxy/src/test/resources/org/jboss/ejb3/test/proxy/impl/common/container/
projects/ejb3/trunk/proxy/src/test/resources/org/jboss/ejb3/test/proxy/impl/common/container/unit/
projects/ejb3/trunk/proxy/src/test/resources/org/jboss/ejb3/test/proxy/impl/ejbthree1517/
projects/ejb3/trunk/proxy/src/test/resources/org/jboss/ejb3/test/proxy/impl/ejbthree1517/unit/
projects/ejb3/trunk/proxy/src/test/resources/org/jboss/ejb3/test/proxy/impl/ejbthree1529/
projects/ejb3/trunk/proxy/src/test/resources/org/jboss/ejb3/test/proxy/impl/ejbthree1529/unit/
projects/ejb3/trunk/proxy/src/test/resources/org/jboss/ejb3/test/proxy/impl/jndiregistrar/
projects/ejb3/trunk/proxy/src/test/resources/org/jboss/ejb3/test/proxy/impl/jndiregistrar/unit/
projects/ejb3/trunk/proxy/src/test/resources/org/jboss/ejb3/test/proxy/impl/remoteaccess/
projects/ejb3/trunk/proxy/src/test/resources/org/jboss/ejb3/test/proxy/impl/remoteaccess/unit/
projects/ejb3/trunk/proxy/src/test/resources/org/jboss/ejb3/test/proxy/impl/session/
projects/ejb3/trunk/proxy/src/test/resources/org/jboss/ejb3/test/proxy/impl/session/unit/
projects/ejb3/trunk/proxy/src/test/resources/org/jboss/ejb3/test/proxy/impl/spec_3_4_5/
projects/ejb3/trunk/proxy/src/test/resources/org/jboss/ejb3/test/proxy/impl/spec_3_4_5/unit/
Removed:
projects/ejb3/trunk/proxy/jboss-ejb3-proxy-client.xml
projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/factory/
projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/handler/
projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/invocation/
projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/jndiregistrar/
projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/objectfactory/
projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/objectstore/
projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/remoting/
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/common/SessionTestCaseBase.java
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/common/Utils.java
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/common/container/ProxyTestClassAdvisor.java
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/common/container/ProxyTestClassProxyHack.java
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/common/container/ServiceContainer.java
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/common/container/SessionContainer.java
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/common/container/SessionSpecContainer.java
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/common/container/StatefulContainer.java
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/common/container/StatelessContainer.java
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/common/container/unit/
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/common/ejb/service/
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/common/ejb/sfsb/
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/common/ejb/slsb/
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/ejbthree1517/ReturnStaticValueInterceptor.java
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/ejbthree1517/TestClientInterceptorStack.java
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/ejbthree1517/TestClientInterceptorStackBeanBase.java
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/ejbthree1517/TestClientInterceptorStackStatefulBean.java
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/ejbthree1517/TestClientInterceptorStackStatelessBean.java
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/ejbthree1517/unit/
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/ejbthree1529/ExplicitInvokerNameBean.java
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/ejbthree1529/ExplicitInvokerNameRemoteBusiness.java
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/ejbthree1529/unit/
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/jndiregistrar/BindingTest.java
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/jndiregistrar/ClientBindUrlBindingTest.java
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/jndiregistrar/ClientBindUrlTestBean.java
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/jndiregistrar/JndiBindingTestBean.java
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/jndiregistrar/JndiBindingTestBeanBase.java
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/jndiregistrar/LocalJndiBindingTest.java
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/jndiregistrar/RemoteBindingNoJndiBindingTestBean.java
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/jndiregistrar/RemoteJndiBindingTest.java
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/jndiregistrar/unit/
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/remoteaccess/unit/
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/session/unit/
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/spec_3_4_5/ProxyEqualityTestCaseBase.java
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/spec_3_4_5/unit/
projects/ejb3/trunk/proxy/src/test/resources/org/jboss/ejb3/test/proxy/common/SessionTestCaseBase-jboss-beans.xml
projects/ejb3/trunk/proxy/src/test/resources/org/jboss/ejb3/test/proxy/common/container/unit/
projects/ejb3/trunk/proxy/src/test/resources/org/jboss/ejb3/test/proxy/ejbthree1517/unit/
projects/ejb3/trunk/proxy/src/test/resources/org/jboss/ejb3/test/proxy/ejbthree1529/unit/
projects/ejb3/trunk/proxy/src/test/resources/org/jboss/ejb3/test/proxy/jndiregistrar/unit/
projects/ejb3/trunk/proxy/src/test/resources/org/jboss/ejb3/test/proxy/remoteaccess/unit/
projects/ejb3/trunk/proxy/src/test/resources/org/jboss/ejb3/test/proxy/session/unit/
projects/ejb3/trunk/proxy/src/test/resources/org/jboss/ejb3/test/proxy/spec_3_4_5/unit/
Modified:
projects/ejb3/trunk/build/pom.xml
projects/ejb3/trunk/core/pom.xml
projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/mdb/RemoteProducerFactory.java
projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/service/ServiceContainer.java
projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/session/SessionContainer.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/StatefulContainer.java
projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/stateless/StatelessContainer.java
projects/ejb3/trunk/core/src/main/resources/META-INF/ejb3-deployers-jboss-beans.xml
projects/ejb3/trunk/core/src/test/resources/basicbootstrap-beans.xml
projects/ejb3/trunk/core/src/test/resources/servicecontainer-beans.xml
projects/ejb3/trunk/core/src/test/resources/statefulcontainer-beans.xml
projects/ejb3/trunk/core/src/test/resources/statelesscontainer-beans.xml
projects/ejb3/trunk/plugin/pom.xml
projects/ejb3/trunk/proxy-clustered/pom.xml
projects/ejb3/trunk/proxy-clustered/src/main/java/org/jboss/ejb3/proxy/clustered/factory/session/stateful/StatefulSessionClusteredProxyFactory.java
projects/ejb3/trunk/proxy-clustered/src/main/java/org/jboss/ejb3/proxy/clustered/factory/session/stateless/StatelessSessionClusteredProxyFactory.java
projects/ejb3/trunk/proxy-clustered/src/main/java/org/jboss/ejb3/proxy/clustered/handler/session/stateful/StatefulClusteredProxyInvocationHandler.java
projects/ejb3/trunk/proxy-clustered/src/main/java/org/jboss/ejb3/proxy/clustered/handler/session/stateless/StatelessClusteredProxyInvocationHandler.java
projects/ejb3/trunk/proxy-clustered/src/main/java/org/jboss/ejb3/proxy/clustered/invocation/InvokableContextClusteredProxyInvocationHandler.java
projects/ejb3/trunk/proxy-clustered/src/main/java/org/jboss/ejb3/proxy/clustered/jndiregistrar/JndiClusteredSessionRegistrarBase.java
projects/ejb3/trunk/proxy-clustered/src/main/java/org/jboss/ejb3/proxy/clustered/jndiregistrar/JndiClusteredStatefulSessionRegistrar.java
projects/ejb3/trunk/proxy-clustered/src/main/java/org/jboss/ejb3/proxy/clustered/jndiregistrar/JndiClusteredStatelessSessionRegistrar.java
projects/ejb3/trunk/proxy-clustered/src/main/java/org/jboss/ejb3/proxy/clustered/objectfactory/session/SessionClusteredProxyObjectFactory.java
projects/ejb3/trunk/proxy-clustered/src/main/java/org/jboss/ejb3/proxy/clustered/objectfactory/session/stateful/StatefulSessionClusteredProxyObjectFactory.java
projects/ejb3/trunk/proxy-clustered/src/main/java/org/jboss/ejb3/proxy/clustered/objectstore/ClusteredObjectStoreBindings.java
projects/ejb3/trunk/proxy-spi/pom.xml
projects/ejb3/trunk/proxy/pom.xml
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/container/unit/SessionContainerTestCase.java
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/ejb/service/MyService.java
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/ejb/service/MyServiceBean.java
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/ejb/service/MyServiceBeanBase.java
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/ejb/service/MyServiceBeanWithExplicitJndiBindings.java
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/ejb/service/MyServiceLocalBusiness.java
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/ejb/service/MyServiceRemoteBusiness.java
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/ejb/sfsb/MyStateful.java
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/ejb/sfsb/MyStateful21Local.java
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/ejb/sfsb/MyStateful21Remote.java
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/ejb/sfsb/MyStateful2xOnlyBean.java
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/ejb/sfsb/MyStateful2xOnlyWithBindingsBean.java
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/ejb/sfsb/MyStateful30OnlyBean.java
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/ejb/sfsb/MyStatefulBean.java
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/ejb/sfsb/MyStatefulBeanBase.java
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/ejb/sfsb/MyStatefulBeanWithBindings.java
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/ejb/sfsb/MyStatefulBeanWithHomesBoundWithBusiness.java
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/ejb/sfsb/MyStatefulLocalBusiness.java
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/ejb/sfsb/MyStatefulLocalHome.java
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/ejb/sfsb/MyStatefulLocalOnlyBean.java
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/ejb/sfsb/MyStatefulRemoteBusiness.java
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/ejb/sfsb/MyStatefulRemoteHome.java
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/ejb/sfsb/MyStatefulRemoteOnlyBean.java
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/ejb/slsb/MyStateless.java
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/ejb/slsb/MyStateless21Local.java
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/ejb/slsb/MyStateless21Remote.java
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/ejb/slsb/MyStateless2xOnlyBean.java
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/ejb/slsb/MyStateless2xOnlyWithBindingsBean.java
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/ejb/slsb/MyStateless30OnlyBean.java
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/ejb/slsb/MyStatelessBean.java
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/ejb/slsb/MyStatelessBeanWithBindings.java
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/ejb/slsb/MyStatelessBeanWithHomesBoundWithBusiness.java
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/ejb/slsb/MyStatelessLocal.java
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/ejb/slsb/MyStatelessLocalHome.java
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/ejb/slsb/MyStatelessLocalOnlyBean.java
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/ejb/slsb/MyStatelessRemote.java
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/ejb/slsb/MyStatelessRemoteHome.java
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/ejb/slsb/MyStatelessRemoteOnlyBean.java
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/ejb/slsb/SimpleSLSBLocal.java
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/ejb/slsb/SimpleSLSBean.java
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/ejbthree1517/unit/OverrideClientInterceptorStackUnitTestCase.java
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/ejbthree1529/unit/RemoteBindingInvokerNameTestCase.java
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/jndiregistrar/unit/JNDIBindingTestCase.java
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/remoteaccess/unit/ProxyMockServer.java
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/remoteaccess/unit/RemoteAccessTestCase.java
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/session/unit/ProxyServiceTestCase.java
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/session/unit/ProxyStatefulSession2xOnlyTestCase.java
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/session/unit/ProxyStatefulSession2xOnlyWithBindingsTestCase.java
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/session/unit/ProxyStatefulSession30OnlyTestCase.java
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/session/unit/ProxyStatefulSessionHomeBusinessBoundTogetherTestCase.java
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/session/unit/ProxyStatefulSessionLocalOnlyTestCase.java
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/session/unit/ProxyStatefulSessionRemoteOnlyTestCase.java
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/session/unit/ProxyStatefulSessionTestCase.java
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/session/unit/ProxyStatelessSession2xOnlyExplicitJndiNameTestCase.java
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/session/unit/ProxyStatelessSession2xOnlyTestCase.java
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/session/unit/ProxyStatelessSession2xOnlyWithBindingsTestCase.java
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/session/unit/ProxyStatelessSession30OnlyTestCase.java
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/session/unit/ProxyStatelessSessionHomeBusinessBoundTogetherTestCase.java
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/session/unit/ProxyStatelessSessionLocalOnlyTestCase.java
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/session/unit/ProxyStatelessSessionRemoteOnlyTestCase.java
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/session/unit/ProxyStatelessSessionTestCase.java
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/session/unit/SessionTestCaseSupport.java
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/spec_3_4_5/unit/SfsbProxyEqualityTestCase.java
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/spec_3_4_5/unit/SlsbProxyEqualityTestCase.java
projects/ejb3/trunk/proxy/src/test/resources/org/jboss/ejb3/test/proxy/impl/common/container/unit/SessionContainerTestCase-jboss-beans.xml
projects/ejb3/trunk/proxy/src/test/resources/org/jboss/ejb3/test/proxy/impl/ejbthree1517/unit/ejb3-interceptors-ejbthree1517-aop.xml
projects/ejb3/trunk/proxy/src/test/resources/org/jboss/ejb3/test/proxy/impl/jndiregistrar/unit/JNDIBindingTestCase-jboss-beans.xml
projects/ejb3/trunk/proxy/src/test/resources/org/jboss/ejb3/test/proxy/impl/remoteaccess/unit/RemoteAccessTestCase-jboss-beans.xml
projects/ejb3/trunk/proxy/src/test/resources/org/jboss/ejb3/test/proxy/impl/session/unit/ProxyStatefulSessionTestCase-jboss-beans.xml
projects/ejb3/trunk/proxy/src/test/resources/org/jboss/ejb3/test/proxy/impl/session/unit/ProxyStatelessSessionTestCase-jboss-beans.xml
Log:
[EJBTHREE-1767] ejb3-proxy > ejb3-proxy-impl
Modified: projects/ejb3/trunk/build/pom.xml
===================================================================
--- projects/ejb3/trunk/build/pom.xml 2009-03-12 05:07:26 UTC (rev 85762)
+++ projects/ejb3/trunk/build/pom.xml 2009-03-12 05:14:38 UTC (rev 85763)
@@ -160,6 +160,8 @@
<exclude>org.jboss.microcontainer:jboss-deployers-impl</exclude>
<!-- deprecated, should be org.jboss.deployers:jboss-deployers-spi -->
<exclude>org.jboss.microcontainer:jboss-deployers-spi</exclude>
+ <!-- EJBTHREE-1767, now org.jboss.ejb3:jboss-ejb3-proxy-impl -->
+ <exclude>org.jboss.ejb3:jboss-ejb3-proxy</exclude>
</excludes>
</bannedDependencies>
<requireMavenVersion>
Modified: projects/ejb3/trunk/core/pom.xml
===================================================================
--- projects/ejb3/trunk/core/pom.xml 2009-03-12 05:07:26 UTC (rev 85762)
+++ projects/ejb3/trunk/core/pom.xml 2009-03-12 05:14:38 UTC (rev 85763)
@@ -393,14 +393,14 @@
<dependency>
<groupId>org.jboss.ejb3</groupId>
- <artifactId>jboss-ejb3-proxy</artifactId>
+ <artifactId>jboss-ejb3-proxy-impl</artifactId>
<version>1.0.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.jboss.ejb3</groupId>
<artifactId>jboss-ejb3-proxy-clustered</artifactId>
- <version>1.0.0</version>
+ <version>1.0.1-SNAPSHOT</version>
</dependency>
<dependency>
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 2009-03-12 05:07:26 UTC (rev 85762)
+++ projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/mdb/RemoteProducerFactory.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -34,7 +34,7 @@
import org.jboss.ejb3.Container;
import org.jboss.ejb3.annotation.MessageProperties;
import org.jboss.ejb3.proxy.ProxyFactory;
-import org.jboss.ejb3.proxy.remoting.ProxyRemotingUtils;
+import org.jboss.ejb3.proxy.impl.remoting.ProxyRemotingUtils;
import org.jboss.util.naming.Util;
/**
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 2009-03-12 05:07:26 UTC (rev 85762)
+++ projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/service/ServiceContainer.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -63,7 +63,7 @@
import org.jboss.ejb3.annotation.Service;
import org.jboss.ejb3.common.lang.SerializableMethod;
import org.jboss.ejb3.proxy.clustered.objectstore.ClusteredObjectStoreBindings;
-import org.jboss.ejb3.proxy.objectstore.ObjectStoreBindings;
+import org.jboss.ejb3.proxy.impl.objectstore.ObjectStoreBindings;
import org.jboss.ejb3.proxy.spi.container.InvokableContext;
import org.jboss.ejb3.proxy.spi.intf.SessionProxy;
import org.jboss.ejb3.session.SessionContainer;
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 2009-03-12 05:07:26 UTC (rev 85762)
+++ projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/session/SessionContainer.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -61,8 +61,8 @@
import org.jboss.ejb3.proxy.clustered.objectstore.ClusteredObjectStoreBindings;
import org.jboss.ejb3.proxy.clustered.registry.ProxyClusteringRegistry;
import org.jboss.ejb3.proxy.factory.ProxyFactoryHelper;
-import org.jboss.ejb3.proxy.factory.session.SessionProxyFactory;
-import org.jboss.ejb3.proxy.jndiregistrar.JndiSessionRegistrarBase;
+import org.jboss.ejb3.proxy.impl.factory.session.SessionProxyFactory;
+import org.jboss.ejb3.proxy.impl.jndiregistrar.JndiSessionRegistrarBase;
import org.jboss.ejb3.proxy.spi.container.InvokableContext;
import org.jboss.ejb3.remoting.IsLocalInterceptor;
import org.jboss.ejb3.stateful.StatefulContainerInvocation;
Modified: 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 2009-03-12 05:07:26 UTC (rev 85762)
+++ projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/session/SessionSpecContainer.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -18,9 +18,9 @@
import org.jboss.ejb3.ThreadLocalStack;
import org.jboss.ejb3.common.lang.SerializableMethod;
import org.jboss.ejb3.common.registrar.spi.Ejb3RegistrarLocator;
-import org.jboss.ejb3.proxy.factory.session.SessionProxyFactory;
-import org.jboss.ejb3.proxy.factory.session.SessionSpecProxyFactory;
-import org.jboss.ejb3.proxy.remoting.SessionSpecRemotingMetadata;
+import org.jboss.ejb3.proxy.impl.factory.session.SessionProxyFactory;
+import org.jboss.ejb3.proxy.impl.factory.session.SessionSpecProxyFactory;
+import org.jboss.ejb3.proxy.impl.remoting.SessionSpecRemotingMetadata;
import org.jboss.ejb3.proxy.spi.container.InvokableContext;
import org.jboss.ejb3.proxy.spi.intf.SessionProxy;
import org.jboss.ejb3.stateful.StatefulContainer;
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 2009-03-12 05:07:26 UTC (rev 85762)
+++ projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/stateful/StatefulContainer.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -67,15 +67,15 @@
import org.jboss.ejb3.interceptors.container.StatefulSessionContainerMethodInvocation;
import org.jboss.ejb3.proxy.clustered.objectstore.ClusteredObjectStoreBindings;
import org.jboss.ejb3.proxy.factory.ProxyFactoryHelper;
-import org.jboss.ejb3.proxy.factory.session.stateful.StatefulSessionProxyFactory;
import org.jboss.ejb3.proxy.impl.EJBMetaDataImpl;
import org.jboss.ejb3.proxy.impl.HomeHandleImpl;
-import org.jboss.ejb3.proxy.invocation.StatefulRemoteInvocation;
-import org.jboss.ejb3.proxy.jndiregistrar.JndiSessionRegistrarBase;
-import org.jboss.ejb3.proxy.jndiregistrar.JndiStatefulSessionRegistrar;
-import org.jboss.ejb3.proxy.objectstore.ObjectStoreBindings;
-import org.jboss.ejb3.proxy.remoting.SessionSpecRemotingMetadata;
-import org.jboss.ejb3.proxy.remoting.StatefulSessionRemotingMetadata;
+import org.jboss.ejb3.proxy.impl.factory.session.stateful.StatefulSessionProxyFactory;
+import org.jboss.ejb3.proxy.impl.invocation.StatefulRemoteInvocation;
+import org.jboss.ejb3.proxy.impl.jndiregistrar.JndiSessionRegistrarBase;
+import org.jboss.ejb3.proxy.impl.jndiregistrar.JndiStatefulSessionRegistrar;
+import org.jboss.ejb3.proxy.impl.objectstore.ObjectStoreBindings;
+import org.jboss.ejb3.proxy.impl.remoting.SessionSpecRemotingMetadata;
+import org.jboss.ejb3.proxy.impl.remoting.StatefulSessionRemotingMetadata;
import org.jboss.ejb3.proxy.spi.container.StatefulSessionFactory;
import org.jboss.ejb3.session.Ejb2xMethodNames;
import org.jboss.ejb3.session.SessionContainer;
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 2009-03-12 05:07:26 UTC (rev 85762)
+++ projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/stateless/StatelessContainer.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -60,12 +60,12 @@
import org.jboss.ejb3.common.registrar.spi.Ejb3RegistrarLocator;
import org.jboss.ejb3.proxy.clustered.objectstore.ClusteredObjectStoreBindings;
import org.jboss.ejb3.proxy.factory.ProxyFactoryHelper;
-import org.jboss.ejb3.proxy.factory.session.SessionSpecProxyFactory;
-import org.jboss.ejb3.proxy.factory.session.stateless.StatelessSessionProxyFactoryBase;
import org.jboss.ejb3.proxy.impl.EJBMetaDataImpl;
-import org.jboss.ejb3.proxy.jndiregistrar.JndiSessionRegistrarBase;
-import org.jboss.ejb3.proxy.objectstore.ObjectStoreBindings;
-import org.jboss.ejb3.proxy.remoting.SessionSpecRemotingMetadata;
+import org.jboss.ejb3.proxy.impl.factory.session.SessionSpecProxyFactory;
+import org.jboss.ejb3.proxy.impl.factory.session.stateless.StatelessSessionProxyFactoryBase;
+import org.jboss.ejb3.proxy.impl.jndiregistrar.JndiSessionRegistrarBase;
+import org.jboss.ejb3.proxy.impl.objectstore.ObjectStoreBindings;
+import org.jboss.ejb3.proxy.impl.remoting.SessionSpecRemotingMetadata;
import org.jboss.ejb3.proxy.spi.container.InvokableContext;
import org.jboss.ejb3.session.SessionContainer;
import org.jboss.ejb3.session.SessionSpecContainer;
Modified: projects/ejb3/trunk/core/src/main/resources/META-INF/ejb3-deployers-jboss-beans.xml
===================================================================
--- projects/ejb3/trunk/core/src/main/resources/META-INF/ejb3-deployers-jboss-beans.xml 2009-03-12 05:07:26 UTC (rev 85762)
+++ projects/ejb3/trunk/core/src/main/resources/META-INF/ejb3-deployers-jboss-beans.xml 2009-03-12 05:14:38 UTC (rev 85763)
@@ -269,30 +269,30 @@
<!-- SLSB JNDI Registrar -->
<bean name="org.jboss.ejb3.JndiRegistrar.Session.SLSBJndiRegistrar"
- class="org.jboss.ejb3.proxy.jndiregistrar.JndiStatelessSessionRegistrar">
+ class="org.jboss.ejb3.proxy.impl.jndiregistrar.JndiStatelessSessionRegistrar">
<constructor>
<parameter>
- org.jboss.ejb3.proxy.objectfactory.session.stateless.StatelessSessionProxyObjectFactory
+ org.jboss.ejb3.proxy.impl.objectfactory.session.stateless.StatelessSessionProxyObjectFactory
</parameter>
</constructor>
</bean>
<!-- SFSB JNDI Registrar -->
<bean name="org.jboss.ejb3.JndiRegistrar.Session.SFSBJndiRegistrar"
- class="org.jboss.ejb3.proxy.jndiregistrar.JndiStatefulSessionRegistrar">
+ class="org.jboss.ejb3.proxy.impl.jndiregistrar.JndiStatefulSessionRegistrar">
<constructor>
<parameter>
- org.jboss.ejb3.proxy.objectfactory.session.stateful.StatefulSessionProxyObjectFactory
+ org.jboss.ejb3.proxy.impl.objectfactory.session.stateful.StatefulSessionProxyObjectFactory
</parameter>
</constructor>
</bean>
<!-- @Service JNDI Registrar -->
<bean name="org.jboss.ejb3.JndiRegistrar.Session.ServiceJndiRegistrar"
- class="org.jboss.ejb3.proxy.jndiregistrar.JndiServiceRegistrar">
+ class="org.jboss.ejb3.proxy.impl.jndiregistrar.JndiServiceRegistrar">
<constructor>
<parameter>
- org.jboss.ejb3.proxy.objectfactory.session.service.ServiceProxyObjectFactory
+ org.jboss.ejb3.proxy.impl.objectfactory.session.service.ServiceProxyObjectFactory
</parameter>
</constructor>
</bean>
Modified: projects/ejb3/trunk/core/src/test/resources/basicbootstrap-beans.xml
===================================================================
--- projects/ejb3/trunk/core/src/test/resources/basicbootstrap-beans.xml 2009-03-12 05:07:26 UTC (rev 85762)
+++ projects/ejb3/trunk/core/src/test/resources/basicbootstrap-beans.xml 2009-03-12 05:14:38 UTC (rev 85763)
@@ -85,10 +85,10 @@
<!-- SLSB JNDI Registrar -->
<bean name="org.jboss.ejb3.JndiRegistrar.Session.SLSBJndiRegistrar"
- class="org.jboss.ejb3.proxy.jndiregistrar.JndiStatelessSessionRegistrar">
+ class="org.jboss.ejb3.proxy.impl.jndiregistrar.JndiStatelessSessionRegistrar">
<constructor>
<parameter>
- org.jboss.ejb3.proxy.objectfactory.session.stateless.StatelessSessionProxyObjectFactory
+ org.jboss.ejb3.proxy.impl.objectfactory.session.stateless.StatelessSessionProxyObjectFactory
</parameter>
</constructor>
<depends>NameServer</depends>
@@ -96,10 +96,10 @@
<!-- SFSB JNDI Registrar -->
<bean name="org.jboss.ejb3.JndiRegistrar.Session.SFSBJndiRegistrar"
- class="org.jboss.ejb3.proxy.jndiregistrar.JndiStatefulSessionRegistrar">
+ class="org.jboss.ejb3.proxy.impl.jndiregistrar.JndiStatefulSessionRegistrar">
<constructor>
<parameter>
- org.jboss.ejb3.proxy.objectfactory.session.stateful.StatefulSessionProxyObjectFactory
+ org.jboss.ejb3.proxy.impl.objectfactory.session.stateful.StatefulSessionProxyObjectFactory
</parameter>
</constructor>
<depends>NameServer</depends>
Modified: projects/ejb3/trunk/core/src/test/resources/servicecontainer-beans.xml
===================================================================
--- projects/ejb3/trunk/core/src/test/resources/servicecontainer-beans.xml 2009-03-12 05:07:26 UTC (rev 85762)
+++ projects/ejb3/trunk/core/src/test/resources/servicecontainer-beans.xml 2009-03-12 05:14:38 UTC (rev 85763)
@@ -3,10 +3,10 @@
<!-- @Service JNDI Registrar -->
<bean name="org.jboss.ejb3.JndiRegistrar.Session.ServiceJndiRegistrar"
- class="org.jboss.ejb3.proxy.jndiregistrar.JndiServiceRegistrar">
+ class="org.jboss.ejb3.proxy.impl.jndiregistrar.JndiServiceRegistrar">
<constructor>
<parameter>
- org.jboss.ejb3.proxy.objectfactory.session.service.ServiceProxyObjectFactory
+ org.jboss.ejb3.proxy.impl.objectfactory.session.service.ServiceProxyObjectFactory
</parameter>
</constructor>
</bean>
Modified: projects/ejb3/trunk/core/src/test/resources/statefulcontainer-beans.xml
===================================================================
--- projects/ejb3/trunk/core/src/test/resources/statefulcontainer-beans.xml 2009-03-12 05:07:26 UTC (rev 85762)
+++ projects/ejb3/trunk/core/src/test/resources/statefulcontainer-beans.xml 2009-03-12 05:14:38 UTC (rev 85763)
@@ -42,10 +42,10 @@
<!-- SFSB JNDI Registrar -->
<bean name="org.jboss.ejb3.JndiRegistrar.Session.SFSBJndiRegistrar"
- class="org.jboss.ejb3.proxy.jndiregistrar.JndiStatefulSessionRegistrar">
+ class="org.jboss.ejb3.proxy.impl.jndiregistrar.JndiStatefulSessionRegistrar">
<constructor>
<parameter>
- org.jboss.ejb3.proxy.objectfactory.session.stateful.StatefulSessionProxyObjectFactory
+ org.jboss.ejb3.proxy.impl.objectfactory.session.stateful.StatefulSessionProxyObjectFactory
</parameter>
</constructor>
<depends>NamingServer</depends>
Modified: projects/ejb3/trunk/core/src/test/resources/statelesscontainer-beans.xml
===================================================================
--- projects/ejb3/trunk/core/src/test/resources/statelesscontainer-beans.xml 2009-03-12 05:07:26 UTC (rev 85762)
+++ projects/ejb3/trunk/core/src/test/resources/statelesscontainer-beans.xml 2009-03-12 05:14:38 UTC (rev 85763)
@@ -2,10 +2,10 @@
<deployment xmlns="urn:jboss:bean-deployer:2.0">
<!-- SLSB JNDI Registrar -->
<bean name="org.jboss.ejb3.JndiRegistrar.Session.SLSBJndiRegistrar"
- class="org.jboss.ejb3.proxy.jndiregistrar.JndiStatelessSessionRegistrar">
+ class="org.jboss.ejb3.proxy.impl.jndiregistrar.JndiStatelessSessionRegistrar">
<constructor>
<parameter>
- org.jboss.ejb3.proxy.objectfactory.session.stateless.StatelessSessionProxyObjectFactory
+ org.jboss.ejb3.proxy.impl.objectfactory.session.stateless.StatelessSessionProxyObjectFactory
</parameter>
</constructor>
<depends>NamingServer</depends>
Modified: projects/ejb3/trunk/plugin/pom.xml
===================================================================
--- projects/ejb3/trunk/plugin/pom.xml 2009-03-12 05:07:26 UTC (rev 85762)
+++ projects/ejb3/trunk/plugin/pom.xml 2009-03-12 05:14:38 UTC (rev 85763)
@@ -4,7 +4,7 @@
<parent>
<groupId>org.jboss.ejb3</groupId>
<artifactId>jboss-ejb3-build</artifactId>
- <version>1.0.0</version>
+ <version>1.0.3-SNAPSHOT</version>
</parent>
<!-- Artifact Configuration -->
@@ -85,17 +85,25 @@
<dependency>
<groupId>org.jboss.ejb3</groupId>
- <artifactId>jboss-ejb3-proxy</artifactId>
+ <artifactId>jboss-ejb3-proxy-impl</artifactId>
<classifier>client</classifier>
<version>1.0.1-SNAPSHOT</version>
<optional>true</optional>
</dependency>
+
+ <dependency>
+ <groupId>org.jboss.ejb3</groupId>
+ <artifactId>jboss-ejb3-proxy-spi</artifactId>
+ <classifier>client</classifier>
+ <version>1.0.0-SNAPSHOT</version>
+ <optional>true</optional>
+ </dependency>
<dependency>
<groupId>org.jboss.ejb3</groupId>
<artifactId>jboss-ejb3-proxy-clustered</artifactId>
<classifier>client</classifier>
- <version>1.0.0</version>
+ <version>1.0.1-SNAPSHOT</version>
<optional>true</optional>
</dependency>
Deleted: projects/ejb3/trunk/proxy/jboss-ejb3-proxy-client.xml
===================================================================
--- projects/ejb3/trunk/proxy/jboss-ejb3-proxy-client.xml 2009-03-12 05:07:26 UTC (rev 85762)
+++ projects/ejb3/trunk/proxy/jboss-ejb3-proxy-client.xml 2009-03-12 05:14:38 UTC (rev 85763)
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- vi:ts=2:sw=2:expandtab:
--->
-<assembly xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/assembly-1.0.0.xsd"
->
- <id>client</id>
- <formats>
- <format>jar</format>
- </formats>
- <includeBaseDirectory>false</includeBaseDirectory>
- <fileSets>
- <fileSet>
- <directory>target/classes</directory>
- <outputDirectory></outputDirectory>
-
- <!--
-
- Most of the classes in the Proxy Component are
- required on the Client CP, so we'll stick with
- exclude patterns to hide internals
-
- -->
- <excludes>
- <exclude>org/jboss/ejb3/proxy/jndiregistrar/**</exclude>
- </excludes>
- </fileSet>
-
- </fileSets>
-</assembly>
Copied: projects/ejb3/trunk/proxy/jboss-ejb3-proxy-impl-client.xml (from rev 85752, projects/ejb3/trunk/proxy/jboss-ejb3-proxy-client.xml)
===================================================================
--- projects/ejb3/trunk/proxy/jboss-ejb3-proxy-impl-client.xml (rev 0)
+++ projects/ejb3/trunk/proxy/jboss-ejb3-proxy-impl-client.xml 2009-03-12 05:14:38 UTC (rev 85763)
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ vi:ts=2:sw=2:expandtab:
+-->
+<assembly xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/assembly-1.0.0.xsd"
+>
+ <id>client</id>
+ <formats>
+ <format>jar</format>
+ </formats>
+ <includeBaseDirectory>false</includeBaseDirectory>
+ <fileSets>
+ <fileSet>
+ <directory>target/classes</directory>
+ <outputDirectory></outputDirectory>
+
+ <!--
+
+ Most of the classes in the Proxy Component are
+ required on the Client CP, so we'll stick with
+ exclude patterns to hide internals
+
+ -->
+ <excludes>
+ <exclude>org/jboss/ejb3/proxy/impl/jndiregistrar/**</exclude>
+ </excludes>
+ </fileSet>
+
+ </fileSets>
+</assembly>
Property changes on: projects/ejb3/trunk/proxy/jboss-ejb3-proxy-impl-client.xml
___________________________________________________________________
Name: svn:mergeinfo
+
Modified: projects/ejb3/trunk/proxy/pom.xml
===================================================================
--- projects/ejb3/trunk/proxy/pom.xml 2009-03-12 05:07:26 UTC (rev 85762)
+++ projects/ejb3/trunk/proxy/pom.xml 2009-03-12 05:14:38 UTC (rev 85763)
@@ -15,10 +15,10 @@
<!-- Artifact Configuration -->
<groupId>org.jboss.ejb3</groupId>
- <artifactId>jboss-ejb3-proxy</artifactId>
+ <artifactId>jboss-ejb3-proxy-impl</artifactId>
<version>1.0.1-SNAPSHOT</version>
- <name>JBoss EJB 3.0 Proxy</name>
- <description>JBoss EJB3 Proxy Component</description>
+ <name>JBoss EJB 3.x Proxy Implementation (Internals)</name>
+ <description>JBoss EJB 3.x Proxy Implementation (Internals)</description>
<url>http://www.jboss.org/jbossejb3</url>
<!-- Build Configuration -->
@@ -58,7 +58,7 @@
</executions>
<configuration>
<descriptors>
- <descriptor>jboss-ejb3-proxy-client.xml</descriptor>
+ <descriptor>jboss-ejb3-proxy-impl-client.xml</descriptor>
</descriptors>
<attach>true</attach>
</configuration>
Property changes on: projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl
___________________________________________________________________
Name: svn:mergeinfo
+
Added: projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/factory/ProxyFactory.java
===================================================================
--- projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/factory/ProxyFactory.java (rev 0)
+++ projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/factory/ProxyFactory.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -0,0 +1,67 @@
+/*
+ * 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.proxy.impl.factory;
+
+/**
+ * ProxyFactory
+ *
+ * Contract for a generic Proxy Factory, specifying
+ * a simple lifecycle and functions common to
+ * all Proxy Factories
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+public interface ProxyFactory
+{
+ // --------------------------------------------------------------------------------||
+ // Functional Methods -------------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ /**
+ * Returns the unique name of this ProxyFactory
+ *
+ * @return
+ */
+ String getName();
+
+ // --------------------------------------------------------------------------------||
+ // Lifecycle Methods --------------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ /**
+ * Lifecycle callback to be invoked
+ * before the ProxyFactory is able to service requests
+ *
+ * @throws Exception
+ */
+ void start() throws Exception;
+
+ /**
+ * Lifecycle callback to be invoked
+ * before the ProxyFactory is taken out of service,
+ * possibly GC'd
+ *
+ * @throws Exception
+ */
+ void stop() throws Exception;
+}
Added: projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/factory/ProxyFactoryBase.java
===================================================================
--- projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/factory/ProxyFactoryBase.java (rev 0)
+++ projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/factory/ProxyFactoryBase.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -0,0 +1,276 @@
+/*
+ * 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.proxy.impl.factory;
+
+import java.lang.reflect.Constructor;
+import java.lang.reflect.InvocationHandler;
+import java.lang.reflect.Proxy;
+import java.util.HashSet;
+import java.util.Set;
+
+import org.jboss.aop.Advisor;
+import org.jboss.aop.AspectManager;
+import org.jboss.aop.advice.AdviceStack;
+import org.jboss.aop.advice.Interceptor;
+import org.jboss.ejb3.proxy.spi.intf.EjbProxy;
+import org.jboss.logging.Logger;
+
+/**
+ * ProxyFactoryBase
+ *
+ * A Base upon which Proxy Factory Implementations may build
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+public abstract class ProxyFactoryBase implements ProxyFactory
+{
+ // --------------------------------------------------------------------------------||
+ // Class Members ------------------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ private static final Logger log = Logger.getLogger(ProxyFactoryBase.class);
+
+ // --------------------------------------------------------------------------------||
+ // Instance Members ---------------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ /**
+ * The Unique name for this Proxy Factory
+ */
+ private String name;
+
+ /**
+ * The name of the target container
+ */
+ private String containerName;
+
+ /**
+ * The globally-unique name of the target container
+ */
+ private String containerGuid;
+
+ private ClassLoader classloader;
+
+ private Advisor advisor;
+
+ // --------------------------------------------------------------------------------||
+ // Constructor --------------------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ /**
+ * Constructor
+ *
+ * @param name The unique name for this ProxyFactory
+ * @param containerName The name of the InvokableContext (container)
+ * upon which Proxies will invoke
+ * @param containerGuid The globally-unique name of the container
+ * @param classloader The ClassLoader associated with the EJBContainer
+ * for which this ProxyFactory is to generate Proxies
+ * @param advisor The Advisor for proxies created by this factory
+ */
+ public ProxyFactoryBase(final String name, final String containerName, final String containerGuid,
+ final ClassLoader classloader, final Advisor advisor)
+ {
+ // Set properties
+ this.setName(name);
+ this.setContainerName(containerName);
+ this.setContainerGuid(containerGuid);
+ this.setClassLoader(classloader);
+ this.setAdvisor(advisor);
+ }
+
+ // --------------------------------------------------------------------------------||
+ // Functional Methods -------------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ /**
+ * Create a Proxy Constructor for the specified interfaces, using the specified CL
+ *
+ * @param interfaces
+ * @param cl
+ * @return
+ * @throws Exception
+ */
+ protected Constructor<?> createProxyConstructor(Set<Class<?>> interfaces, ClassLoader cl)
+ {
+ // Add interfaces common to all proxies
+ interfaces.addAll(this.getCommonProxyInterfaces());
+
+ Class<?> proxyClass = Proxy.getProxyClass(cl, interfaces.toArray(new Class<?>[]
+ {}));
+ Constructor<?> proxyConstructor = null;
+ try
+ {
+ proxyConstructor = proxyClass.getConstructor(InvocationHandler.class);
+ }
+ catch (NoSuchMethodException e)
+ {
+ throw new RuntimeException(e);
+ }
+ return proxyConstructor;
+ }
+
+ /**
+ * Returns Proxy interfaces common to all Proxies generated
+ * by this ProxyFactory
+ *
+ * @return
+ */
+ protected Set<Class<?>> getCommonProxyInterfaces()
+ {
+ // Initialize
+ Set<Class<?>> interfaces = new HashSet<Class<?>>();
+
+ // Add all Proxy Interfaces
+ interfaces.add(EjbProxy.class);
+
+ // Return
+ return interfaces;
+ }
+
+ // --------------------------------------------------------------------------------||
+ // Contracts ----------------------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ /**
+ * Return the name of the interceptor stack to apply to
+ * proxies created by this proxy factory, or null
+ * if no interceptors should be applied
+ *
+ * @return
+ */
+ protected String getInterceptorStackName()
+ {
+ return null;
+ }
+
+ /**
+ * Obtains all interceptors in this Proxy Factory's stack
+ *
+ * @return
+ */
+ protected Interceptor[] getInterceptors()
+ {
+ // If there's no stack name, return no interceptors
+ String stackName = this.getInterceptorStackName();
+ if (stackName == null)
+ {
+ return new Interceptor[]
+ {};
+ }
+
+ // Obtain interceptors by stack name via Aspect Manager
+ AspectManager manager = AspectManager.instance();
+ AdviceStack stack = manager.getAdviceStack(stackName);
+ assert stack != null : "Could not find Advice Stack with name: " + stackName;
+ Advisor advisor = this.getAdvisor();
+ Interceptor[] interceptors = stack.createInterceptors(advisor, null);
+ return interceptors;
+ }
+
+ // --------------------------------------------------------------------------------||
+ // Lifecycle Methods --------------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ /**
+ * Lifecycle callback to be invoked by
+ * before the ProxyFactory is able to service requests
+ *
+ * @throws Exception
+ */
+ public void start() throws Exception
+ {
+ // Log
+ log.debug("Started: " + this);
+ }
+
+ /**
+ * Lifecycle callback to be invoked by the ProxyFactoryDeployer
+ * before the ProxyFactory is taken out of service,
+ * possibly GC'd
+ *
+ * @throws Exception
+ */
+ public void stop() throws Exception
+ {
+ // Log
+ log.debug("Stopped: " + this);
+
+ //TODO
+ }
+
+ // --------------------------------------------------------------------------------||
+ // Accessors / Mutators -----------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ public ClassLoader getClassLoader()
+ {
+ return classloader;
+ }
+
+ protected void setClassLoader(final ClassLoader classloader)
+ {
+ this.classloader = classloader;
+ }
+
+ public String getName()
+ {
+ return name;
+ }
+
+ protected void setName(final String name)
+ {
+ this.name = name;
+ }
+
+ protected String getContainerName()
+ {
+ return containerName;
+ }
+
+ public void setContainerName(String containerName)
+ {
+ this.containerName = containerName;
+ }
+
+ protected Advisor getAdvisor()
+ {
+ return advisor;
+ }
+
+ private void setAdvisor(Advisor advisor)
+ {
+ this.advisor = advisor;
+ }
+
+ protected String getContainerGuid()
+ {
+ return containerGuid;
+ }
+
+ private void setContainerGuid(String containerGuid)
+ {
+ this.containerGuid = containerGuid;
+ }
+
+}
Added: projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/factory/session/SessionProxyFactory.java
===================================================================
--- projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/factory/session/SessionProxyFactory.java (rev 0)
+++ projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/factory/session/SessionProxyFactory.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -0,0 +1,51 @@
+/*
+ * 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.proxy.impl.factory.session;
+
+import org.jboss.ejb3.proxy.impl.factory.ProxyFactory;
+
+/**
+ * SessionProxyFactory
+ *
+ * Contract for a Proxy Factory responsible
+ * for creation of both EJB3 and EJB2.x
+ * Session Bean Proxies
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+public interface SessionProxyFactory extends ProxyFactory
+{
+
+ /**
+ * Create an EJB3 Business proxy with no
+ * specific target business interface. The
+ * returned proxy will implement all appropriate
+ * business interfaces. Additionally, if
+ * the Home interface is bound alongside
+ * the Default (same JNDI Name), this
+ * Proxy will implement the Home interface as well.
+ *
+ * @return
+ */
+ Object createProxyDefault();
+}
Added: projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/factory/session/SessionProxyFactoryBase.java
===================================================================
--- projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/factory/session/SessionProxyFactoryBase.java (rev 0)
+++ projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/factory/session/SessionProxyFactoryBase.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -0,0 +1,699 @@
+/*
+ * 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.proxy.impl.factory.session;
+
+import java.lang.reflect.Constructor;
+import java.lang.reflect.Method;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import javax.ejb.EJBHome;
+import javax.ejb.EJBLocalHome;
+
+import org.jboss.aop.Advisor;
+import org.jboss.ejb3.common.lang.ClassHelper;
+import org.jboss.ejb3.common.string.StringUtils;
+import org.jboss.ejb3.proxy.impl.factory.ProxyFactoryBase;
+import org.jboss.ejb3.proxy.impl.handler.session.SessionProxyInvocationHandler;
+import org.jboss.ejb3.proxy.spi.intf.SessionProxy;
+import org.jboss.logging.Logger;
+import org.jboss.metadata.ejb.jboss.JBossSessionBeanMetaData;
+
+/**
+ * SessionProxyFactoryBase
+ *
+ * Base upon which Session Proxy Factory implementations
+ * may build
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+public abstract class SessionProxyFactoryBase extends ProxyFactoryBase implements SessionSpecProxyFactory
+{
+
+ // --------------------------------------------------------------------------------||
+ // Class Members ------------------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ private static final Logger log = Logger.getLogger(SessionProxyFactoryBase.class);
+
+ // --------------------------------------------------------------------------------||
+ // Instance Members ---------------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ private JBossSessionBeanMetaData metadata;
+
+ /**
+ * Constructor for the default Proxy Constructor (All
+ * business interfaces and, if bound together, the EJB2.x Home)
+ */
+ private Constructor<?> constructorProxyDefault;
+
+ /**
+ * Map of Proxy Constructors, one per business interface, with key
+ * as the fully-qualified class name of the interface, and value
+ * of the constructor to use
+ */
+ private Map<String, Constructor<?>> constructorsProxySpecificBusinessInterface;
+
+ /**
+ * Constructor for the EJB2.x Home Proxy
+ */
+ private Constructor<?> constructorProxyHome;
+
+ /**
+ * Constructor for the EJB2.x View Proxy
+ */
+ private Constructor<?> constructorProxyEjb2x;
+
+ // --------------------------------------------------------------------------------||
+ // Constructor --------------------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ /**
+ * Constructor
+ *
+ * @param name The unique name for this ProxyFactory
+ * @param containerName The name of the InvokableContext (container)
+ * upon which Proxies will invoke
+ * @param containerGuid The globally-unique name of the container
+ * @param metadata The metadata representing this Session Bean
+ * @param classloader The ClassLoader associated with the Container's Bean Class
+ * for which this ProxyFactory is to generate Proxies
+ * @param advisor The Advisor for proxies created by this factory
+ */
+ public SessionProxyFactoryBase(final String name, final String containerName, final String containerGuid,
+ final JBossSessionBeanMetaData metadata, final ClassLoader classloader, final Advisor advisor)
+ {
+ // Call Super
+ super(name, containerName, containerGuid, classloader, advisor);
+
+ // Set Metadata
+ this.setMetadata(metadata);
+
+ // Instanciate backing Map for interface-specific business proxies
+ this.setConstructorsProxySpecificBusinessInterface(new HashMap<String, Constructor<?>>());
+ }
+
+ // --------------------------------------------------------------------------------||
+ // Functional Methods -------------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ /**
+ * Create an EJB2.x Home Proxy
+ *
+ * @return
+ */
+ public Object createProxyHome()
+ {
+ // Create a new InvocationHandler
+ SessionProxyInvocationHandler handler = this.createHomeInvocationHandler();
+
+ try
+ {
+ // Create a new Proxy instance, and return
+ return this.getConstructorProxyHome().newInstance(handler);
+ }
+ catch (Throwable t)
+ {
+ // Throw a descriptive error message along with the originating Throwable
+ throw new RuntimeException("Could not create Home Proxy for " + this.getMetadata().getEjbName(), t);
+ }
+ }
+
+ /**
+ * Create an EJB3 Business proxy with no
+ * specific target business interface. The
+ * returned proxy will implement all appropriate
+ * business interfaces. Additionally, if
+ * the Home interface is bound alongside
+ * the Default (same JNDI Name), this
+ * Proxy will implement the Home interface as well.
+ *
+ * @return
+ */
+ public Object createProxyDefault()
+ {
+ // Obtain Constructor to Default Proxy
+ Constructor<?> constructor = this.getConstructorProxyDefault();
+ assert constructor != null : "Constructor for Default Proxy was null; perhaps the "
+ + SessionProxyFactory.class.getSimpleName() + " was not properly started?";
+
+ // Create a new InvocationHandler
+ SessionProxyInvocationHandler handler = this.createBusinessDefaultInvocationHandler();
+
+ try
+ {
+ // Create a new Proxy instance, and return
+ return constructor.newInstance(handler);
+ }
+ catch (Throwable t)
+ {
+ // Throw a descriptive error message along with the originating Throwable
+ throw new RuntimeException("Could not create the Default Proxy for " + this.getMetadata().getEjbName(), t);
+ }
+ }
+
+ /**
+ * Create an EJB3 Business Proxy specific to the specified
+ * target business interface name (expressed as
+ * a fully-qualified class name)
+ *
+ * @param businessInterfaceName
+ * @return
+ */
+ public Object createProxyBusiness(final String businessInterfaceName)
+ {
+ // Ensure businessInterfaceName is specified
+ assert businessInterfaceName != null && businessInterfaceName.trim().length() > 0 : "Required business interface type name was not specified";
+
+ try
+ {
+
+ // Obtain the correct business proxy constructor
+ Constructor<?> constructor = this.getConstructorsProxySpecificBusinessInterface().get(
+ businessInterfaceName.trim());
+
+ // Ensure the constructor was found
+ assert constructor != null : "No business proxy constructor for \"" + businessInterfaceName
+ + "\" was found; not created at start() properly? Bad value bound as RefAddr in JNDI?";
+
+ // Create a new InvocationHandler
+ SessionProxyInvocationHandler handler = this
+ .createBusinessInterfaceSpecificInvocationHandler(businessInterfaceName);
+
+ // Create a new Proxy instance
+ Object proxy = constructor.newInstance(handler);
+
+ // Return
+ return proxy;
+ }
+ catch (Throwable t)
+ {
+ // Throw a descriptive error message along with the originating Throwable
+ throw new RuntimeException("Could not create the EJB3 Business Proxy implementing \"" + businessInterfaceName
+ + "\" for " + this.getMetadata().getEjbName(), t);
+ }
+ }
+
+ /**
+ * Create an EJB2.x Proxy
+ *
+ * @return
+ */
+ public Object createProxyEjb2x()
+ {
+ // Create a new InvocationHandler
+ SessionProxyInvocationHandler handler = this.createEjb2xComponentInterfaceInvocationHandler();
+
+ try
+ {
+ // Create a new Proxy instance, and return
+ return this.getConstructorProxyEjb2x().newInstance(handler);
+ }
+ catch (Throwable t)
+ {
+ // Throw a descriptive error message along with the originating Throwable
+ throw new RuntimeException("Could not create the EJB2.x Proxy for " + this.getMetadata().getEjbName(), t);
+ }
+ }
+
+ // --------------------------------------------------------------------------------||
+ // Lifecycle Methods --------------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ /**
+ * Lifecycle callback to be invoked
+ * before the ProxyFactory is able to service requests
+ *
+ * @throws Exception
+ */
+ @Override
+ public void start() throws Exception
+ {
+ // Call Super
+ super.start();
+
+ /*
+ * TODO:
+ *
+ * Yet another method that should be broken apart
+ * and analyzed for re-use.
+ */
+
+ /*
+ * Make Proxies for EJB3 Business Interfaces
+ */
+
+ // Obtain Business Interface Types
+ Set<String> businessInterfaceTypes = this.getBusinessInterfaceTypes();
+
+ // Initialize
+ Set<Class<?>> businessInterfaceClasses = new HashSet<Class<?>>();
+
+ // Determine if business interfaces are defined
+ boolean hasBusinessInterfaces = businessInterfaceTypes != null && businessInterfaceTypes.size() > 0;
+
+ // If there are business interfaces
+ if (hasBusinessInterfaces)
+ {
+ // For all business interface types
+ for (String businessInterfaceType : businessInterfaceTypes)
+ {
+ Class<?> businessInterface = null;
+ try
+ {
+ // Load
+ businessInterface = this.getClassLoader().loadClass(businessInterfaceType);
+ }
+ catch (ClassNotFoundException cnfe)
+ {
+ throw new RuntimeException("Could not find specified Session Bean Business Interface \""
+ + businessInterfaceType + "\" in " + ClassLoader.class.getSimpleName() + " for EJB "
+ + this.getMetadata().getEjbName(), cnfe);
+ }
+
+ // Add business interface to classes
+ businessInterfaceClasses.add(businessInterface);
+
+ // Make Proxy specific to the business interface
+ Set<Class<?>> businessInterfaces = new HashSet<Class<?>>();
+ businessInterfaces.add(businessInterface);
+ Constructor<?> businessInterfaceConstructor = this.createProxyConstructor(businessInterfaces, this
+ .getClassLoader());
+ log.debug("Created Session Bean Business Interface-Specific Proxy Constructor implementing \""
+ + businessInterfaceType + "\"");
+
+ // Set
+ this.getConstructorsProxySpecificBusinessInterface().put(businessInterfaceType,
+ businessInterfaceConstructor);
+
+ }
+ }
+
+ /*
+ * Make Constructor for Home
+ */
+
+ // Obtain Home Interface Type
+ String homeInterfaceType = this.getHomeType();
+
+ // Determine if Home is defined
+ boolean hasHomeInterface = homeInterfaceType != null && !homeInterfaceType.equals("");
+
+ // Ensure Home ad/or Business is defined
+ if (!hasHomeInterface && !hasBusinessInterfaces)
+ {
+ // Throw bean provider descriptive error
+ throw new RuntimeException("Cannot deploy EJB " + this.getMetadata().getEjbName()
+ + " as it has no EJB3 (Business Interface) or EJB2.x (Home Interface) Views Defined.");
+ }
+
+ // Initialize Home Interface Class
+ Class<?> homeInterfaceClass = null;
+
+ // If Home is defined
+ if (hasHomeInterface)
+ {
+ try
+ {
+ // Load the Home class
+ homeInterfaceClass = this.getClassLoader().loadClass(homeInterfaceType);
+ }
+ catch (ClassNotFoundException cnfe)
+ {
+ throw new RuntimeException("Could not find specified Session Bean Home Interface \"" + homeInterfaceType
+ + "\" in " + ClassLoader.class.getSimpleName() + " for EJB " + this.getMetadata().getEjbName(), cnfe);
+ }
+
+ // Make the Home Proxy Constructor
+ Set<Class<?>> homeInterfaces = new HashSet<Class<?>>();
+ homeInterfaces.add(homeInterfaceClass);
+ Constructor<?> homeConstructor = this.createProxyConstructor(homeInterfaces, this.getClassLoader());
+ log.debug("Created Session Bean Home Proxy Constructor implementing \"" + homeInterfaceType + "\"");
+
+ // Set the Home Proxy Constructor
+ this.setConstructorProxyHome(homeConstructor);
+ }
+
+ /*
+ * Make Default Proxy
+ */
+
+ // Create a Set to hold all relevant interfaces
+ Set<Class<?>> defaultProxyInterfaces = new HashSet<Class<?>>();
+
+ // Add all business interfaces
+ if (hasBusinessInterfaces)
+ {
+ defaultProxyInterfaces.addAll(businessInterfaceClasses);
+ }
+
+ // If there's a home defined and its bound to the same binding as the default
+ if (hasHomeInterface && this.getMetadata().getJndiName().equals(this.getMetadata().getHomeJndiName()))
+ {
+ defaultProxyInterfaces.add(homeInterfaceClass);
+ }
+
+ // Make the Default Business Interfaces Proxy Constructor
+ Constructor<?> businessInterfacesConstructor = this.createProxyConstructor(defaultProxyInterfaces, this
+ .getClassLoader());
+ log.debug("Created Session Bean Default EJB3 Business Proxy Constructor implementing " + defaultProxyInterfaces);
+
+ // Set
+ this.setConstructorProxyDefault(businessInterfacesConstructor);
+
+ /*
+ * Make Constructor for EJB2.x Views
+ */
+
+ // EJB2.x Views may exist only if there is a Home
+ if (hasHomeInterface)
+ {
+ // Initialize Set of EJB2.x Interfaces
+ Set<Class<?>> ejb2xInterfaces = new HashSet<Class<?>>();
+
+ // Get return types of create methods (EJB3 Core Specification 3.6.2.1)
+ //TODO Should be handled by metadata, see @Deprecated on the method below
+ Set<Class<?>> homeReturnTypes = this.getReturnTypesFromCreateMethods(homeInterfaceClass);
+ if (homeReturnTypes != null)
+ {
+ ejb2xInterfaces.addAll(homeReturnTypes);
+
+ }
+
+ // Get explicitly-defined EJB2x interface type
+ String ejb2xDeclaredType = StringUtils.adjustWhitespaceStringToNull(this.getEjb2xInterfaceType());
+
+ // If there is an explicitly-defined EJB2.x interface
+ if (ejb2xDeclaredType != null)
+ {
+ Class<?> ejb2xInterface = null;
+ try
+ {
+ // Load
+ ejb2xInterface = this.getClassLoader().loadClass(ejb2xDeclaredType);
+ }
+ catch (ClassNotFoundException cnfe)
+ {
+ throw new RuntimeException("Could not find specified Session Bean EJB2.x Interface \""
+ + ejb2xDeclaredType + "\" in " + ClassLoader.class.getSimpleName() + " for EJB "
+ + this.getMetadata().getEjbName(), cnfe);
+ }
+
+ // Add
+ ejb2xInterfaces.add(ejb2xInterface);
+ }
+
+ // Make the EJB2.x Proxy Constructor
+ Constructor<?> ejb2xConstructor = this.createProxyConstructor(ejb2xInterfaces, this.getClassLoader());
+ log.debug("Created Session Bean EJB2x Proxy Constructor implementing " + ejb2xInterfaces);
+
+ // Set the EJB2.x Proxy Constructor
+ this.setConstructorProxyEjb2x(ejb2xConstructor);
+ }
+
+ }
+
+ /**
+ * Lifecycle callback to be invoked by the ProxyFactoryDeployer
+ * before the ProxyFactory is taken out of service,
+ * possibly GC'd
+ *
+ * @throws Exception
+ */
+ @Override
+ public void stop() throws Exception
+ {
+ super.stop();
+ //TODO
+ }
+
+ /**
+ * Returns Proxy interfaces common to all Proxies generated
+ * by this ProxyFactory
+ *
+ * @return
+ */
+ @Override
+ protected Set<Class<?>> getCommonProxyInterfaces()
+ {
+ // Initialize
+ Set<Class<?>> interfaces = super.getCommonProxyInterfaces();
+
+ // Add
+ interfaces.add(SessionProxy.class);
+
+ // Return
+ return interfaces;
+ }
+
+ // --------------------------------------------------------------------------------||
+ // Functional Methods -------------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ /**
+ * Obtains the return types declared by the "create" methods for the specified home interface.
+ *
+ * EJB3 Core Specification 3.6.2.1
+ * JIRA: EJBTHREE-1127
+ *
+ * @param homeInterface
+ * @param isStateless Flag to indicate whether this is for a Stateful or Stateless container
+ * @return
+ * @deprecated http://jira.jboss.com/jira/browse/JBMETA-41
+ */
+ @Deprecated
+ protected Set<Class<?>> getReturnTypesFromCreateMethods(Class<?> homeInterface, boolean isStateless)
+ {
+ /*
+ * TODO
+ *
+ * Kill the "isStateless" argument, centralize logic as appropriate,
+ * and use polymorphsm to properly implement this method.
+ *
+ * The current structure with the "isStateless" was born out of
+ * this function originating as a static utility from EJB3 Core.
+ *
+ * Note: Perhaps this is a moot point, given the @Deprecated tag
+ * and that jboss-metadata should be implementing this.
+ */
+
+ // Ensure we've been passed a Home or LocalHome interface (Developers only)
+ assert (EJBHome.class.isAssignableFrom(homeInterface) || EJBLocalHome.class.isAssignableFrom(homeInterface));
+
+ // Ensure we've been passed a Home or LocalHome interface (End-User)
+ if (!EJBHome.class.isAssignableFrom(homeInterface) && !EJBLocalHome.class.isAssignableFrom(homeInterface))
+ {
+ throw new RuntimeException("Declared EJB 2.1 Home Interface " + homeInterface.getName() + " does not extend "
+ + EJBHome.class.getName() + " or " + EJBLocalHome.class.getName()
+ + " as required by EJB 3.0 Core Specification 4.6.8 and 4.6.10");
+ }
+
+ // Initialize
+ Set<Class<?>> types = new HashSet<Class<?>>();
+ List<Method> createMethods = null;
+
+ // If for a Stateless Container
+ if (isStateless)
+ {
+ // Initialize error message
+ String specViolationErrorMessage = "EJB 3.0 Specification Violation (4.6.8 Bullet 4, 4.6.10 Bullet 4): \""
+ + "A stateless session bean must define exactly one create method with no arguments." + "\"; found in "
+ + homeInterface.getName();
+
+ // Get all methods with signature "create"
+ createMethods = new ArrayList<Method>();
+ try
+ {
+ createMethods.add(homeInterface.getMethod("create", new Class<?>[]
+ {}));
+ }
+ // EJB 3.0 Specification 4.6.8 Bullet 4 Violation
+ // EJBTHREE-1156
+ catch (NoSuchMethodException e)
+ {
+ throw new RuntimeException(specViolationErrorMessage);
+ }
+
+ // Ensure only one create method is defined
+ // EJB 3.0 Specification 4.6.8 Bullet 4 Violation
+ // EJBTHREE-1156
+ if (createMethods.size() > 1)
+ {
+ throw new RuntimeException(specViolationErrorMessage);
+ }
+ }
+ else
+ {
+ // Obtain all "create<METHOD>" methods
+ createMethods = ClassHelper.getAllMethodsByPrefix(homeInterface, "create");
+ }
+ if (createMethods.size() == 0)
+ {
+ throw new RuntimeException("EJB 3.0 Core Specification Violation (4.6.8 Bullet 5): EJB2.1 Home Interface "
+ + homeInterface + " does not declare a \'create<METHOD>\' method");
+ }
+
+ // Add all return types
+ for (Method method : createMethods)
+ {
+ types.add(method.getReturnType());
+ }
+
+ // Return
+ return types;
+ }
+
+ // --------------------------------------------------------------------------------||
+ // Contracts ----------------------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ /**
+ * Returns the a Set of String representations of the Business Interface Types
+ *
+ * @return
+ */
+ protected abstract Set<String> getBusinessInterfaceTypes();
+
+ /**
+ * Returns the String representation of the Home Interface Type
+ * @return
+ */
+ protected abstract String getHomeType();
+
+ /**
+ * Returns the String representation of the EJB2.x Interface Types
+ *
+ * @return
+ */
+ protected abstract String getEjb2xInterfaceType();
+
+ /**
+ * Obtains the return types declared by the "create" methods for the specified home interface.
+ *
+ * @param homeInterface
+ * @return
+ */
+ protected abstract Set<Class<?>> getReturnTypesFromCreateMethods(Class<?> homeInterface);
+
+ /**
+ * Returns the Constructor of the SessionProxyInvocationHandler to be used in
+ * instanciating new handlers to specify in Proxy Creation
+ *
+ * Used for creating a Handler for a Business Interface-specific proxy
+ *
+ * @return
+ */
+ protected abstract SessionProxyInvocationHandler createBusinessInterfaceSpecificInvocationHandler(
+ String businessInterfaceName);
+
+ /**
+ * Returns the Constructor of the SessionProxyInvocationHandler to be used in
+ * instanciating new handlers to specify in Proxy Creation
+ *
+ * Used for creating a Handler for a Business Default proxy
+ *
+ * @return
+ */
+ protected abstract SessionProxyInvocationHandler createBusinessDefaultInvocationHandler();
+
+ /**
+ * Returns the Constructor of the SessionProxyInvocationHandler to be used in
+ * instanciating new handlers to specify in Proxy Creation
+ *
+ * Used for creating a Handler for an EJB2.x Component Interface proxy
+ *
+ * @return
+ */
+ protected abstract SessionProxyInvocationHandler createEjb2xComponentInterfaceInvocationHandler();
+
+ /**
+ * Returns the Constructor of the SessionProxyInvocationHandler to be used in
+ * instanciating new handlers to specify in Proxy Creation
+ *
+ * Used for creating a Handler for am EJB2.x Home proxy
+ *
+ * @return
+ */
+ protected abstract SessionProxyInvocationHandler createHomeInvocationHandler();
+
+ // --------------------------------------------------------------------------------||
+ // Accessors / Mutators -----------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ public JBossSessionBeanMetaData getMetadata()
+ {
+ return metadata;
+ }
+
+ protected void setMetadata(final JBossSessionBeanMetaData metadata)
+ {
+ this.metadata = metadata;
+ }
+
+ protected Constructor<?> getConstructorProxyDefault()
+ {
+ return constructorProxyDefault;
+ }
+
+ protected void setConstructorProxyDefault(Constructor<?> constructorProxyDefault)
+ {
+ this.constructorProxyDefault = constructorProxyDefault;
+ }
+
+ protected Map<String, Constructor<?>> getConstructorsProxySpecificBusinessInterface()
+ {
+ return constructorsProxySpecificBusinessInterface;
+ }
+
+ protected void setConstructorsProxySpecificBusinessInterface(
+ Map<String, Constructor<?>> constructorsProxySpecificBusinessInterface)
+ {
+ this.constructorsProxySpecificBusinessInterface = constructorsProxySpecificBusinessInterface;
+ }
+
+ protected Constructor<?> getConstructorProxyHome()
+ {
+ return constructorProxyHome;
+ }
+
+ protected void setConstructorProxyHome(Constructor<?> constructorProxyHome)
+ {
+ this.constructorProxyHome = constructorProxyHome;
+ }
+
+ protected Constructor<?> getConstructorProxyEjb2x()
+ {
+ return constructorProxyEjb2x;
+ }
+
+ protected void setConstructorProxyEjb2x(Constructor<?> constructorProxyEjb2x)
+ {
+ this.constructorProxyEjb2x = constructorProxyEjb2x;
+ }
+
+}
Added: projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/factory/session/SessionSpecProxyFactory.java
===================================================================
--- projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/factory/session/SessionSpecProxyFactory.java (rev 0)
+++ projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/factory/session/SessionSpecProxyFactory.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -0,0 +1,60 @@
+/*
+ * 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.proxy.impl.factory.session;
+
+/**
+ * SessionSpecProxyFactory
+ *
+ * Contract for a Proxy Factory responsible
+ * for creation of both EJB3 and EJB2.x
+ * Session Bean Proxies as defined by the EJB3
+ * specification
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+public interface SessionSpecProxyFactory extends SessionProxyFactory
+{
+ /**
+ * Create an EJB2.x Home Proxy
+ *
+ * @return
+ */
+ Object createProxyHome();
+
+ /**
+ * Create an EJB3 Business Proxy specific to the specified
+ * target business interface name (expressed as
+ * a fully-qualified class name)
+ *
+ * @param businessInterfaceName
+ * @return
+ */
+ Object createProxyBusiness(String businessInterfaceName);
+
+ /**
+ * Create an EJB2.x Proxy
+ *
+ * @return
+ */
+ Object createProxyEjb2x();
+}
Added: projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/factory/session/service/ServiceLocalProxyFactory.java
===================================================================
--- projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/factory/session/service/ServiceLocalProxyFactory.java (rev 0)
+++ projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/factory/session/service/ServiceLocalProxyFactory.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -0,0 +1,103 @@
+/*
+ * 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.proxy.impl.factory.session.service;
+
+import java.util.Set;
+
+import org.jboss.aop.Advisor;
+import org.jboss.aop.advice.Interceptor;
+import org.jboss.ejb3.proxy.impl.handler.session.SessionLocalProxyInvocationHandler;
+import org.jboss.logging.Logger;
+import org.jboss.metadata.ejb.jboss.JBossServiceBeanMetaData;
+
+/**
+ * ServiceLocalProxyFactory
+ *
+ * A @Service Proxy Factory for Local Views
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+public class ServiceLocalProxyFactory extends ServiceProxyFactoryBase implements ServiceProxyFactory
+{
+ // --------------------------------------------------------------------------------||
+ // Class Members ------------------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ private static final Logger logger = Logger.getLogger(ServiceLocalProxyFactory.class);
+
+ // --------------------------------------------------------------------------------||
+ // Constructor --------------------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ /**
+ * Constructor
+ *
+ * @param name The unique name for this ProxyFactory
+ * @param containerName The name of the InvokableContext (container)
+ * upon which Proxies will invoke
+ * @param containerGuid The globally-unique name of the container
+ * @param metadata The metadata representing this SLSB
+ * @param classloader The ClassLoader associated with the StatelessContainer
+ * for which this ProxyFactory is to generate Proxies
+ * @param advisor The Advisor for proxies created by this factory
+ */
+ public ServiceLocalProxyFactory(final String name, final String containerName, final String containerGuid,
+ final JBossServiceBeanMetaData metadata, final ClassLoader classloader, final Advisor advisor)
+ {
+ // Call Super
+ super(name, containerName, containerGuid, metadata, classloader, advisor);
+ }
+
+ // --------------------------------------------------------------------------------||
+ // Required Implementations -------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ /**
+ * Returns the a Set of String representations of the Business Interface Types
+ *
+ * @return
+ */
+ @Override
+ protected final Set<String> getBusinessInterfaceTypes()
+ {
+ return this.getMetadata().getBusinessLocals();
+ }
+
+ @Override
+ protected SessionLocalProxyInvocationHandler createInvocationHandler()
+ {
+ // Obtain container name
+ String containerName = this.getContainerName();
+ String containerGuid = this.getContainerGuid();
+
+ // Get Interceptors
+ Interceptor[] interceptors = this.getInterceptors();
+
+ // Create
+ SessionLocalProxyInvocationHandler handler = new SessionLocalProxyInvocationHandler(containerName,
+ containerGuid, interceptors, null);
+
+ // Return
+ return handler;
+ }
+}
Added: projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/factory/session/service/ServiceProxyFactory.java
===================================================================
--- projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/factory/session/service/ServiceProxyFactory.java (rev 0)
+++ projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/factory/session/service/ServiceProxyFactory.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -0,0 +1,39 @@
+/*
+ * 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.proxy.impl.factory.session.service;
+
+import org.jboss.ejb3.proxy.impl.factory.session.SessionProxyFactory;
+
+/**
+ * ServiceProxyFactory
+ *
+ * Defines functions required of a Proxy Factory
+ * responsible for generating Proxies to
+ * JBoss EJB3 JMX Service Beans
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+public interface ServiceProxyFactory extends SessionProxyFactory
+{
+
+}
Added: projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/factory/session/service/ServiceProxyFactoryBase.java
===================================================================
--- projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/factory/session/service/ServiceProxyFactoryBase.java (rev 0)
+++ projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/factory/session/service/ServiceProxyFactoryBase.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -0,0 +1,272 @@
+/*
+ * 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.proxy.impl.factory.session.service;
+
+import java.lang.reflect.Constructor;
+import java.util.HashSet;
+import java.util.Set;
+
+import org.jboss.aop.Advisor;
+import org.jboss.ejb3.proxy.impl.factory.ProxyFactoryBase;
+import org.jboss.ejb3.proxy.impl.handler.session.SessionProxyInvocationHandler;
+import org.jboss.ejb3.proxy.spi.intf.ServiceProxy;
+import org.jboss.logging.Logger;
+import org.jboss.metadata.ejb.jboss.JBossServiceBeanMetaData;
+
+/**
+ * ServiceProxyFactoryBase
+ *
+ * Base upon which @Service Proxy Factory implementations
+ * may build
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+public abstract class ServiceProxyFactoryBase extends ProxyFactoryBase implements ServiceProxyFactory
+{
+
+ // --------------------------------------------------------------------------------||
+ // Class Members ------------------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ private static final Logger log = Logger.getLogger(ServiceProxyFactoryBase.class);
+
+ // --------------------------------------------------------------------------------||
+ // Instance Members ---------------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ private JBossServiceBeanMetaData metadata;
+
+ /**
+ * Proxy Constructor (All
+ * business interfaces)
+ */
+ private Constructor<?> proxyConstructor;
+
+ // --------------------------------------------------------------------------------||
+ // Constructor --------------------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ /**
+ * Constructor
+ *
+ * @param name The unique name for this ProxyFactory
+ * @param containerName The name of the InvokableContext (container)
+ * upon which Proxies will invoke
+ * @param containerGuid The globally-unique name of the container
+ * @param metadata The metadata representing this @Service Bean
+ * @param classloader The ClassLoader associated with the Container's Bean Class
+ * for which this ProxyFactory is to generate Proxies
+ * @param advisor The Advisor for proxies created by this factory
+ */
+ public ServiceProxyFactoryBase(final String name, final String containerName, final String containerGuid,
+ final JBossServiceBeanMetaData metadata, final ClassLoader classloader, final Advisor advisor)
+ {
+ // Call Super
+ super(name, containerName, containerGuid, classloader, advisor);
+
+ // Set Metadata
+ this.setMetadata(metadata);
+ }
+
+ // --------------------------------------------------------------------------------||
+ // Functional Methods -------------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ /**
+ * Create an EJB3 Business proxy. The
+ * returned proxy will implement all appropriate
+ * business interfaces.
+ *
+ * @return
+ */
+ public Object createProxyDefault()
+ {
+ // Obtain Constructor to Default Proxy
+ Constructor<?> constructor = this.getProxyConstructor();
+ assert constructor != null : "Constructor for Default Proxy was null; perhaps the "
+ + ServiceProxyFactory.class.getSimpleName() + " was not properly started?";
+
+ // Create a new InvocationHandler
+ SessionProxyInvocationHandler handler = this.createInvocationHandler();
+
+ try
+ {
+ // Create a new Proxy instance, and return
+ return constructor.newInstance(handler);
+ }
+ catch (Throwable t)
+ {
+ // Throw a descriptive error message along with the originating Throwable
+ throw new RuntimeException("Could not create the Default Proxy for " + this.getMetadata().getEjbName(), t);
+ }
+ }
+
+ // --------------------------------------------------------------------------------||
+ // Lifecycle Methods --------------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ /**
+ * Lifecycle callback to be invoked
+ * before the ProxyFactory is able to service requests
+ *
+ * @throws Exception
+ */
+ @Override
+ public void start() throws Exception
+ {
+ // Call Super
+ super.start();
+
+ /*
+ * Make Default Proxy
+ */
+
+ // Create a Set to hold all relevant interfaces
+ Set<Class<?>> defaultProxyInterfaces = new HashSet<Class<?>>();
+
+ // Obtain Business Interface Types
+ Set<String> businessInterfaceTypes = this.getBusinessInterfaceTypes();
+
+ // Initialize
+ Set<Class<?>> businessInterfaceClasses = new HashSet<Class<?>>();
+
+ // Determine if business interfaces are defined
+ boolean hasBusinessInterfaces = businessInterfaceTypes != null && businessInterfaceTypes.size() > 0;
+
+ // If there are business interfaces
+ if (hasBusinessInterfaces)
+ {
+ // For all business interface types
+ for (String businessInterfaceType : businessInterfaceTypes)
+ {
+ Class<?> businessInterface = null;
+ try
+ {
+ // Load
+ businessInterface = this.getClassLoader().loadClass(businessInterfaceType);
+ }
+ catch (ClassNotFoundException cnfe)
+ {
+ throw new RuntimeException("Could not find specified @Service Bean Business Interface \""
+ + businessInterfaceType + "\" in " + ClassLoader.class.getSimpleName() + " for EJB "
+ + this.getMetadata().getEjbName(), cnfe);
+ }
+
+ // Add business interface to classes
+ businessInterfaceClasses.add(businessInterface);
+ }
+ }
+
+ // Add all business interfaces
+ defaultProxyInterfaces.addAll(businessInterfaceClasses);
+
+ // Make the Default Business Interfaces Proxy Constructor
+ Constructor<?> businessInterfacesConstructor = this.createProxyConstructor(defaultProxyInterfaces, this
+ .getClassLoader());
+ log.debug("Created @Service Bean Default EJB3 Business Proxy Constructor implementing " + defaultProxyInterfaces);
+
+ // Set
+ this.setProxyConstructor(businessInterfacesConstructor);
+
+ }
+
+ /**
+ * Lifecycle callback to be invoked
+ * before the ProxyFactory is taken out of service,
+ * possibly GC'd
+ *
+ * @throws Exception
+ */
+ @Override
+ public void stop() throws Exception
+ {
+ super.stop();
+ //TODO
+ }
+
+ /**
+ * Returns Proxy interfaces common to all Proxies generated
+ * by this ProxyFactory
+ *
+ * @return
+ */
+ @Override
+ protected Set<Class<?>> getCommonProxyInterfaces()
+ {
+ // Initialize
+ Set<Class<?>> interfaces = super.getCommonProxyInterfaces();
+
+ // Add
+ interfaces.add(ServiceProxy.class);
+
+ // Return
+ return interfaces;
+ }
+
+ // --------------------------------------------------------------------------------||
+ // Functional Methods -------------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ // --------------------------------------------------------------------------------||
+ // Contracts ----------------------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ /**
+ * Returns the a Set of String representations of the Business Interface Types
+ *
+ * @return
+ */
+ protected abstract Set<String> getBusinessInterfaceTypes();
+
+ /**
+ * Returns the ServiceProxyInvocationHandler to be used in
+ * Proxy Creation
+ *
+ * @return
+ */
+ protected abstract SessionProxyInvocationHandler createInvocationHandler();
+
+ // --------------------------------------------------------------------------------||
+ // Accessors / Mutators -----------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ public JBossServiceBeanMetaData getMetadata()
+ {
+ return metadata;
+ }
+
+ protected void setMetadata(final JBossServiceBeanMetaData metadata)
+ {
+ this.metadata = metadata;
+ }
+
+ protected Constructor<?> getProxyConstructor()
+ {
+ return proxyConstructor;
+ }
+
+ protected void setProxyConstructor(Constructor<?> proxyConstructor)
+ {
+ this.proxyConstructor = proxyConstructor;
+ }
+}
Added: projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/factory/session/service/ServiceRemoteProxyFactory.java
===================================================================
--- projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/factory/session/service/ServiceRemoteProxyFactory.java (rev 0)
+++ projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/factory/session/service/ServiceRemoteProxyFactory.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -0,0 +1,174 @@
+/*
+ * 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.proxy.impl.factory.session.service;
+
+import java.util.Set;
+
+import org.jboss.aop.Advisor;
+import org.jboss.aop.advice.Interceptor;
+import org.jboss.ejb3.proxy.impl.handler.session.SessionRemoteProxyInvocationHandler;
+import org.jboss.logging.Logger;
+import org.jboss.metadata.ejb.jboss.JBossServiceBeanMetaData;
+
+/**
+ * ServiceRemoteProxyFactory
+ *
+ * A @Service Proxy Factory for Remote Views
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+public class ServiceRemoteProxyFactory extends ServiceProxyFactoryBase implements ServiceProxyFactory
+{
+ // --------------------------------------------------------------------------------||
+ // Class Members ------------------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ private static final Logger logger = Logger.getLogger(ServiceRemoteProxyFactory.class);
+
+ private static final String DEFAULT_STACK_NAME_STATELESS_SESSION_CLIENT_INTERCEPTORS = "ServiceClientInterceptors";
+
+ // --------------------------------------------------------------------------------||
+ // Instance Members ---------------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ /**
+ * URL to be used in Remoting
+ */
+ private String url;
+
+ /**
+ * Name of the interceptor stack to use (overrides the default)
+ */
+ private String interceptorStackName;
+
+ // --------------------------------------------------------------------------------||
+ // Constructor --------------------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ /**
+ * Constructor
+ *
+ * @param name The unique name for this ProxyFactory
+ * @param containerName The name of the InvokableContext (container)
+ * upon which Proxies will invoke
+ * @param containerGuid The globally-unique name of the container
+ * @param metadata The metadata representing this SLSB
+ * @param classloader The ClassLoader associated with the StatelessContainer
+ * for which this ProxyFactory is to generate Proxies
+ * @param url The URL to use for remoting
+ * @param advisor The Advisor for proxies created by this factory
+ * @param interceptorStackName The name of the client-side interceptor stack to use.
+ * If null the default will apply.
+ */
+ public ServiceRemoteProxyFactory(final String name, final String containerName, final String containerGuid,
+ final JBossServiceBeanMetaData metadata, final ClassLoader classloader, final String url,
+ final Advisor advisor, final String interceptorStackName)
+ {
+ // Call Super
+ super(name, containerName, containerGuid, metadata, classloader, advisor);
+
+ // Set properties
+ this.setUrl(url);
+ this.setInterceptorStackName(interceptorStackName);
+ }
+
+ // --------------------------------------------------------------------------------||
+ // Functional Methods -------------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ /**
+ * Returns the a Set of String representations of the Business Interface Types
+ *
+ * @return
+ */
+ @Override
+ protected final Set<String> getBusinessInterfaceTypes()
+ {
+ return this.getMetadata().getBusinessRemotes();
+ }
+
+ /**
+ * Return the name of the interceptor stack to apply to
+ * proxies created by this proxy factory
+ *
+ * @return
+ */
+ @Override
+ protected String getInterceptorStackName()
+ {
+ // Initialize to default
+ String stackName = ServiceRemoteProxyFactory.DEFAULT_STACK_NAME_STATELESS_SESSION_CLIENT_INTERCEPTORS;
+
+ // Override if specified
+ String overrideName = this.interceptorStackName;
+ if (overrideName != null && overrideName.trim().length() > 0)
+ {
+ stackName = overrideName;
+ }
+
+ // Return
+ return stackName;
+ }
+
+ // --------------------------------------------------------------------------------||
+ // Required Implementations -------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ @Override
+ protected SessionRemoteProxyInvocationHandler createInvocationHandler()
+ {
+ // Obtain properties
+ String containerName = this.getContainerName();
+ String containerGuid = this.getContainerGuid();
+ String url = this.getUrl();
+
+ // Get Interceptors
+ Interceptor[] interceptors = this.getInterceptors();
+
+ // Create
+ SessionRemoteProxyInvocationHandler handler = new SessionRemoteProxyInvocationHandler(containerName,
+ containerGuid, interceptors, null, url);
+
+ // Return
+ return handler;
+ }
+
+ // --------------------------------------------------------------------------------||
+ // Accessors / Mutators -----------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ public String getUrl()
+ {
+ return url;
+ }
+
+ public void setUrl(final String url)
+ {
+ this.url = url;
+ }
+
+ protected void setInterceptorStackName(String interceptorStackName)
+ {
+ this.interceptorStackName = interceptorStackName;
+ }
+}
Added: projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/factory/session/stateful/StatefulSessionLocalProxyFactory.java
===================================================================
--- projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/factory/session/stateful/StatefulSessionLocalProxyFactory.java (rev 0)
+++ projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/factory/session/stateful/StatefulSessionLocalProxyFactory.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -0,0 +1,147 @@
+/*
+ * 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.proxy.impl.factory.session.stateful;
+
+import java.util.Set;
+
+import org.jboss.aop.Advisor;
+import org.jboss.aop.advice.Interceptor;
+import org.jboss.ejb3.proxy.impl.factory.session.SessionSpecProxyFactory;
+import org.jboss.ejb3.proxy.impl.handler.session.SessionLocalProxyInvocationHandler;
+import org.jboss.ejb3.proxy.impl.handler.session.SessionProxyInvocationHandler;
+import org.jboss.metadata.ejb.jboss.JBossSessionBeanMetaData;
+
+/**
+ * StatefulSessionLocalProxyFactory
+ *
+ * A SFSB Proxy Factory for Local Views
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+public class StatefulSessionLocalProxyFactory extends StatefulSessionProxyFactoryBase
+ implements
+ SessionSpecProxyFactory
+{
+ // --------------------------------------------------------------------------------||
+ // Class Members ------------------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ // --------------------------------------------------------------------------------||
+ // Constructor --------------------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ /**
+ * Constructor
+ *
+ * @param name The unique name for this ProxyFactory
+ * @param containerName The name of the InvokableContext (container)
+ * upon which Proxies will invoke
+ * @param containerGuid The globally-unique name of the container
+ * @param metadata The metadata representing this SLSB
+ * @param classloader The ClassLoader associated with the StatelessContainer
+ * for which this ProxyFactory is to generate Proxies
+ * @param advisor The Advisor for proxies created by this factory
+ */
+ public StatefulSessionLocalProxyFactory(final String name, final String containerName, final String containerGuid,
+ final JBossSessionBeanMetaData metadata, final ClassLoader classloader, final Advisor advisor)
+ {
+ // Call Super
+ super(name, containerName, containerGuid, metadata, classloader, advisor);
+ }
+
+ // --------------------------------------------------------------------------------||
+ // Functional Methods -------------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ /**
+ * Returns the a Set of String representations of the Business Interface Types
+ *
+ * @return
+ */
+ @Override
+ protected final Set<String> getBusinessInterfaceTypes()
+ {
+ return this.getMetadata().getBusinessLocals();
+ }
+
+ /**
+ * Returns the String representation of the Home Interface Type
+ * @return
+ */
+ @Override
+ protected final String getHomeType()
+ {
+ return this.getMetadata().getLocalHome();
+ }
+
+ /**
+ * Returns the String representation of the EJB.2x Interface Type
+ *
+ * @return
+ */
+ @Override
+ protected final String getEjb2xInterfaceType()
+ {
+ return this.getMetadata().getLocal();
+ }
+
+ // --------------------------------------------------------------------------------||
+ // Required Implementations -------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ @Override
+ protected SessionProxyInvocationHandler createBusinessInterfaceSpecificInvocationHandler(String businessInterfaceName)
+ {
+ // Obtain target container name
+ String containerName = this.getContainerName();
+ String containerGuid = this.getContainerGuid();
+
+ // Obtain interceptors
+ Interceptor[] interceptors = this.getInterceptors();
+
+ // Create
+ SessionProxyInvocationHandler handler = new SessionLocalProxyInvocationHandler(containerName, containerGuid,
+ interceptors, businessInterfaceName);
+
+ // Return
+ return handler;
+ }
+
+ @Override
+ protected SessionProxyInvocationHandler createBusinessDefaultInvocationHandler()
+ {
+ return this.createBusinessInterfaceSpecificInvocationHandler(null);
+ }
+
+ @Override
+ protected SessionProxyInvocationHandler createEjb2xComponentInterfaceInvocationHandler()
+ {
+ return this.createBusinessDefaultInvocationHandler();
+ }
+
+ @Override
+ protected SessionProxyInvocationHandler createHomeInvocationHandler()
+ {
+ return this.createBusinessDefaultInvocationHandler();
+ }
+}
Added: projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/factory/session/stateful/StatefulSessionProxyFactory.java
===================================================================
--- projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/factory/session/stateful/StatefulSessionProxyFactory.java (rev 0)
+++ projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/factory/session/stateful/StatefulSessionProxyFactory.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -0,0 +1,81 @@
+/*
+ * 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.proxy.impl.factory.session.stateful;
+
+import java.io.Serializable;
+
+import org.jboss.ejb3.proxy.impl.factory.session.SessionSpecProxyFactory;
+
+/**
+ * StatefulSessionProxyFactory
+ *
+ * Extension for SFSB Proxy Factories in which case methods defined
+ * by SessionProxyFactory result in creation of a new Session, while
+ * the overloaded methods provided here may create a Proxy for a specified
+ * Session ID
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+public interface StatefulSessionProxyFactory extends SessionSpecProxyFactory
+{
+ /**
+ * Create an EJB2.x Home Proxy
+ *
+ * @return
+ */
+ Object createProxyHome();
+
+ /**
+ * Create an EJB3 Business proxy with no
+ * specific target business interface. The
+ * returned proxy will implement all appropriate
+ * business interfaces. Additionally, if
+ * the Home interface is bound alongside
+ * the Default (same JNDI Name), this
+ * Proxy will implement the Home interface as well.
+ *
+ * @param sessionId
+ * @return
+ */
+ Object createProxyDefault(Serializable sessionId);
+
+ /**
+ * Create an EJB3 Business Proxy specific to the specified
+ * target business interface name (expressed as
+ * a fully-qualified class name)
+ *
+ * @param sessionId
+ * @param businessInterfaceName
+ * @return
+ */
+ Object createProxyBusiness(Serializable sessionId, String businessInterfaceName);
+
+ /**
+ * Create an EJB2.x Proxy
+ *
+ * @param sessionId
+ * @return
+ */
+ Object createProxyEjb2x(Serializable sessionId);
+
+}
Added: projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/factory/session/stateful/StatefulSessionProxyFactoryBase.java
===================================================================
--- projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/factory/session/stateful/StatefulSessionProxyFactoryBase.java (rev 0)
+++ projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/factory/session/stateful/StatefulSessionProxyFactoryBase.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -0,0 +1,368 @@
+/*
+ * 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.proxy.impl.factory.session.stateful;
+
+import java.io.Serializable;
+import java.lang.reflect.InvocationHandler;
+import java.lang.reflect.Proxy;
+import java.util.Set;
+
+import org.jboss.aop.Advisor;
+import org.jboss.ejb3.common.registrar.spi.Ejb3Registrar;
+import org.jboss.ejb3.common.registrar.spi.Ejb3RegistrarLocator;
+import org.jboss.ejb3.common.registrar.spi.NotBoundException;
+import org.jboss.ejb3.proxy.impl.factory.session.SessionProxyFactoryBase;
+import org.jboss.ejb3.proxy.impl.handler.session.SessionProxyInvocationHandler;
+import org.jboss.ejb3.proxy.spi.container.StatefulSessionFactory;
+import org.jboss.ejb3.proxy.spi.intf.StatefulSessionProxy;
+import org.jboss.logging.Logger;
+import org.jboss.metadata.ejb.jboss.JBossSessionBeanMetaData;
+
+/**
+ * StatefulSessionProxyFactoryBase
+ *
+ * Base upon which SFSB Proxy Factories may build
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+public abstract class StatefulSessionProxyFactoryBase extends SessionProxyFactoryBase
+ implements
+ StatefulSessionProxyFactory
+{
+ // --------------------------------------------------------------------------------||
+ // Class Members ------------------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ private static final Logger log = Logger.getLogger(StatefulSessionProxyFactoryBase.class);
+
+ // --------------------------------------------------------------------------------||
+ // Instance Members ---------------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ /**
+ * The Container used by this SFSB Proxy Factory
+ */
+ private transient StatefulSessionFactory container;
+
+ // --------------------------------------------------------------------------------||
+ // Constructor --------------------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ /**
+ * Constructor
+ *
+ * @param name The unique name for this ProxyFactory
+ * @param containerName The name of the InvokableContext (container)
+ * upon which Proxies will invoke
+ * @param containerGuid The globally-unique name of the container
+ * @param metadata The metadata representing this SFSB
+ * @param classloader The ClassLoader associated with the StatelessContainer
+ * for which this ProxyFactory is to generate Proxies
+ * @param advisor The Advisor for proxies created by this factory
+ */
+ public StatefulSessionProxyFactoryBase(final String name, final String containerName, final String containerGuid,
+ final JBossSessionBeanMetaData metadata, final ClassLoader classloader, final Advisor advisor)
+ {
+ // Call Super
+ super(name, containerName, containerGuid, metadata, classloader, advisor);
+ }
+
+ // --------------------------------------------------------------------------------||
+ // Functional Methods -------------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ /**
+ * Obtains the return types declared by the "create" methods for the specified home interface.
+ *
+ * @param homeInterface
+ * @return
+ * @deprecated http://jira.jboss.com/jira/browse/JBMETA-41
+ */
+ @Deprecated
+ @Override
+ protected Set<Class<?>> getReturnTypesFromCreateMethods(Class<?> homeInterface)
+ {
+ return this.getReturnTypesFromCreateMethods(homeInterface, false);
+ }
+
+ /**
+ * Returns Proxy interfaces common to all Proxies generated
+ * by this ProxyFactory
+ *
+ * @return
+ */
+ @Override
+ protected Set<Class<?>> getCommonProxyInterfaces()
+ {
+ // Initialize
+ Set<Class<?>> interfaces = super.getCommonProxyInterfaces();
+
+ // Add
+ interfaces.add(StatefulSessionProxy.class);
+
+ // Return
+ return interfaces;
+ }
+
+ // --------------------------------------------------------------------------------||
+ // Overridden Implementations -----------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ /**
+ * Create an EJB3 Business proxy with no
+ * specific target business interface. The
+ * returned proxy will implement all appropriate
+ * business interfaces. Additionally, if
+ * the Home interface is bound alongside
+ * the Default (same JNDI Name), this
+ * Proxy will implement the Home interface as well.
+ *
+ * @return
+ */
+ @Override
+ public Object createProxyDefault()
+ {
+ Serializable sessionId = this.getNewSessionId();
+ return this.createProxyDefault(sessionId);
+ }
+
+ /**
+ * Create an EJB3 Business Proxy specific to the specified
+ * target business interface name (expressed as
+ * a fully-qualified class name)
+ *
+ * @param businessInterfaceName
+ * @return
+ */
+ @Override
+ public Object createProxyBusiness(final String businessInterfaceName)
+ {
+ Serializable sessionId = this.getNewSessionId();
+ return this.createProxyBusiness(sessionId, businessInterfaceName);
+ }
+
+ /**
+ * Create an EJB2.x Proxy
+ *
+ * @return
+ */
+ @Override
+ public Object createProxyEjb2x()
+ {
+ Serializable sessionId = this.getNewSessionId();
+ return this.createProxyEjb2x(sessionId);
+ }
+
+ // --------------------------------------------------------------------------------||
+ // Required Implementations -------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ /**
+ * Create an EJB2.x Home Proxy
+ *
+ * @param sessionId
+ * @return
+ */
+ public Object createProxyHome()
+ {
+ // Obtain Proxy using Super Implementation
+ Object proxy = super.createProxyHome();
+
+ // Return
+ return proxy;
+ }
+
+ /**
+ * Create an EJB3 Business proxy with no
+ * specific target business interface. The
+ * returned proxy will implement all appropriate
+ * business interfaces. Additionally, if
+ * the Home interface is bound alongside
+ * the Default (same JNDI Name), this
+ * Proxy will implement the Home interface as well.
+ *
+ * @param sessionId
+ * @return
+ */
+ public Object createProxyDefault(Serializable sessionId)
+ {
+ // Obtain Proxy using Super Implementation
+ Object proxy = super.createProxyDefault();
+
+ // Associate with session
+ this.associateProxyWithSession(proxy, sessionId);
+
+ // Return
+ return proxy;
+ }
+
+ /**
+ * Create an EJB3 Business Proxy specific to the specified
+ * target business interface name (expressed as
+ * a fully-qualified class name)
+ *
+ * @param sessionId
+ * @param businessInterfaceName
+ * @return
+ */
+ public Object createProxyBusiness(Serializable sessionId, String businessInterfaceName)
+ {
+ // Obtain Proxy using Super Implementation
+ Object proxy = super.createProxyBusiness(businessInterfaceName);
+
+ // Associate with session
+ this.associateProxyWithSession(proxy, sessionId);
+
+ // Return
+ return proxy;
+ }
+
+ /**
+ * Create an EJB2.x Proxy
+ *
+ * @param sessionId
+ * @return
+ */
+ public Object createProxyEjb2x(Serializable sessionId)
+ {
+ // Obtain Proxy using Super Implementation
+ Object proxy = super.createProxyEjb2x();
+
+ // Associate with session
+ this.associateProxyWithSession(proxy, sessionId);
+
+ // Return
+ return proxy;
+ }
+
+ // --------------------------------------------------------------------------------||
+ // Internal Helper Methods --------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ /**
+ * Associates the specified Proxy with the session denoted by
+ * the specified sessionId
+ *
+ * @param proxy
+ * @param sessionId
+ */
+ protected void associateProxyWithSession(Object proxy, Serializable sessionId)
+ {
+ // Obtain the InvocationHandler
+ InvocationHandler handler = Proxy.getInvocationHandler(proxy);
+ assert handler instanceof SessionProxyInvocationHandler : "SFSB Proxy must be of type "
+ + SessionProxyInvocationHandler.class.getName();
+ SessionProxyInvocationHandler sHandler = (SessionProxyInvocationHandler) handler;
+
+ // Set the Session ID on the Proxy
+ sHandler.setTarget(sessionId);
+ }
+
+ /**
+ * Creates a new Session on the container and returns the ID
+ * representing this newly-created session
+ *
+ * @return The ID of the new session
+ */
+ protected Serializable getNewSessionId()
+ {
+ // Obtain the Container
+ StatefulSessionFactory container = this.getContainer();
+
+ // Get a new Session ID from the Container
+ Serializable sessionId = null;
+ try
+ {
+ sessionId = container.createSession();
+ }
+ catch (NotBoundException e)
+ {
+ throw new RuntimeException("Could not obtain a new Session ID from SFSB Container \"" + container + "\"", e);
+ }
+ catch (RuntimeException re)
+ {
+ log.error("Could not obtain new Session ID from SFSB Container", re);
+ throw re;
+ }
+
+ // Return the new ID
+ return sessionId;
+ }
+
+ // --------------------------------------------------------------------------------||
+ // Contracts ----------------------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ /**
+ * Obtains the Container used by this Proxy Factory
+ *
+ * @return The Container for this Proxy Factory
+ */
+ protected StatefulSessionFactory obtainContainer()
+ {
+ /*
+ * Obtain the Container
+ */
+ StatefulSessionFactory container = null;
+ String containerName = this.getContainerName();
+
+ // Lookup from EJB3 Registrar
+ try
+ {
+ Object obj = Ejb3RegistrarLocator.locateRegistrar().lookup(containerName);
+ assert obj instanceof StatefulSessionFactory : "Container retrieved from "
+ + Ejb3Registrar.class.getSimpleName() + " was not of expected type "
+ + StatefulSessionFactory.class.getName() + " but was instead " + obj;
+ container = (StatefulSessionFactory) obj;
+ }
+ catch (NotBoundException nbe)
+ {
+ throw new RuntimeException(StatefulSessionProxyFactory.class.getSimpleName() + " " + this
+ + " has defined container name \"" + containerName + "\", but this could not be found in the "
+ + Ejb3Registrar.class.getSimpleName());
+ }
+
+ // Return
+ return container;
+ }
+
+ // --------------------------------------------------------------------------------||
+ // Accessors / Mutators -----------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ public StatefulSessionFactory getContainer()
+ {
+ if (this.container == null)
+ {
+ this.setContainer(this.obtainContainer());
+ }
+
+ return this.container;
+ }
+
+ public void setContainer(StatefulSessionFactory container)
+ {
+ this.container = container;
+ }
+
+}
Added: projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/factory/session/stateful/StatefulSessionRemoteProxyFactory.java
===================================================================
--- projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/factory/session/stateful/StatefulSessionRemoteProxyFactory.java (rev 0)
+++ projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/factory/session/stateful/StatefulSessionRemoteProxyFactory.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -0,0 +1,215 @@
+/*
+ * 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.proxy.impl.factory.session.stateful;
+
+import java.util.Set;
+
+import org.jboss.aop.Advisor;
+import org.jboss.aop.advice.Interceptor;
+import org.jboss.ejb3.proxy.impl.factory.session.SessionSpecProxyFactory;
+import org.jboss.ejb3.proxy.impl.handler.session.SessionProxyInvocationHandler;
+import org.jboss.ejb3.proxy.impl.handler.session.SessionRemoteProxyInvocationHandler;
+import org.jboss.logging.Logger;
+import org.jboss.metadata.ejb.jboss.JBossSessionBeanMetaData;
+
+/**
+ * StatefulSessionRemoteProxyFactory
+ *
+ * A SFSB Proxy Factory for Remote Views
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+public class StatefulSessionRemoteProxyFactory extends StatefulSessionProxyFactoryBase
+ implements
+ SessionSpecProxyFactory
+{
+ // --------------------------------------------------------------------------------||
+ // Class Members ------------------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ private static final Logger log = Logger.getLogger(StatefulSessionRemoteProxyFactory.class);
+
+ private static final String DEFAULT_STACK_NAME_STATEFUL_SESSION_CLIENT_INTERCEPTORS = "StatefulSessionClientInterceptors";
+
+ // --------------------------------------------------------------------------------||
+ // Instance Members ---------------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ /**
+ * URL to be used in Remoting
+ */
+ private String url;
+
+ /**
+ * Name of the interceptor stack to use (overrides the default)
+ */
+ private String interceptorStackName;
+
+ // --------------------------------------------------------------------------------||
+ // Constructor --------------------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ /**
+ * Constructor
+ *
+ * @param name The unique name for this ProxyFactory
+ * @param containerName The name of the InvokableContext (container)
+ * upon which Proxies will invoke
+ * @param containerGuid The globally-unique name of the container
+ * @param metadata The metadata representing this SFSB
+ * @param classloader The ClassLoader associated with the StatelessContainer
+ * for which this ProxyFactory is to generate Proxies
+ * @param url The URL to use for remoting
+ * @param advisor The Advisor for proxies created by this factory
+ * @param interceptorStackName The name of the client-side interceptor stack to use.
+ * If null the default will apply.
+ */
+ public StatefulSessionRemoteProxyFactory(final String name, final String containerName, final String containerGuid,
+ final JBossSessionBeanMetaData metadata, final ClassLoader classloader, final String url,
+ final Advisor advisor, final String interceptorStackName)
+ {
+ // Call Super
+ super(name, containerName, containerGuid, metadata, classloader, advisor);
+ this.setUrl(url);
+ this.setInterceptorStackName(interceptorStackName);
+ }
+
+ // --------------------------------------------------------------------------------||
+ // Functional Methods -------------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ /**
+ * Returns the a Set of String representations of the Business Interface Types
+ *
+ * @return
+ */
+ @Override
+ protected final Set<String> getBusinessInterfaceTypes()
+ {
+ return this.getMetadata().getBusinessRemotes();
+ }
+
+ /**
+ * Returns the String representation of the Home Interface Type
+ * @return
+ */
+ @Override
+ protected final String getHomeType()
+ {
+ return this.getMetadata().getHome();
+ }
+
+ /**
+ * Returns the String representation of the EJB2.x Interface Type
+ *
+ * @return
+ */
+ @Override
+ protected final String getEjb2xInterfaceType()
+ {
+ return this.getMetadata().getRemote();
+ }
+
+ /**
+ * Return the name of the interceptor stack to apply to
+ * proxies created by this proxy factory
+ *
+ * @return
+ */
+ @Override
+ protected String getInterceptorStackName()
+ {
+ // Initialize to default
+ String stackName = StatefulSessionRemoteProxyFactory.DEFAULT_STACK_NAME_STATEFUL_SESSION_CLIENT_INTERCEPTORS;
+
+ // Override if specified
+ String overrideName = this.interceptorStackName;
+ if (overrideName != null && overrideName.trim().length() > 0)
+ {
+ stackName = overrideName;
+ }
+
+ // Return
+ return stackName;
+ }
+
+ // --------------------------------------------------------------------------------||
+ // Required Implementations -------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ @Override
+ protected SessionProxyInvocationHandler createBusinessInterfaceSpecificInvocationHandler(String businessInterfaceName)
+ {
+ // Obtain target properties
+ String containerName = this.getContainerName();
+ String url = this.getUrl();
+ String containerGuid = this.getContainerGuid();
+
+ // Get Interceptors
+ Interceptor[] interceptors = this.getInterceptors();
+
+ // Create
+ SessionProxyInvocationHandler handler = new SessionRemoteProxyInvocationHandler(containerName, containerGuid,
+ interceptors, businessInterfaceName, url);
+
+ // Return
+ return handler;
+ }
+
+ @Override
+ protected SessionProxyInvocationHandler createBusinessDefaultInvocationHandler()
+ {
+ return this.createBusinessInterfaceSpecificInvocationHandler(null);
+ }
+
+ @Override
+ protected SessionProxyInvocationHandler createEjb2xComponentInterfaceInvocationHandler()
+ {
+ return this.createBusinessDefaultInvocationHandler();
+ }
+
+ @Override
+ protected SessionProxyInvocationHandler createHomeInvocationHandler()
+ {
+ return this.createBusinessDefaultInvocationHandler();
+ }
+
+ // --------------------------------------------------------------------------------||
+ // Accessors / Mutators -----------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ public String getUrl()
+ {
+ return url;
+ }
+
+ public void setUrl(String url)
+ {
+ this.url = url;
+ }
+
+ protected void setInterceptorStackName(String interceptorStackName)
+ {
+ this.interceptorStackName = interceptorStackName;
+ }
+}
Added: projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/factory/session/stateless/StatelessSessionLocalProxyFactory.java
===================================================================
--- projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/factory/session/stateless/StatelessSessionLocalProxyFactory.java (rev 0)
+++ projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/factory/session/stateless/StatelessSessionLocalProxyFactory.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -0,0 +1,150 @@
+/*
+ * 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.proxy.impl.factory.session.stateless;
+
+import java.util.Set;
+
+import org.jboss.aop.Advisor;
+import org.jboss.aop.advice.Interceptor;
+import org.jboss.ejb3.proxy.impl.factory.session.SessionSpecProxyFactory;
+import org.jboss.ejb3.proxy.impl.handler.session.SessionLocalProxyInvocationHandler;
+import org.jboss.ejb3.proxy.impl.handler.session.SessionProxyInvocationHandler;
+import org.jboss.logging.Logger;
+import org.jboss.metadata.ejb.jboss.JBossSessionBeanMetaData;
+
+/**
+ * StatelessSessionLocalProxyFactory
+ *
+ * A SLSB Proxy Factory for Local Views
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+public class StatelessSessionLocalProxyFactory extends StatelessSessionProxyFactoryBase
+ implements
+ SessionSpecProxyFactory
+{
+ // --------------------------------------------------------------------------------||
+ // Class Members ------------------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ private static final Logger logger = Logger.getLogger(StatelessSessionLocalProxyFactory.class);
+
+ // --------------------------------------------------------------------------------||
+ // Constructor --------------------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ /**
+ * Constructor
+ *
+ * @param name The unique name for this ProxyFactory
+ * @param containerName The name of the InvokableContext (container)
+ * upon which Proxies will invoke
+ * @param containerGuid The globally-unique name of the container
+ * @param metadata The metadata representing this SLSB
+ * @param classloader The ClassLoader associated with the StatelessContainer
+ * for which this ProxyFactory is to generate Proxies
+ * @param advisor The Advisor for proxies created by this factory
+ */
+ public StatelessSessionLocalProxyFactory(final String name, final String containerName, final String containerGuid,
+ final JBossSessionBeanMetaData metadata, final ClassLoader classloader, final Advisor advisor)
+ {
+ // Call Super
+ super(name, containerName, containerGuid, metadata, classloader, advisor);
+ }
+
+ // --------------------------------------------------------------------------------||
+ // Functional Methods -------------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ /**
+ * Returns the a Set of String representations of the Business Interface Types
+ *
+ * @return
+ */
+ @Override
+ protected final Set<String> getBusinessInterfaceTypes()
+ {
+ return this.getMetadata().getBusinessLocals();
+ }
+
+ /**
+ * Returns the String representation of the Home Interface Type
+ * @return
+ */
+ @Override
+ protected final String getHomeType()
+ {
+ return this.getMetadata().getLocalHome();
+ }
+
+ /**
+ * Returns the String representation of the EJB.2x Interface Type
+ *
+ * @return
+ */
+ @Override
+ protected final String getEjb2xInterfaceType()
+ {
+ return this.getMetadata().getLocal();
+ }
+
+ // --------------------------------------------------------------------------------||
+ // Required Implementations -------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ @Override
+ protected SessionProxyInvocationHandler createBusinessInterfaceSpecificInvocationHandler(String businessInterfaceName)
+ {
+ // Obtain container name
+ String containerName = this.getContainerName();
+ String containerGuid = this.getContainerGuid();
+
+ // Get Interceptors
+ Interceptor[] interceptors = this.getInterceptors();
+
+ // Create
+ SessionProxyInvocationHandler handler = new SessionLocalProxyInvocationHandler(containerName, containerGuid,
+ interceptors, businessInterfaceName);
+
+ // Return
+ return handler;
+ }
+
+ @Override
+ protected SessionProxyInvocationHandler createBusinessDefaultInvocationHandler()
+ {
+ return this.createBusinessInterfaceSpecificInvocationHandler(null);
+ }
+
+ @Override
+ protected SessionProxyInvocationHandler createEjb2xComponentInterfaceInvocationHandler()
+ {
+ return this.createBusinessDefaultInvocationHandler();
+ }
+
+ @Override
+ protected SessionProxyInvocationHandler createHomeInvocationHandler()
+ {
+ return this.createBusinessDefaultInvocationHandler();
+ }
+}
Added: projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/factory/session/stateless/StatelessSessionProxyFactoryBase.java
===================================================================
--- projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/factory/session/stateless/StatelessSessionProxyFactoryBase.java (rev 0)
+++ projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/factory/session/stateless/StatelessSessionProxyFactoryBase.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -0,0 +1,88 @@
+/*
+ * 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.proxy.impl.factory.session.stateless;
+
+import java.util.Set;
+
+import org.jboss.aop.Advisor;
+import org.jboss.ejb3.proxy.impl.factory.session.SessionProxyFactory;
+import org.jboss.ejb3.proxy.impl.factory.session.SessionProxyFactoryBase;
+import org.jboss.logging.Logger;
+import org.jboss.metadata.ejb.jboss.JBossSessionBeanMetaData;
+
+/**
+ * StatelessSessionProxyFactoryBase
+ *
+ * Base upon which SLSB Proxy Factories may build
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+public abstract class StatelessSessionProxyFactoryBase extends SessionProxyFactoryBase implements SessionProxyFactory
+{
+ // --------------------------------------------------------------------------------||
+ // Class Members ------------------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ private static final Logger log = Logger.getLogger(StatelessSessionProxyFactoryBase.class);
+
+ // --------------------------------------------------------------------------------||
+ // Constructor --------------------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ /**
+ * Constructor
+ *
+ * @param name The unique name for this ProxyFactory
+ * @param containerName The name of the InvokableContext (container)
+ * upon which Proxies will invoke
+ * @param containerGuid The globally-unique name of the container
+ * @param metadata The metadata representing this SLSB
+ * @param classloader The ClassLoader associated with the StatelessContainer
+ * for which this ProxyFactory is to generate Proxies
+ * @param advisor The Advisor for proxies created by this factory
+ */
+ public StatelessSessionProxyFactoryBase(final String name, final String containerName, final String containerGuid,
+ final JBossSessionBeanMetaData metadata, final ClassLoader classloader, final Advisor advisor)
+ {
+ // Call Super
+ super(name, containerName, containerGuid, metadata, classloader, advisor);
+ }
+
+ // --------------------------------------------------------------------------------||
+ // Functional Methods -------------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ /**
+ * Obtains the return types declared by the "create" methods for the specified home interface.
+ *
+ * @param homeInterface
+ * @return
+ * @deprecated http://jira.jboss.com/jira/browse/JBMETA-41
+ */
+ @Deprecated
+ @Override
+ protected Set<Class<?>> getReturnTypesFromCreateMethods(Class<?> homeInterface)
+ {
+ return this.getReturnTypesFromCreateMethods(homeInterface, true);
+ }
+}
Added: projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/factory/session/stateless/StatelessSessionRemoteProxyFactory.java
===================================================================
--- projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/factory/session/stateless/StatelessSessionRemoteProxyFactory.java (rev 0)
+++ projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/factory/session/stateless/StatelessSessionRemoteProxyFactory.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -0,0 +1,217 @@
+/*
+ * 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.proxy.impl.factory.session.stateless;
+
+import java.util.Set;
+
+import org.jboss.aop.Advisor;
+import org.jboss.aop.advice.Interceptor;
+import org.jboss.ejb3.proxy.impl.factory.session.SessionSpecProxyFactory;
+import org.jboss.ejb3.proxy.impl.handler.session.SessionProxyInvocationHandler;
+import org.jboss.ejb3.proxy.impl.handler.session.SessionRemoteProxyInvocationHandler;
+import org.jboss.logging.Logger;
+import org.jboss.metadata.ejb.jboss.JBossSessionBeanMetaData;
+
+/**
+ * StatelessSessionRemoteProxyFactory
+ *
+ * A SLSB Proxy Factory for Remote Views
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+public class StatelessSessionRemoteProxyFactory extends StatelessSessionProxyFactoryBase
+ implements
+ SessionSpecProxyFactory
+{
+ // --------------------------------------------------------------------------------||
+ // Class Members ------------------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ private static final Logger logger = Logger.getLogger(StatelessSessionRemoteProxyFactory.class);
+
+ private static final String DEFAULT_STACK_NAME_STATELESS_SESSION_CLIENT_INTERCEPTORS = "StatelessSessionClientInterceptors";
+
+ // --------------------------------------------------------------------------------||
+ // Instance Members ---------------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ /**
+ * URL to be used in Remoting
+ */
+ private String url;
+
+ /**
+ * Name of the interceptor stack to use (overrides the default)
+ */
+ private String interceptorStackName;
+
+ // --------------------------------------------------------------------------------||
+ // Constructor --------------------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ /**
+ * Constructor
+ *
+ * @param name The unique name for this ProxyFactory
+ * @param containerName The name of the InvokableContext (container)
+ * upon which Proxies will invoke
+ * @param containerGuid The globally-unique name of the container
+ * @param metadata The metadata representing this SLSB
+ * @param classloader The ClassLoader associated with the StatelessContainer
+ * for which this ProxyFactory is to generate Proxies
+ * @param url The URL to use for remoting
+ * @param advisor The Advisor for proxies created by this factory
+ * @param interceptorStackName The name of the client-side interceptor stack to use.
+ * If null the default will apply.
+ */
+ public StatelessSessionRemoteProxyFactory(final String name, final String containerName, final String containerGuid,
+ final JBossSessionBeanMetaData metadata, final ClassLoader classloader, final String url,
+ final Advisor advisor, final String interceptorStackName)
+ {
+ // Call Super
+ super(name, containerName, containerGuid, metadata, classloader, advisor);
+
+ // Set properties
+ this.setUrl(url);
+ this.setInterceptorStackName(interceptorStackName);
+ }
+
+ // --------------------------------------------------------------------------------||
+ // Functional Methods -------------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ /**
+ * Returns the a Set of String representations of the Business Interface Types
+ *
+ * @return
+ */
+ @Override
+ protected final Set<String> getBusinessInterfaceTypes()
+ {
+ return this.getMetadata().getBusinessRemotes();
+ }
+
+ /**
+ * Returns the String representation of the Home Interface Type
+ * @return
+ */
+ @Override
+ protected final String getHomeType()
+ {
+ return this.getMetadata().getHome();
+ }
+
+ /**
+ * Returns the String representation of the EJB2.x Interface Type
+ *
+ * @return
+ */
+ @Override
+ protected final String getEjb2xInterfaceType()
+ {
+ return this.getMetadata().getRemote();
+ }
+
+ /**
+ * Return the name of the interceptor stack to apply to
+ * proxies created by this proxy factory
+ *
+ * @return
+ */
+ @Override
+ protected String getInterceptorStackName()
+ {
+ // Initialize to default
+ String stackName = StatelessSessionRemoteProxyFactory.DEFAULT_STACK_NAME_STATELESS_SESSION_CLIENT_INTERCEPTORS;
+
+ // Override if specified
+ String overrideName = this.interceptorStackName;
+ if (overrideName != null && overrideName.trim().length() > 0)
+ {
+ stackName = overrideName;
+ }
+
+ // Return
+ return stackName;
+ }
+
+ // --------------------------------------------------------------------------------||
+ // Required Implementations -------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ @Override
+ protected SessionProxyInvocationHandler createBusinessInterfaceSpecificInvocationHandler(String businessInterfaceName)
+ {
+ // Obtain properties
+ String containerName = this.getContainerName();
+ String containerGuid = this.getContainerGuid();
+ String url = this.getUrl();
+
+ // Get Interceptors
+ Interceptor[] interceptors = this.getInterceptors();
+
+ // Create
+ SessionProxyInvocationHandler handler = new SessionRemoteProxyInvocationHandler(containerName, containerGuid,
+ interceptors, businessInterfaceName, url);
+
+ // Return
+ return handler;
+ }
+
+ @Override
+ protected SessionProxyInvocationHandler createBusinessDefaultInvocationHandler()
+ {
+ return this.createBusinessInterfaceSpecificInvocationHandler(null);
+ }
+
+ @Override
+ protected SessionProxyInvocationHandler createEjb2xComponentInterfaceInvocationHandler()
+ {
+ return this.createBusinessDefaultInvocationHandler();
+ }
+
+ @Override
+ protected SessionProxyInvocationHandler createHomeInvocationHandler()
+ {
+ return this.createBusinessDefaultInvocationHandler();
+ }
+
+ // --------------------------------------------------------------------------------||
+ // Accessors / Mutators -----------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ public String getUrl()
+ {
+ return url;
+ }
+
+ public void setUrl(final String url)
+ {
+ this.url = url;
+ }
+
+ protected void setInterceptorStackName(String interceptorStackName)
+ {
+ this.interceptorStackName = interceptorStackName;
+ }
+}
Added: projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/handler/session/NotEligibleForDirectInvocationException.java
===================================================================
--- projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/handler/session/NotEligibleForDirectInvocationException.java (rev 0)
+++ projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/handler/session/NotEligibleForDirectInvocationException.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -0,0 +1,77 @@
+/*
+ * 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.proxy.impl.handler.session;
+
+/**
+ * NotEligibleForDirectInvocationException
+ *
+ * Thrown when attempting to handle an invocation
+ * directly within the InvocationHandler when
+ * the invocation should instead be delegated
+ * back to the Container
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+public class NotEligibleForDirectInvocationException extends Exception
+{
+ // ------------------------------------------------------------------------------||
+ // Class Members ----------------------------------------------------------------||
+ // ------------------------------------------------------------------------------||
+
+ private static final long serialVersionUID = 1L;
+
+ // ------------------------------------------------------------------------------||
+ // Constructors -----------------------------------------------------------------||
+ // ------------------------------------------------------------------------------||
+
+ public NotEligibleForDirectInvocationException()
+ {
+
+ }
+
+ /**
+ * @param message
+ */
+ public NotEligibleForDirectInvocationException(String message)
+ {
+ super(message);
+ }
+
+ /**
+ * @param cause
+ */
+ public NotEligibleForDirectInvocationException(Throwable cause)
+ {
+ super(cause);
+ }
+
+ /**
+ * @param message
+ * @param cause
+ */
+ public NotEligibleForDirectInvocationException(String message, Throwable cause)
+ {
+ super(message, cause);
+ }
+
+}
Added: projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/handler/session/SessionLocalProxyInvocationHandler.java
===================================================================
--- projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/handler/session/SessionLocalProxyInvocationHandler.java (rev 0)
+++ projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/handler/session/SessionLocalProxyInvocationHandler.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -0,0 +1,90 @@
+/*
+ * 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.proxy.impl.handler.session;
+
+import java.io.Serializable;
+
+import org.jboss.aop.advice.Interceptor;
+import org.jboss.ejb3.proxy.spi.container.InvokableContext;
+
+/**
+ * SessionLocalProxyInvocationHandler
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+public class SessionLocalProxyInvocationHandler extends SessionProxyInvocationHandlerBase implements Serializable
+{
+
+ // --------------------------------------------------------------------------------||
+ // Class Members ------------------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ private static final long serialVersionUID = 1L;
+
+ // --------------------------------------------------------------------------------||
+ // Constructor --------------------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ /**
+ * Constructor
+ *
+ * @param containerName The name of the target container
+ * @param containerGuid The globally-unique name of the container
+ * @param interceptors The interceptors to apply to invocations upon this handler
+ */
+ public SessionLocalProxyInvocationHandler(final String containerName, final String containerGuid,
+ final Interceptor[] interceptors)
+ {
+ super(containerName, containerGuid, interceptors, null, null);
+ }
+
+ /**
+ * Constructor
+ *
+ * @param containerName The name of the target container
+ * @param containerGuid The globally-unique name of the container
+ * @param businessInterfaceType The possibly null businessInterfaceType
+ * marking this invocation hander as specific to a given
+ * EJB3 Business Interface
+ * @param interceptors The interceptors to apply to invocations upon this handler
+ */
+ public SessionLocalProxyInvocationHandler(final String containerName, final String containerGuid,
+ final Interceptor[] interceptors, final String businessInterfaceType)
+ {
+ super(containerName, containerGuid, interceptors, businessInterfaceType, null);
+ }
+
+ // --------------------------------------------------------------------------------||
+ // Required Implementations -------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ /* (non-Javadoc)
+ * @see org.jboss.ejb3.proxy.handler.session.SessionProxyInvocationHandlerBase#getContainer()
+ */
+ @Override
+ protected InvokableContext getContainer()
+ {
+ return this.getContainerLocally();
+ }
+
+}
Added: projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/handler/session/SessionProxyInvocationHandler.java
===================================================================
--- projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/handler/session/SessionProxyInvocationHandler.java (rev 0)
+++ projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/handler/session/SessionProxyInvocationHandler.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -0,0 +1,66 @@
+/*
+ * 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.proxy.impl.handler.session;
+
+import java.io.Serializable;
+import java.lang.reflect.InvocationHandler;
+
+import org.jboss.aop.advice.Interceptor;
+
+/**
+ * SessionProxyInvocationHandler
+ *
+ * Defines contract for operations required of
+ * a JBoss Session Bean Proxy Invocation Handler
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: 72638 $
+ */
+public interface SessionProxyInvocationHandler extends InvocationHandler, Serializable
+{
+
+ // ------------------------------------------------------------------------------||
+ // Contracts --------------------------------------------------------------------||
+ // ------------------------------------------------------------------------------||
+
+ Object getTarget();
+
+ void setTarget(final Object target);
+
+ String getContainerName();
+
+ void setContainerName(final String containerName);
+
+ Interceptor[] getInterceptors();
+
+ void setInterceptors(final Interceptor[] interceptors);
+
+ String getContainerGuid();
+
+ void setContainerGuid(final String containerGuid);
+
+ String getBusinessInterfaceType();
+
+ void setBusinessInterfaceType(final String businessInterfaceType);
+
+}
\ No newline at end of file
Added: projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/handler/session/SessionProxyInvocationHandlerBase.java
===================================================================
--- projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/handler/session/SessionProxyInvocationHandlerBase.java (rev 0)
+++ projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/handler/session/SessionProxyInvocationHandlerBase.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -0,0 +1,532 @@
+/*
+ * 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.proxy.impl.handler.session;
+
+import java.io.Serializable;
+import java.lang.reflect.InvocationHandler;
+import java.lang.reflect.Method;
+import java.lang.reflect.Proxy;
+import java.util.HashSet;
+import java.util.Set;
+
+import org.jboss.aop.advice.Interceptor;
+import org.jboss.ejb3.common.lang.SerializableMethod;
+import org.jboss.ejb3.common.registrar.spi.Ejb3Registrar;
+import org.jboss.ejb3.common.registrar.spi.Ejb3RegistrarLocator;
+import org.jboss.ejb3.proxy.impl.remoting.ProxyRemotingUtils;
+import org.jboss.ejb3.proxy.spi.container.InvokableContext;
+import org.jboss.ejb3.proxy.spi.intf.SessionProxy;
+import org.jboss.logging.Logger;
+
+/**
+ * SessionProxyInvocationHandlerBase
+ *
+ * Abstract base from which all JBoss Session Proxy InvocationHandlers
+ * may extend
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+public abstract class SessionProxyInvocationHandlerBase implements SessionProxyInvocationHandler, Serializable
+{
+
+ // ------------------------------------------------------------------------------||
+ // Class Members ----------------------------------------------------------------||
+ // ------------------------------------------------------------------------------||
+
+ private static final long serialVersionUID = 1L;
+
+ private static final Logger log = Logger.getLogger(SessionProxyInvocationHandlerBase.class);
+
+ /*
+ * Method Names
+ */
+ private static final String METHOD_NAME_TO_STRING = "toString";
+
+ private static final String METHOD_NAME_EQUALS = "equals";
+
+ private static final String METHOD_NAME_HASH_CODE = "hashCode";
+
+ private static final String METHOD_NAME_GET_TARGET = "getTarget";
+
+ private static final String METHOD_NAME_SET_TARGET = "setTarget";
+
+ /*
+ * Local Methods
+ */
+ private static final SerializableMethod METHOD_TO_STRING;
+
+ private static final SerializableMethod METHOD_EQUALS;
+
+ private static final SerializableMethod METHOD_HASH_CODE;
+
+ private static final SerializableMethod METHOD_GET_TARGET;
+
+ private static final SerializableMethod METHOD_SET_TARGET;
+
+ static
+ {
+ try
+ {
+ METHOD_GET_TARGET = new SerializableMethod(SessionProxy.class.getDeclaredMethod(METHOD_NAME_GET_TARGET));
+ METHOD_SET_TARGET = new SerializableMethod(SessionProxy.class.getDeclaredMethod(METHOD_NAME_SET_TARGET,
+ Object.class));
+ METHOD_TO_STRING = new SerializableMethod(Object.class.getDeclaredMethod(METHOD_NAME_TO_STRING), Object.class);
+ METHOD_EQUALS = new SerializableMethod(Object.class.getDeclaredMethod(METHOD_NAME_EQUALS, Object.class),
+ Object.class);
+ METHOD_HASH_CODE = new SerializableMethod(Object.class.getDeclaredMethod(METHOD_NAME_HASH_CODE), Object.class);
+ }
+ catch (NoSuchMethodException nsme)
+ {
+ throw new RuntimeException(
+ "Methods for handling directly by the InvocationHandler were not initialized correctly", nsme);
+ }
+
+ }
+
+ // ------------------------------------------------------------------------------||
+ // Instance Members -------------------------------------------------------------||
+ // ------------------------------------------------------------------------------||
+
+ /**
+ * The target for this Invocation (for instance, Session ID)
+ */
+ private Object target;
+
+ /**
+ * The interceptors to apply to inovcations upon this handler
+ */
+ private Interceptor[] interceptors;
+
+ /**
+ * The name under which the target container is registered
+ */
+ private String containerName;
+
+ /**
+ * The Globally-unique Container ID
+ */
+ private String containerGuid;
+
+ /**
+ * Fully-qualified name of the class targeted either for injection
+ * or casting to support getInvokedBusinessInterface. May be
+ * null to denote non-deterministic invocation
+ */
+ private String businessInterfaceType;
+
+ // ------------------------------------------------------------------------------||
+ // Constructor ------------------------------------------------------------------||
+ // ------------------------------------------------------------------------------||
+
+ /**
+ * Constructor
+ *
+ * @param containerName The name of the target Container
+ * @param containerGuid The globally-unique name of the container
+ * @param interceptors The interceptors to apply to invocations upon this handler
+ * @param businessInterfaceType Possibly null FQN of business interface
+ * @param target The target object (Session ID)
+ */
+ protected SessionProxyInvocationHandlerBase(final String containerName, final String containerGuid,
+ final Interceptor[] interceptors, final String businessInterfaceType, final Object target)
+ {
+ this.setContainerName(containerName);
+ this.setContainerGuid(containerGuid);
+ this.setInterceptors(interceptors);
+ this.setBusinessInterfaceType(businessInterfaceType);
+ this.setTarget(target);
+ }
+
+ // ------------------------------------------------------------------------------||
+ // Functional Methods -----------------------------------------------------------||
+ // ------------------------------------------------------------------------------||
+
+ /**
+ * Required "invoke" as defined by InvocationHandler interface
+ */
+ public Object invoke(Object proxy, Method method, Object[] args) throws Throwable
+ {
+ // Precondition check
+ assert proxy instanceof SessionProxy : this + " is eligible for handling " + SessionProxy.class.getName()
+ + " invocations only";
+ SessionProxy sessionProxy = (SessionProxy) proxy;
+
+ // Obtain an explicitly-specified actual class
+ String actualClass = this.getBusinessInterfaceType();
+
+ // Set the invoked method
+ SerializableMethod invokedMethod = new SerializableMethod(method, actualClass);
+
+ // Use the overloaded implementation
+ return this.invoke(sessionProxy, invokedMethod, args);
+ }
+
+ /**
+ * Overloaded "invoke" which takes into account a {@link SerializableMethod}
+ * view
+ *
+ * @param proxy
+ * @param method
+ * @param args
+ * @return
+ * @throws Throwable
+ */
+ public Object invoke(SessionProxy proxy, SerializableMethod method, Object[] args) throws Throwable
+ {
+ // Attempt to handle directly
+ try
+ {
+ return this.handleInvocationDirectly(proxy, args, method.toMethod());
+ }
+ // Ignore this, we just couldn't handle here
+ catch (NotEligibleForDirectInvocationException nefdie)
+ {
+ log.debug("Couldn't handle invocation directly within " + this + ": " + nefdie.getMessage());
+ }
+
+ /*
+ * Obtain the Container
+ */
+ InvokableContext container = this.getContainer();
+
+ /*
+ * Invoke
+ */
+
+ // Adjust args if null to empty array
+ if (args == null)
+ {
+ args = new Object[]
+ {};
+ }
+
+ // Invoke
+ Object result = container.invoke(proxy, method, args);
+
+ // Return
+ return result;
+ }
+
+ /**
+ * Handles the current invocation directly in this invocation handler. Only
+ * a subset of method invocations are eligible for this treatment, else
+ * a NotEligibleForDirectInvocationException will be thrown
+ *
+ * @param proxy
+ * @param args Arguments of the current invocation
+ * @param invokedMethod The method invoked
+ * @return
+ * @throws NotEligibleForDirectInvocationException
+ */
+ protected Object handleInvocationDirectly(SessionProxy proxy, Object[] args, Method invokedMethod)
+ throws NotEligibleForDirectInvocationException
+ {
+ // Obtain the invoked method
+ assert invokedMethod != null : "Invoked Method was not set upon invocation of " + this.getClass().getName();
+
+ // getTarget
+ if (invokedMethod.equals(METHOD_GET_TARGET.toMethod()))
+ {
+ return this.getTarget();
+ }
+
+ // setTarget
+ if (invokedMethod.equals(METHOD_SET_TARGET.toMethod()))
+ {
+ assert args.length == 1 : "Expecting exactly one argument for invocation of " + METHOD_SET_TARGET;
+ Object arg = args[0];
+ assert arg instanceof Serializable : "Argument must be instance of " + Serializable.class.getName();
+ Serializable id = (Serializable) arg;
+ this.setTarget(id);
+ return null;
+ }
+
+ // equals
+ if (invokedMethod.equals(METHOD_EQUALS.toMethod()))
+ {
+ assert args.length == 1 : "Invocation for 'equals' should have exactly one argument, instead was: "
+ + invokedMethod;
+ Object argument = args[0];
+ return this.invokeEquals(proxy, argument);
+ }
+
+ // toString
+ if (invokedMethod.equals(METHOD_TO_STRING.toMethod()))
+ {
+ // Perform assertions
+ assert Proxy.isProxyClass(proxy.getClass()) : "Specified proxy invoked is not of type "
+ + Proxy.class.getName();
+
+ // Obtain implemented interfaces
+ Class<?>[] implementedInterfaces = proxy.getClass().getInterfaces();
+ Set<Class<?>> interfacesSet = new HashSet<Class<?>>();
+ for (Class<?> interfaze : implementedInterfaces)
+ {
+ interfacesSet.add(interfaze);
+ }
+
+ // Construct a return value
+ StringBuffer sb = new StringBuffer();
+ sb.append("Proxy to ");
+ sb.append(this.getContainerName());
+ sb.append(" implementing ");
+ sb.append(interfacesSet);
+
+ // Return
+ return sb.toString();
+ }
+ // hashCode
+ if (invokedMethod.equals(METHOD_HASH_CODE.toMethod()))
+ {
+ return this.invokeHashCode(proxy);
+ }
+
+ // If no eligible methods were invoked
+ throw new NotEligibleForDirectInvocationException("Current invocation \"" + invokedMethod
+ + "\" is not eligible for direct handling by " + this);
+ }
+
+ /**
+ * Handles invocation of "equals(Object)" upon a Session Proxy
+ *
+ * EJB 3.0 Specification 3.4.5.1, 3.4.5.2
+ *
+ * @param proxy
+ * @param args
+ * @return
+ */
+ protected boolean invokeEquals(SessionProxy proxy, Object argument)
+ {
+ /*
+ * EJB 3.0 Core Specification 3.4.5.1:
+ *
+ * A stateful session object has a unique identity that is assigned by the
+ * container at the time the object is created. A client of the stateful
+ * session bean business interface can determine if two business interface
+ * references refer to the same session object by use of the equals method.
+ *
+ * All stateful session bean references to the same business interface for
+ * the same stateful session bean instance will be equal. Stateful session
+ * bean references to different interface types or to different session bean
+ * instances will not have the same identity.
+ */
+
+ /*
+ * EJB 3.0 Specification 3.4.5.2:
+ *
+ * All business object references of the same interface type for the same
+ * stateless session bean have the same object identity, which is
+ * assigned by the container.
+ *
+ * The equals method always returns true when used to compare references
+ * to the same business interface type of the same session bean.
+ *
+ * Session bean references to either different business interface types
+ * or different session beans will not be equal."
+ */
+
+ // If the argument is not a proxy
+ if (!(argument instanceof SessionProxy))
+ {
+ return false;
+ }
+
+ // Cast the argument
+ SessionProxy sArgument = (SessionProxy) argument;
+
+ // Get the InvocationHandlers
+ InvocationHandler proxyHandler = Proxy.getInvocationHandler(proxy);
+ InvocationHandler argumentHandler = Proxy.getInvocationHandler(argument);
+
+ // If argument handler is not SLSB Handler
+ if (!(argumentHandler instanceof SessionProxyInvocationHandler))
+ {
+ return false;
+ }
+
+ // Cast
+ SessionProxyInvocationHandler proxySHandler = (SessionProxyInvocationHandler) proxyHandler;
+ SessionProxyInvocationHandler argumentSHandler = (SessionProxyInvocationHandler) argumentHandler;
+
+ // Ensure target containers are equal
+ String proxyContainerName = proxySHandler.getContainerName();
+ assert proxyContainerName != null : "Container Name for " + proxySHandler + " was not set and is required";
+ if (!proxyContainerName.equals(argumentSHandler.getContainerName()))
+ {
+ return false;
+ }
+
+ // If target (Session ID) is specified, ensure equal
+ Object proxyTarget = proxy.getTarget();
+ if (proxyTarget != null)
+ {
+ Object argumentTarget = sArgument.getTarget();
+ if (!proxyTarget.equals(argumentTarget))
+ {
+ return false;
+ }
+ }
+
+ // All conditions passed, so true
+ return true;
+
+ }
+
+ /**
+ * Handles invocation of "hashCode()" upon the proxy
+ *
+ * @param proxy
+ * @return
+ */
+ protected int invokeHashCode(SessionProxy proxy)
+ {
+ // Get the InvocationHandler
+ InvocationHandler handler = Proxy.getInvocationHandler(proxy);
+ assert handler instanceof SessionProxyInvocationHandler;
+ SessionProxyInvocationHandler sHandler = (SessionProxyInvocationHandler) handler;
+
+ int hash = 0;
+
+ // Generate unique String by value according to rules in "invokeEquals";
+ // Destination Container
+ StringBuffer sb = new StringBuffer();
+ sb.append(sHandler.getContainerName());
+ sb.append(sHandler.getContainerGuid());
+ String compositionString = sb.toString();
+
+ // Make the hash
+ hash = compositionString.hashCode();
+
+ // If there's a target in play, take that into account
+ Object target = sHandler.getTarget();
+ if (target != null)
+ {
+ hash += target.hashCode();
+ }
+
+ // Return the hash
+ return hash;
+ }
+
+ /**
+ * Returns the container housed locally
+ *
+ * @return
+ */
+ protected InvokableContext getContainerLocally()
+ {
+ // Lookup
+ Object obj = Ejb3RegistrarLocator.locateRegistrar().lookup(this.getContainerName());
+
+ // Ensure of correct type
+ assert obj instanceof InvokableContext : "Container retrieved from " + Ejb3Registrar.class.getSimpleName()
+ + " was not of expected type " + InvokableContext.class.getName() + " but was instead " + obj;
+
+ // Return
+ return (InvokableContext) obj;
+ }
+
+ /**
+ * Creates and returns a Remoting Proxy to invoke upon the container
+ *
+ * This implementation is marked as FIXME as remoting should be an add-on
+ * capability atop ejb3-proxy
+ *
+ * @param url The location of the remote host holding the Container
+ * @return
+ */
+ //FIXME
+ protected InvokableContext createRemoteProxyToContainer(String url)
+ {
+ InvokableContext container = ProxyRemotingUtils.createRemoteProxyToContainer(this.getContainerName(), this
+ .getContainerGuid(), url, this.getInterceptors(), this.getTarget());
+ return container;
+ }
+
+ // ------------------------------------------------------------------------------||
+ // Contracts --------------------------------------------------------------------||
+ // ------------------------------------------------------------------------------||
+
+ /**
+ * Obtains the Container upon which this Proxy should invoke
+ *
+ * @return
+ */
+ protected abstract InvokableContext getContainer();
+
+ // ------------------------------------------------------------------------------||
+ // Accessors / Mutators ---------------------------------------------------------||
+ // ------------------------------------------------------------------------------||
+
+ public Object getTarget()
+ {
+ return target;
+ }
+
+ public void setTarget(final Object target)
+ {
+ this.target = target;
+ }
+
+ public String getContainerName()
+ {
+ return containerName;
+ }
+
+ public void setContainerName(final String containerName)
+ {
+ assert containerName != null && containerName.trim().length() > 0 : "Container Name must be specified";
+ this.containerName = containerName;
+ }
+
+ public Interceptor[] getInterceptors()
+ {
+ return interceptors;
+ }
+
+ public void setInterceptors(final Interceptor[] interceptors)
+ {
+ this.interceptors = interceptors;
+ }
+
+ public String getContainerGuid()
+ {
+ return containerGuid;
+ }
+
+ public void setContainerGuid(final String containerGuid)
+ {
+ this.containerGuid = containerGuid;
+ }
+
+ public String getBusinessInterfaceType()
+ {
+ return businessInterfaceType;
+ }
+
+ public void setBusinessInterfaceType(String businessInterfaceType)
+ {
+ this.businessInterfaceType = businessInterfaceType;
+ }
+
+}
Added: projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/handler/session/SessionRemoteProxyInvocationHandler.java
===================================================================
--- projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/handler/session/SessionRemoteProxyInvocationHandler.java (rev 0)
+++ projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/handler/session/SessionRemoteProxyInvocationHandler.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -0,0 +1,101 @@
+/*
+ * 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.proxy.impl.handler.session;
+
+import java.io.Serializable;
+
+import org.jboss.aop.advice.Interceptor;
+import org.jboss.ejb3.proxy.spi.container.InvokableContext;
+
+/**
+ * SessionRemoteProxyInvocationHandler
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+public class SessionRemoteProxyInvocationHandler extends SessionProxyInvocationHandlerBase implements Serializable
+{
+
+ // --------------------------------------------------------------------------------||
+ // Class Members ------------------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ private static final long serialVersionUID = 1L;
+
+ // --------------------------------------------------------------------------------||
+ // Instance Members ---------------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ private String url;
+
+ // --------------------------------------------------------------------------------||
+ // Constructor --------------------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ /**
+ * Constructor
+ *
+ * @param containerName The name of the target container
+ * @param containerGuid The globally-unique name of the container
+ * @param businessInterfaceType The possibly null businessInterfaceType
+ * marking this invocation hander as specific to a given
+ * EJB3 Business Interface
+ * @param url The URL to the Remote Host
+ * @param interceptors The interceptors to apply to invocations upon this handler
+ */
+ public SessionRemoteProxyInvocationHandler(final String containerName, final String containerGuid,
+ final Interceptor[] interceptors, final String businessInterfaceType, final String url)
+ {
+ super(containerName, containerGuid, interceptors, businessInterfaceType, null);
+
+ // Set properties
+ this.setUrl(url);
+ }
+
+ // --------------------------------------------------------------------------------||
+ // Required Implementations -------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ /* (non-Javadoc)
+ * @see org.jboss.ejb3.proxy.handler.session.SessionProxyInvocationHandlerBase#getContainer()
+ */
+ @Override
+ protected InvokableContext getContainer()
+ {
+ return this.createRemoteProxyToContainer(this.getUrl());
+ }
+
+ // --------------------------------------------------------------------------------||
+ // Accessors / Mutators -----------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ public String getUrl()
+ {
+ return url;
+ }
+
+ public void setUrl(String url)
+ {
+ this.url = url;
+ }
+
+}
Added: projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/invocation/InvokableContextStatefulRemoteProxyInvocationHack.java
===================================================================
--- projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/invocation/InvokableContextStatefulRemoteProxyInvocationHack.java (rev 0)
+++ projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/invocation/InvokableContextStatefulRemoteProxyInvocationHack.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -0,0 +1,239 @@
+/*
+ * 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.proxy.impl.invocation;
+
+import java.lang.reflect.Method;
+
+import org.jboss.aop.advice.Interceptor;
+import org.jboss.aop.joinpoint.MethodInvocation;
+import org.jboss.aop.util.MethodHashing;
+import org.jboss.aop.util.PayloadKey;
+import org.jboss.aspects.remoting.PojiProxy;
+import org.jboss.ejb3.common.lang.SerializableMethod;
+import org.jboss.ejb3.proxy.impl.remoting.SessionSpecRemotingMetadata;
+import org.jboss.ejb3.proxy.impl.remoting.StatefulSessionRemotingMetadata;
+import org.jboss.ejb3.proxy.spi.container.InvokableContext;
+import org.jboss.ejb3.proxy.spi.intf.SessionProxy;
+import org.jboss.logging.Logger;
+import org.jboss.remoting.InvokerLocator;
+
+/**
+ * InvokableContextStatefulRemoteProxyInvocationHack
+ *
+ * Constructs a Proxy to the Container using an underlying
+ * StatefulRemoteInvocation when invocations are made.
+ *
+ * Looking forward, should be using a more flexible
+ * invocation mechanism to handle SFSB, SLSB, etc invocations
+ * in an agnostic manner. This is put into place to avoid
+ * further refactoring within EJB3 Core
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ * @deprecated
+ */
+ at Deprecated
+public class InvokableContextStatefulRemoteProxyInvocationHack extends PojiProxy
+{
+
+ // --------------------------------------------------------------------------------||
+ // Class Members ------------------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ private static final Logger log = Logger.getLogger(InvokableContextStatefulRemoteProxyInvocationHack.class);
+
+ // --------------------------------------------------------------------------------||
+ // Instance Members ---------------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ /**
+ * The target (Session ID)
+ */
+ private Object target;
+
+ /**
+ * The Globally-Unique ID of the target Container
+ */
+ private String containerGuid;
+
+ // --------------------------------------------------------------------------------||
+ // Constructor --------------------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ public InvokableContextStatefulRemoteProxyInvocationHack(Object oid, String containerGuid, InvokerLocator uri,
+ Interceptor[] interceptors, Object target)
+ {
+ // Call Super Implementation
+ super(oid, uri, interceptors);
+
+ // Some sanity checks
+ assert oid != null : "Specified OID is null";
+ assert containerGuid != null : "Specified Container GUID is null";
+
+ // Set additional properties
+ this.setTarget(target);
+ this.setContainerGuid(containerGuid);
+ }
+
+ // --------------------------------------------------------------------------------||
+ // Overridden Implementations -----------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ /**
+ * Constructs a MethodInvocation from the specified Method and
+ * arguments
+ *
+ * This implementation uses a StatefulRemoteInvocation as the underlying
+ * Invocation made, in order to support legacy EJB3 Core Containers
+ *
+ * Additionally will compute the hash of the SerializableMethod passed
+ * to InvokableContext.invoke() for handling by the container
+ *
+ * @param method
+ * @param args
+ * @return
+ */
+ @Override
+ protected MethodInvocation constructMethodInvocation(Method method, Object[] args)
+ {
+
+ /*
+ * Ensure this method is expected
+ */
+
+ // Obtain expected method
+ Method expectedInvokeMethod = null;
+ try
+ {
+ expectedInvokeMethod = InvokableContext.class.getDeclaredMethod("invoke", new Class<?>[]
+ {SessionProxy.class, SerializableMethod.class, Object[].class});
+ }
+ catch (NoSuchMethodException e)
+ {
+ throw new RuntimeException("Could not find expected method \"invoke\" from "
+ + InvokableContext.class.getName(), e);
+ }
+
+ // Ensure expected method equal to what was passed
+ assert method.equals(expectedInvokeMethod) : "Expected method should have been " + expectedInvokeMethod
+ + ", but was instead " + method;
+
+ /*
+ * Obtain the Method to be dynamically invoked
+ */
+
+ // Get the SerializableMethod argument
+ Object serializableMethodArg = args[1];
+ assert serializableMethodArg instanceof SerializableMethod : "2nd Argument was expected to be of type "
+ + SerializableMethod.class.getName() + ", was instead " + serializableMethodArg;
+ SerializableMethod serializableMethod = (SerializableMethod) serializableMethodArg;
+
+ // Obtain the Method represented by the SerializableMethod
+ Method dynamicInvokeMethod = serializableMethod.toMethod();
+ long hash = MethodHashing.calculateHash(dynamicInvokeMethod);
+
+ // Log
+ log.debug("Received invocation request to method " + serializableMethod + "; using hash: " + hash);
+
+ /*
+ * Build the invocation and return
+ *
+ * This is going to be intercepted by the Container's "dynamicInvoke"
+ * because the Container itself will be registered w/ Remoting Dispatcher
+ * via ProxyTestClassProxyHack
+ */
+ MethodInvocation sri = new StatefulRemoteInvocation(this.getInterceptors(), hash, dynamicInvokeMethod,
+ dynamicInvokeMethod, null, this.getTarget());
+
+ // Manually add metadata for invoked method
+ sri.getMetaData().addMetaData(SessionSpecRemotingMetadata.TAG_SESSION_INVOCATION,
+ SessionSpecRemotingMetadata.KEY_INVOKED_METHOD, serializableMethod, PayloadKey.AS_IS);
+
+ return sri;
+ }
+
+ /**
+ * Adds a Session ID, if specified, to the invocation metadata
+ */
+ //FIXME Not SFSB/SLSB -agnostic
+ @Override
+ protected void addMetadataToInvocation(MethodInvocation methodInvocation)
+ {
+ // Call Super implementation
+ super.addMetadataToInvocation(methodInvocation);
+
+ // Obtain target
+ Object target = this.getTarget();
+
+ // Add to the Invocation Metadata, if exists
+ if (target != null)
+ {
+ methodInvocation.getMetaData().addMetaData(StatefulSessionRemotingMetadata.TAG_SFSB_INVOCATION,
+ StatefulSessionRemotingMetadata.KEY_SESSION_ID, target, PayloadKey.AS_IS);
+ }
+
+ // Add Container Name
+ //FIXME Hardcoded Strings bad, IsLocalInterceptor should be sharing these references or otherwise accessible somehow
+ methodInvocation.getMetaData().addMetaData("IS_LOCAL", "GUID", this.getContainerGuid(), PayloadKey.AS_IS);
+
+ }
+
+ /**
+ * Add the target arguments for the invocation itself, not to those
+ * initially passed to InvokableContext.invoke()
+ */
+ @Override
+ protected void addArgumentsToInvocation(MethodInvocation invocation, Object[] originalArguments)
+ {
+ // Get the arguments, perform sanity checks, and set the true arguments to the destination method
+ Object objArguments = originalArguments[2];
+ assert objArguments instanceof Object[] : "3rd Argument to " + InvokableContext.class.getSimpleName()
+ + ".invoke should be an array of Objects";
+ Object[] arguments = (Object[]) objArguments;
+ invocation.setArguments(arguments);
+ }
+
+ // --------------------------------------------------------------------------------||
+ // Accessors / Mutators -----------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ protected Object getTarget()
+ {
+ return target;
+ }
+
+ private void setTarget(Object target)
+ {
+ this.target = target;
+ }
+
+ protected String getContainerGuid()
+ {
+ return containerGuid;
+ }
+
+ private void setContainerGuid(String containerGuid)
+ {
+ this.containerGuid = containerGuid;
+ }
+
+}
Added: projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/invocation/StatefulRemoteInvocation.java
===================================================================
--- projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/invocation/StatefulRemoteInvocation.java (rev 0)
+++ projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/invocation/StatefulRemoteInvocation.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -0,0 +1,98 @@
+/*
+ * 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.proxy.impl.invocation;
+
+import java.io.IOException;
+import java.io.ObjectInput;
+import java.io.ObjectOutput;
+import java.lang.reflect.Method;
+
+import org.jboss.aop.Advisor;
+import org.jboss.aop.advice.Interceptor;
+import org.jboss.aop.joinpoint.Invocation;
+import org.jboss.aop.joinpoint.MethodInvocation;
+
+/**
+ * Comment
+ *
+ * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
+ * @version $Revision: 62769 $
+ * @deprecated To be replaced by another invocation mechanism which provides way for
+ * Stateless/Stateful Invocations - probably descended from ContainerMethodInvocation in
+ * EJB3 Interceptors
+ */
+ at Deprecated
+public class StatefulRemoteInvocation extends MethodInvocation implements java.io.Externalizable
+{
+ private static final long serialVersionUID = 523913901046490941L;
+
+ protected Object id;
+
+
+ public StatefulRemoteInvocation(Interceptor[] interceptors, long methodHash, Method advisedMethod, Method unadvisedMethod, Advisor advisor, Object id)
+ {
+ super(interceptors, methodHash, advisedMethod, unadvisedMethod, advisor);
+ this.id = id;
+ }
+
+ public StatefulRemoteInvocation()
+ {
+ }
+
+ public Object getId()
+ {
+ return id;
+ }
+
+ public Invocation getWrapper(Interceptor[] newchain)
+ {
+ throw new RuntimeException("NOT IMPLEMENTED");
+ }
+
+ public Invocation copy()
+ {
+ throw new RuntimeException("NOT IMPLEMENTED");
+ }
+
+ public void writeExternal(ObjectOutput out) throws IOException
+ {
+ super.writeExternal(out);
+ out.writeObject(id);
+ }
+
+ public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
+ {
+ super.readExternal(in);
+ id = in.readObject();
+ }
+
+ public String toString()
+ {
+ StringBuffer sb = new StringBuffer(100);
+ sb.append("[");
+ sb.append("id=").append(id);
+ sb.append(", MethodInvocation=").append(super.toString());
+ sb.append("]");
+ return sb.toString();
+ }
+
+}
Added: projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/jndiregistrar/JndiReferenceBinding.java
===================================================================
--- projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/jndiregistrar/JndiReferenceBinding.java (rev 0)
+++ projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/jndiregistrar/JndiReferenceBinding.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -0,0 +1,56 @@
+/*
+ * 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.proxy.impl.jndiregistrar;
+
+import javax.naming.Reference;
+
+/**
+ * Simple data object that encapsulates a <code>Reference</code> and the
+ * associated name under which it should be bound in JNDI.
+ *
+ * @author Brian Stansberry
+ */
+public class JndiReferenceBinding
+{
+ private final String jndiName;
+ private final Reference reference;
+
+ public JndiReferenceBinding(String jndiName, Reference reference)
+ {
+ assert jndiName != null : "jndiName is null";
+ assert reference != null : "reference is null";
+
+ this.jndiName = jndiName;
+ this.reference = reference;
+ }
+
+ public String getJndiName()
+ {
+ return jndiName;
+ }
+
+ public Reference getReference()
+ {
+ return reference;
+ }
+}
\ No newline at end of file
Added: projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/jndiregistrar/JndiReferenceBindingSet.java
===================================================================
--- projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/jndiregistrar/JndiReferenceBindingSet.java (rev 0)
+++ projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/jndiregistrar/JndiReferenceBindingSet.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -0,0 +1,193 @@
+/*
+ * 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.proxy.impl.jndiregistrar;
+
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Hashtable;
+import java.util.Map;
+import java.util.Set;
+
+import javax.naming.Context;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+
+/**
+ * Encapsulates the {@link JndiReferenceBinding}s associated with a particular
+ * container.
+ *
+ * @author Brian Stansberry
+ */
+public class JndiReferenceBindingSet
+{
+ // --------------------------------------------------------------------------------||
+ // Instance Members ---------------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ /** The naming context to use if there is a need to rebind */
+ private Context context;
+ /** Naming properties associated with context; used if context is not viable */
+ private final Hashtable<?, ?> namingEnvironment;
+
+ /** All bindings for remote homes */
+ private Set<JndiReferenceBinding> homeRemoteBindings = new HashSet<JndiReferenceBinding>();
+ /** All bindings for default remotes */
+ private Set<JndiReferenceBinding> defaultRemoteBindings = new HashSet<JndiReferenceBinding>();
+ /** All bindings for business remotes, grouped by business interface */
+ private Map<String, Set<JndiReferenceBinding>> businessRemoteBindings = new HashMap<String, Set<JndiReferenceBinding>>();
+ /** All bindings for local homes */
+ private Set<JndiReferenceBinding> homeLocalBindings = new HashSet<JndiReferenceBinding>();
+ /** All bindings for default locals */
+ private Set<JndiReferenceBinding> defaultLocalBindings = new HashSet<JndiReferenceBinding>();
+ /** All bindings for business locals, grouped by business interface */
+ private Map<String, Set<JndiReferenceBinding>> businessLocalBindings = new HashMap<String, Set<JndiReferenceBinding>>();
+
+ // --------------------------------------------------------------------------------||
+ // Constructors -------------------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ public JndiReferenceBindingSet(Context context)
+ {
+ assert context != null : "context is null";
+ this.context = context;
+ try
+ {
+ this.namingEnvironment = context.getEnvironment();
+ }
+ catch (NamingException e)
+ {
+ throw new RuntimeException("Cannot retrieve naming environment from " + context);
+ }
+ }
+
+ // --------------------------------------------------------------------------------||
+ // Functional Methods -------------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ public Context getContext()
+ {
+ // FIXME pass the env properties through JndiSessionRegistrarBase.bindEjb
+ // instead of passing the context. Then we cache those and recreate
+ // the context via InitialContextFactory
+ try
+ {
+ // A test of the viability of our cached context
+ context.getEnvironment();
+ }
+ catch (NamingException ne)
+ {
+ try
+ {
+ context = new InitialContext(namingEnvironment);
+ }
+ catch (NamingException e)
+ {
+ throw new RuntimeException("Cannot create InitialContext from " + namingEnvironment);
+ }
+ }
+ return context;
+ }
+
+ public Set<JndiReferenceBinding> getHomeRemoteBindings()
+ {
+ return new HashSet<JndiReferenceBinding>(homeRemoteBindings);
+ }
+
+ public void addHomeRemoteBinding(JndiReferenceBinding binding)
+ {
+ assert binding != null : "binding is null";
+ this.homeRemoteBindings.add(binding);
+ }
+
+ public Set<JndiReferenceBinding> getDefaultRemoteBindings()
+ {
+ return new HashSet<JndiReferenceBinding>(defaultRemoteBindings);
+ }
+
+ public void addDefaultRemoteBinding(JndiReferenceBinding binding)
+ {
+ assert binding != null : "binding is null";
+ this.defaultRemoteBindings.add(binding);
+ }
+
+ public Map<String, Set<JndiReferenceBinding>> getBusinessRemoteBindings()
+ {
+ return new HashMap<String, Set<JndiReferenceBinding>>(businessRemoteBindings);
+ }
+
+ public void addBusinessRemoteBinding(String businessInterfaceName, JndiReferenceBinding binding)
+ {
+ assert businessInterfaceName != null : "businessInterfaceName is null";
+ assert binding != null : "binding is null";
+
+ Set<JndiReferenceBinding> bindings = businessRemoteBindings.get(businessInterfaceName);
+ if (bindings == null)
+ {
+ bindings = new HashSet<JndiReferenceBinding>();
+ businessRemoteBindings.put(businessInterfaceName, bindings);
+ }
+ bindings.add(binding);
+ }
+
+ public Set<JndiReferenceBinding> getHomeLocalBindings()
+ {
+ return new HashSet<JndiReferenceBinding>(homeLocalBindings);
+ }
+
+ public void addHomeLocalBinding(JndiReferenceBinding binding)
+ {
+ assert binding != null : "binding is null";
+ this.homeLocalBindings.add(binding);
+ }
+
+ public Set<JndiReferenceBinding> getDefaultLocalBindings()
+ {
+ return new HashSet<JndiReferenceBinding>(defaultLocalBindings);
+ }
+
+ public void addDefaultLocalBinding(JndiReferenceBinding binding)
+ {
+ assert binding != null : "binding is null";
+ this.defaultLocalBindings.add(binding);
+ }
+
+ public Map<String, Set<JndiReferenceBinding>> getBusinessLocalBindings()
+ {
+ return new HashMap<String, Set<JndiReferenceBinding>>(businessLocalBindings);
+ }
+
+ public void addBusinessLocalBinding(String businessInterfaceName, JndiReferenceBinding binding)
+ {
+ assert businessInterfaceName != null : "businessInterfaceName is null";
+ assert binding != null : "binding is null";
+
+ Set<JndiReferenceBinding> bindings = businessLocalBindings.get(businessInterfaceName);
+ if (bindings == null)
+ {
+ bindings = new HashSet<JndiReferenceBinding>();
+ businessLocalBindings.put(businessInterfaceName, bindings);
+ }
+ bindings.add(binding);
+ }
+
+}
Added: projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/jndiregistrar/JndiServiceRegistrar.java
===================================================================
--- projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/jndiregistrar/JndiServiceRegistrar.java (rev 0)
+++ projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/jndiregistrar/JndiServiceRegistrar.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -0,0 +1,130 @@
+/*
+ * 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.proxy.impl.jndiregistrar;
+
+import org.jboss.aop.Advisor;
+import org.jboss.aop.Dispatcher;
+import org.jboss.ejb3.proxy.impl.factory.ProxyFactory;
+import org.jboss.ejb3.proxy.impl.factory.session.service.ServiceLocalProxyFactory;
+import org.jboss.ejb3.proxy.impl.factory.session.service.ServiceRemoteProxyFactory;
+import org.jboss.logging.Logger;
+import org.jboss.metadata.ejb.jboss.JBossServiceBeanMetaData;
+import org.jboss.metadata.ejb.jboss.JBossSessionBeanMetaData;
+
+/**
+ * JndiServiceRegistrar
+ *
+ * Responsible for binding of ObjectFactories and
+ * creation/registration of associated ProxyFactories,
+ * centralizing operations for @Service Implementations
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+public class JndiServiceRegistrar extends JndiSessionRegistrarBase
+{
+
+ // --------------------------------------------------------------------------------||
+ // Class Members ------------------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ private static final Logger log = Logger.getLogger(JndiServiceRegistrar.class);
+
+ // --------------------------------------------------------------------------------||
+ // Constructor --------------------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ /**
+ * Creates a JNDI Registrar from the specified configuration properties, none of
+ * which may be null.
+ *
+ * @param serviceProxyObjectFactoryType String representation of the JNDI Object Factory to use for @Service
+ */
+ public JndiServiceRegistrar(String serviceProxyObjectFactoryType)
+ {
+ super(serviceProxyObjectFactoryType);
+ }
+
+ // --------------------------------------------------------------------------------||
+ // Required Implementations -------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ /**
+ * Creates and returns a new local proxy factory for this @Service
+ *
+ * @param name The unique name for the ProxyFactory
+ * @param containerName The name of the Container upon which Proxies
+ * from the returned ProxyFactory will invoke
+ * @param containerGuid The globally-unique name of the container
+ * @param smd The metadata representing this SFSB
+ * @param cl The ClassLoader for this EJB Container
+ * @param advisor The Advisor for proxies created by this factory
+ */
+ @Override
+ protected ProxyFactory createLocalProxyFactory(final String name, final String containerName,
+ final String containerGuid, final JBossSessionBeanMetaData smd, final ClassLoader cl, final Advisor advisor)
+ {
+ assert (smd instanceof JBossServiceBeanMetaData) : "Specified metadata was not of expected type "
+ + JBossServiceBeanMetaData.class.getSimpleName();
+ JBossServiceBeanMetaData serviceMd = (JBossServiceBeanMetaData) smd;
+ return new ServiceLocalProxyFactory(name, containerName, containerGuid, serviceMd, cl, advisor);
+ }
+
+ /**
+ * Creates and returns a new remote proxy factory for this SFSB
+ *
+ * @param name The unique name for the ProxyFactory
+ * @param containerName The name of the Container upon which Proxies
+ * from the returned ProxyFactory will invoke
+ * @param containerGuid The globally-unique name of the container
+ * @param smd The metadata representing this SFSB
+ * @param cl The ClassLoader for this EJB Container
+ * @param url The URL to use for Remoting
+ * @param advisor The Advisor for proxies created by this factory
+ * @param interceptorStackName The name of the client-side interceptor stack to use.
+ * If null the default will apply.
+ */
+ @Override
+ protected ProxyFactory createRemoteProxyFactory(final String name, final String containerName,
+ final String containerGuid, final JBossSessionBeanMetaData smd, final ClassLoader cl, final String url,
+ final Advisor advisor, final String interceptorStackName)
+ {
+ // Ensure metadata is of expected type
+ assert (smd instanceof JBossServiceBeanMetaData) : "Specified metadata was not of expected type "
+ + JBossServiceBeanMetaData.class.getSimpleName();
+
+ // Cast
+ JBossServiceBeanMetaData serviceMd = (JBossServiceBeanMetaData) smd;
+
+ // Create
+ ProxyFactory factory = new ServiceRemoteProxyFactory(name, containerName, containerGuid, serviceMd, cl, url,
+ advisor, interceptorStackName);
+
+ // Register with Remoting
+ log.debug("Registering with Remoting Dispatcher under name \"" + factory.getName() + "\": " + factory);
+ Dispatcher.singleton.registerTarget(factory.getName(), factory);
+
+ // Return
+ return factory;
+ }
+
+}
Added: projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/jndiregistrar/JndiSessionRegistrarBase.java
===================================================================
--- projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/jndiregistrar/JndiSessionRegistrarBase.java (rev 0)
+++ projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/jndiregistrar/JndiSessionRegistrarBase.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -0,0 +1,1192 @@
+/*
+ * 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.proxy.impl.jndiregistrar;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+import java.util.Set;
+
+import javax.naming.Context;
+import javax.naming.NameNotFoundException;
+import javax.naming.NamingException;
+import javax.naming.RefAddr;
+import javax.naming.Reference;
+import javax.naming.StringRefAddr;
+import javax.naming.spi.ObjectFactory;
+
+import org.jboss.aop.Advisor;
+import org.jboss.aop.Dispatcher;
+import org.jboss.ejb3.common.registrar.spi.DuplicateBindException;
+import org.jboss.ejb3.common.registrar.spi.Ejb3RegistrarLocator;
+import org.jboss.ejb3.common.registrar.spi.NotBoundException;
+import org.jboss.ejb3.common.string.StringUtils;
+import org.jboss.ejb3.proxy.impl.factory.ProxyFactory;
+import org.jboss.ejb3.proxy.impl.objectfactory.ProxyFactoryReferenceAddressTypes;
+import org.jboss.ejb3.proxy.impl.remoting.ProxyRemotingUtils;
+import org.jboss.logging.Logger;
+import org.jboss.metadata.ejb.jboss.JBossEnterpriseBeanMetaData;
+import org.jboss.metadata.ejb.jboss.JBossSessionBeanMetaData;
+import org.jboss.metadata.ejb.jboss.RemoteBindingMetaData;
+import org.jboss.metadata.ejb.jboss.jndipolicy.spi.JbossSessionBeanJndiNameResolver;
+import org.jboss.metadata.ejb.spec.BusinessLocalsMetaData;
+import org.jboss.metadata.ejb.spec.BusinessRemotesMetaData;
+import org.jboss.naming.Util;
+import org.jboss.remoting.InvokerLocator;
+
+/**
+ * JndiSessionRegistrarBase
+ *
+ * Responsible for binding of ObjectFactories and
+ * creation/registration of associated ProxyFactories,
+ * centralizing operations common to that of all Session
+ * EJB Implementations
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+public abstract class JndiSessionRegistrarBase
+{
+ // --------------------------------------------------------------------------------||
+ // Class Members ------------------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ private static final Logger log = Logger.getLogger(JndiSessionRegistrarBase.class);
+
+ /**
+ * The value appended to the key used to bind proxy factories to the registry
+ */
+ private static final String KEY_PREFIX_PROXY_FACTORY_REGISTRY = "ProxyFactory/";
+
+ private static final String OBJECT_FACTORY_CLASSNAME_PREFIX = "Proxy for: ";
+
+ // --------------------------------------------------------------------------------||
+ // Instance Members ---------------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ /**
+ * Fully-qualified class name of the JNDI Object Factory to Reference
+ */
+ private String sessionProxyObjectFactoryType;
+
+ // --------------------------------------------------------------------------------||
+ // Constructor --------------------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ /**
+ * Creates a JNDI Registrar from the specified configuration properties, none of
+ * which may be null.
+ *
+ * @param sessionProxyObjectFactoryType String representation of the JNDI Object
+ * Factory Class Name (fully-qualified) to use for this Session EJB
+ */
+ public JndiSessionRegistrarBase(final String sessionProxyObjectFactoryType)
+ {
+ /*
+ * Perform some assertions and logging
+ */
+
+ // Set the Proxy Object Factory Type
+ assert sessionProxyObjectFactoryType != null && !sessionProxyObjectFactoryType.equals("") : "Session EJB Proxy "
+ + ObjectFactory.class.getSimpleName() + " must be specified.";
+
+ try
+ {
+ // See if the specified Session Proxy Object Factory is valid
+ Class.forName(sessionProxyObjectFactoryType);
+ }
+ catch (ClassNotFoundException e)
+ {
+ throw new RuntimeException("Specified " + ObjectFactory.class.getSimpleName() + " of "
+ + sessionProxyObjectFactoryType + " could not be loaded.", e);
+ }
+ this.setSessionProxyObjectFactoryType(sessionProxyObjectFactoryType);
+ log.debug("Using Session EJB JNDI " + ObjectFactory.class.getSimpleName() + ": "
+ + this.getSessionProxyObjectFactoryType());
+ }
+
+ // --------------------------------------------------------------------------------||
+ // Functional Methods -------------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ /**
+ * Binds into JNDI all appropriate objects required
+ * by the EJB described by the specified metadata. Additionally
+ * responsible for creation and registration of any all ProxyFactory
+ * implementations required by the EJB
+ *
+ * @param context The JNDI Context to use for binding
+ * @param smd the Container's metadata
+ * @param cl The CL of the Container
+ * @param containerName The name under which the target container is registered
+ * @param containerGuid The globally-unique name of the container
+ * @param advisor The advisor to use for generated proxies
+ */
+ public void bindEjb(final Context context, final JBossSessionBeanMetaData smd, final ClassLoader cl,
+ final String containerName, final String containerGuid, final Advisor advisor)
+ {
+ JndiReferenceBindingSet bindingSet = createJndiReferenceBindingSet(context, smd, cl, containerName,
+ containerGuid, advisor);
+
+ bind(context, bindingSet, false, true);
+ }
+
+ /**
+ * Creates all of the <code>Reference</code> objects that should be bound
+ * in JNDI for the EJB, and determines the correct JNDI name for each.
+ * Additionally responsible for creation and registration of any all
+ * ProxyFactory implementations required by the EJB.
+ *
+ * @param smd the Container's metadata
+ * @param cl The CL of the Container
+ * @param containerName The name under which the target container is registered
+ * @param containerGuid The globally-unique name of the container
+ * @param advisor The advisor to use for generated proxies
+ *
+ * @return data object encapsulating the references and their JNDI names
+ */
+ protected JndiReferenceBindingSet createJndiReferenceBindingSet(final Context context,
+ final JBossSessionBeanMetaData smd, final ClassLoader cl, final String containerName,
+ final String containerGuid, final Advisor advisor)
+ {
+ // Log
+ String ejbName = smd.getEjbName();
+ log.debug("Found Session Bean: " + ejbName);
+
+ // Get Business Locals
+ BusinessLocalsMetaData businessLocals = smd.getBusinessLocals();
+
+ // Get Business Remotes
+ BusinessRemotesMetaData businessRemotes = smd.getBusinessRemotes();
+
+ // Get Local Home
+ String localHome = StringUtils.adjustWhitespaceStringToNull(smd.getLocalHome());
+
+ // Get Remote Home
+ String remoteHome = StringUtils.adjustWhitespaceStringToNull(smd.getHome());
+
+ // Determine if there are local/remote views
+ boolean hasLocalBusinessView = (businessLocals != null && businessLocals.size() > 0);
+ boolean hasRemoteBusinessView = (businessRemotes != null && businessRemotes.size() > 0);
+ boolean hasLocalView = (localHome != null || hasLocalBusinessView);
+ boolean hasRemoteView = (remoteHome != null || hasRemoteBusinessView);
+
+ /*
+ * Create and Register Proxy Factories
+ */
+
+ JndiReferenceBindingSet bindingSet = new JndiReferenceBindingSet(context);
+
+ /*
+ * Bind Remote ObjectFactories to JNDI
+ */
+
+ // If there's a remote view
+ if (hasRemoteView)
+ {
+ // Initialize a default clientBindUrl
+ String defaultClientBindUrl = ProxyRemotingUtils.getDefaultClientBinding();
+
+ /*
+ * Create reference addresses for remote bindings
+ */
+
+ // Initialize Reference Addresses to attach to remote JNDI References
+ List<RefAddr> refAddrsForRemote = new ArrayList<RefAddr>();
+
+ // For each of the remote business interfaces, make a Reference Address
+ if (businessRemotes != null)
+ {
+ for (String businessRemote : businessRemotes)
+ {
+ RefAddr refAddr = new StringRefAddr(
+ ProxyFactoryReferenceAddressTypes.REF_ADDR_TYPE_PROXY_BUSINESS_INTERFACE_REMOTE, businessRemote);
+ refAddrsForRemote.add(refAddr);
+ }
+ }
+
+ /*
+ * Set up default remote binding
+ */
+
+ // Get the default remote JNDI Name
+ String defaultRemoteJndiName = smd.getJndiName();
+
+ // Create and register a remote proxy factory
+ String defaultRemoteProxyFactoryKey = this.getProxyFactoryRegistryKey(defaultRemoteJndiName, smd, false);
+ ProxyFactory factory = this.createRemoteProxyFactory(defaultRemoteProxyFactoryKey, containerName,
+ containerGuid, smd, cl, defaultClientBindUrl, advisor, null);
+ try
+ {
+ this.registerProxyFactory(defaultRemoteProxyFactoryKey, factory, smd);
+ }
+ catch (DuplicateBindException dbe)
+ {
+ throw new RuntimeException(dbe);
+ }
+
+ // Get Classname to set for Reference
+ String defaultRemoteClassName = this.getHumanReadableListOfInterfacesInRefAddrs(refAddrsForRemote);
+
+ // Create a Reference
+ Reference defaultRemoteRef = createStandardReference(JndiSessionRegistrarBase.OBJECT_FACTORY_CLASSNAME_PREFIX
+ + defaultRemoteClassName, defaultRemoteProxyFactoryKey, containerName, false);
+
+ /*
+ * Set up references for Home
+ */
+
+ // Determine if remote home and business remotes are bound to same JNDI Address
+ boolean bindRemoteAndHomeTogether = this.isHomeAndBusinessBoundTogether(smd, false);
+ if (bindRemoteAndHomeTogether)
+ {
+ // Add a Reference Address for the Remote Home
+ String home = smd.getHome();
+ assert home != null : "Home and Business set to be bound together, yet no home is defined";
+ RefAddr refAddr = new StringRefAddr(
+ ProxyFactoryReferenceAddressTypes.REF_ADDR_TYPE_PROXY_EJB2x_INTERFACE_HOME_REMOTE, home);
+ refAddrsForRemote.add(refAddr);
+ }
+ // Bind Home (not bound together) if exists
+ else if (smd.getHome() != null && smd.getHome().trim().length() > 0)
+ {
+ String homeType = smd.getHome();
+ RefAddr refAddrHomeInterface = new StringRefAddr(
+ ProxyFactoryReferenceAddressTypes.REF_ADDR_TYPE_PROXY_EJB2x_INTERFACE_HOME_REMOTE, homeType);
+ RefAddr refAddrRemoting = this.createRemotingRefAddr(defaultClientBindUrl);
+ Reference homeRef = createStandardReference(JndiSessionRegistrarBase.OBJECT_FACTORY_CLASSNAME_PREFIX
+ + homeType, defaultRemoteProxyFactoryKey, containerName, false);
+ homeRef.add(refAddrHomeInterface);
+ homeRef.add(refAddrRemoting);
+
+ String homeAddress = smd.getHomeJndiName();
+ assert homeAddress != null && !homeAddress.equals("") : "JNDI Address for Remote Home must be defined";
+ log.debug("Remote Home View for EJB " + smd.getEjbName() + " to be bound into JNDI at \"" + homeAddress
+ + "\"");
+
+ bindingSet.addHomeRemoteBinding(new JndiReferenceBinding(homeAddress, homeRef));
+ }
+
+ /*
+ * If no @RemoteBindings are defined, make a default remote binding
+ */
+
+ // Get RemoteBindings
+ List<RemoteBindingMetaData> remoteBindings = smd.getRemoteBindings();
+
+ // If there are no @RemoteBindings defined and there's a remote business (EJB3) view
+ if (remoteBindings == null && hasRemoteBusinessView)
+ {
+ // Use the default Client Bind URL
+ String clientBindUrl = defaultClientBindUrl;
+
+ // Create a default remote remoting RefAddr, using the default (as none was explicitly-specified)
+ RefAddr defaultRemoteRemotingRefAddr = this.createRemotingRefAddr(clientBindUrl);
+
+ // Add a Reference Address for the Remoting URL
+ refAddrsForRemote.add(defaultRemoteRemotingRefAddr);
+
+ /*
+ * Bind ObjectFactory for default remote businesses (and home if bound together)
+ */
+
+ // Add all Reference Addresses for Default Remote Reference
+ for (RefAddr refAddr : refAddrsForRemote)
+ {
+ log.debug("Adding " + RefAddr.class.getSimpleName() + " to Default Remote "
+ + Reference.class.getSimpleName() + ": Type \"" + refAddr.getType() + "\", Content \""
+ + refAddr.getContent() + "\"");
+ defaultRemoteRef.add(refAddr);
+ }
+
+ // Bind the Default Remote Reference to JNDI
+ log.debug("Default Remote Business View for EJB " + smd.getEjbName() + " to be bound into JNDI at \""
+ + defaultRemoteJndiName + "\"");
+ bindingSet.addDefaultRemoteBinding(new JndiReferenceBinding(defaultRemoteJndiName, defaultRemoteRef));
+
+ }
+
+ /*
+ * If there are @RemoteBindings and a remote view
+ */
+
+ // Remote Bindings are defined, create a binding for each
+ else if (remoteBindings != null && hasRemoteView)
+ {
+
+ /*
+ * Bind all explicitly-declared remote bindings
+ */
+
+ // For each of the explicitly-defined @RemoteBindings
+ for (RemoteBindingMetaData binding : remoteBindings)
+ {
+ // Get the defined JNDI Name
+ String remoteBindingJndiName = binding.getJndiName();
+
+ // If the JNDI Name isn't defined
+ if (remoteBindingJndiName == null || remoteBindingJndiName.trim().length() == 0)
+ {
+ // Set a default remote binding JNDI name
+ remoteBindingJndiName = smd.getJndiName();
+ }
+
+ // Get the client bind URL
+ String clientBindUrl = defaultClientBindUrl;
+
+ // Override the client bind URL with that associated with @RemoteBinding.invokerName
+ String remoteBindingInvokerBindName = binding.getInvokerName();
+ boolean remoteBindingInvokerNameDefined = remoteBindingInvokerBindName != null
+ && remoteBindingInvokerBindName.trim().length() > 0;
+ if (remoteBindingInvokerNameDefined)
+ {
+ clientBindUrl = ProxyRemotingUtils.getClientBinding(remoteBindingInvokerBindName);
+ log.debug("Using client bind URL of " + clientBindUrl + " as specified by invokerName "
+ + remoteBindingInvokerBindName + " for EJB " + smd.getName() + " with JNDI Binding: "
+ + remoteBindingJndiName);
+ }
+
+ // Override the client bind URL with that specified from @RemoteBinding.clientBindUrl
+ String remoteBindingClientBindUrl = binding.getClientBindUrl();
+ if (remoteBindingClientBindUrl != null && remoteBindingClientBindUrl.trim().length() > 0)
+ {
+ clientBindUrl = remoteBindingClientBindUrl;
+ log.debug("Using client bind URL of " + clientBindUrl + " as specified by clientBindUrl "
+ + remoteBindingClientBindUrl + " for EJB " + smd.getName() + " with JNDI Binding: "
+ + remoteBindingJndiName);
+
+ // Warn the user if he's provided two overrides
+ if (remoteBindingInvokerNameDefined)
+ {
+ log.warn("Both invokerName and clientBindUrl have been specified on "
+ + RemoteBindingMetaData.class.getSimpleName() + " for EJB " + smd.getName()
+ + "; clientBindUrl takes priority");
+ }
+ }
+
+ // Get the interceptor stack
+ String interceptorStack = binding.getInterceptorStack();
+
+ /*
+ * Obtain a Proxy Factory for this Binding
+ */
+
+ // Create and register a remote proxy factory specific to this binding
+ String remoteBindingProxyFactoryKey = this.getProxyFactoryRegistryKey(remoteBindingJndiName, smd, false);
+ ProxyFactory remoteBindingProxyFactory = null;
+ boolean reregister = true;
+ try
+ {
+ // Check if it's already available
+ remoteBindingProxyFactory = Ejb3RegistrarLocator.locateRegistrar().lookup(
+ remoteBindingProxyFactoryKey, ProxyFactory.class);
+ }
+ catch (NotBoundException nbe)
+ {
+ reregister = false;
+ }
+
+ // If we need to reregister with this newly-defined Proxy Factory
+ if (reregister)
+ {
+ Ejb3RegistrarLocator.locateRegistrar().unbind(remoteBindingProxyFactoryKey);
+ }
+
+ // Create the Proxy Factory
+ remoteBindingProxyFactory = this.createRemoteProxyFactory(remoteBindingProxyFactoryKey, containerName,
+ containerGuid, smd, cl, clientBindUrl, advisor, interceptorStack);
+ try
+ {
+ this.registerProxyFactory(remoteBindingProxyFactoryKey, remoteBindingProxyFactory, smd);
+ }
+ catch (DuplicateBindException dbe)
+ {
+ throw new RuntimeException(dbe);
+ }
+
+ // Create a default remote remoting RefAddr, using the default (as none was explicitly-specified)
+ RefAddr remoteBindingRemotingRefAddr = this.createRemotingRefAddr(clientBindUrl);
+
+ // Create a Reference
+ Reference remoteBindingRef = createStandardReference(
+ JndiSessionRegistrarBase.OBJECT_FACTORY_CLASSNAME_PREFIX + defaultRemoteClassName,
+ remoteBindingProxyFactoryKey, containerName, false);
+
+ // Add a Reference Address for the Remoting URL
+ log.debug("Adding " + RefAddr.class.getSimpleName() + " to @RemoteBinding "
+ + Reference.class.getSimpleName() + ": Type \"" + remoteBindingRemotingRefAddr.getType()
+ + "\", Content \"" + remoteBindingRemotingRefAddr.getContent() + "\"");
+ remoteBindingRef.add(remoteBindingRemotingRefAddr);
+
+ // Add all Reference Addresses for @RemoteBinding Reference
+ for (RefAddr refAddr : refAddrsForRemote)
+ {
+ log.debug("Adding " + RefAddr.class.getSimpleName() + " to @RemoteBinding "
+ + Reference.class.getSimpleName() + ": Type \"" + refAddr.getType() + "\", Content \""
+ + refAddr.getContent() + "\"");
+ remoteBindingRef.add(refAddr);
+ }
+
+ // Create the binding
+ JndiReferenceBinding remoteBindingJndiBinding = new JndiReferenceBinding(remoteBindingJndiName,
+ remoteBindingRef);
+
+ // Add the binding
+ bindingSet.addDefaultRemoteBinding(remoteBindingJndiBinding);
+
+ }
+ }
+
+ // Bind ObjectFactory specific to each Remote Business Interface
+ if (businessRemotes != null)
+ {
+ for (String businessRemote : businessRemotes)
+ {
+ RefAddr refAddrBusinessInterface = new StringRefAddr(
+ ProxyFactoryReferenceAddressTypes.REF_ADDR_TYPE_PROXY_BUSINESS_INTERFACE_REMOTE, businessRemote);
+ RefAddr refAddrRemoting = this.createRemotingRefAddr(defaultClientBindUrl);
+ Reference ref = createStandardReference(JndiSessionRegistrarBase.OBJECT_FACTORY_CLASSNAME_PREFIX
+ + businessRemote, defaultRemoteProxyFactoryKey, containerName, false);
+ ref.add(refAddrBusinessInterface);
+ ref.add(refAddrRemoting);
+ String address = JbossSessionBeanJndiNameResolver.resolveJndiName(smd, businessRemote);
+ log.debug("Remote Business View for " + businessRemote + " of EJB " + smd.getEjbName()
+ + " to be bound into JNDI at \"" + address + "\"");
+
+ bindingSet.addBusinessRemoteBinding(businessRemote, new JndiReferenceBinding(address, ref));
+ }
+ }
+ }
+ // If there's a local view
+ if (hasLocalView)
+ {
+ // Get the default local JNDI Name
+ String defaultLocalJndiName = smd.getLocalJndiName();
+
+ // Create and register a local proxy factory
+ String localProxyFactoryKey = this.getProxyFactoryRegistryKey(defaultLocalJndiName, smd, true);
+ ProxyFactory factory = this.createLocalProxyFactory(localProxyFactoryKey, containerName, containerGuid, smd,
+ cl, advisor);
+ try
+ {
+ this.registerProxyFactory(localProxyFactoryKey, factory, smd);
+ }
+ catch (DuplicateBindException dbe)
+ {
+ throw new RuntimeException(dbe);
+ }
+
+ // Initialize Reference Addresses to attach to default local JNDI Reference
+ List<RefAddr> refAddrsForDefaultLocal = new ArrayList<RefAddr>();
+
+ // For each of the local business interfaces, make a Reference Address
+ if (businessLocals != null)
+ {
+ for (String businessLocal : businessLocals)
+ {
+ RefAddr refAddr = new StringRefAddr(
+ ProxyFactoryReferenceAddressTypes.REF_ADDR_TYPE_PROXY_BUSINESS_INTERFACE_LOCAL, businessLocal);
+ refAddrsForDefaultLocal.add(refAddr);
+ }
+ }
+
+ // Determine if local home and business locals are bound to same JNDI Address
+ boolean bindLocalAndLocalHomeTogether = this.isHomeAndBusinessBoundTogether(smd, true);
+ if (bindLocalAndLocalHomeTogether)
+ {
+ // Add a Reference Address for the Local Home
+ RefAddr refAddr = new StringRefAddr(
+ ProxyFactoryReferenceAddressTypes.REF_ADDR_TYPE_PROXY_EJB2x_INTERFACE_HOME_LOCAL, smd.getLocalHome());
+ refAddrsForDefaultLocal.add(refAddr);
+ }
+ // Bind Local Home (not bound together) if exists
+ else if (smd.getLocalHome() != null && !smd.getLocalHome().equals(""))
+ {
+ String localHomeType = smd.getLocalHome();
+ RefAddr refAddr = new StringRefAddr(
+ ProxyFactoryReferenceAddressTypes.REF_ADDR_TYPE_PROXY_EJB2x_INTERFACE_HOME_LOCAL, localHomeType);
+ Reference localHomeRef = createStandardReference(JndiSessionRegistrarBase.OBJECT_FACTORY_CLASSNAME_PREFIX
+ + localHomeType, localProxyFactoryKey, containerName, true);
+ localHomeRef.add(refAddr);
+ String localHomeAddress = smd.getLocalHomeJndiName();
+ log.debug("Local Home View for EJB " + smd.getEjbName() + " to be bound into JNDI at \"" + localHomeAddress
+ + "\"");
+
+ bindingSet.addHomeLocalBinding(new JndiReferenceBinding(localHomeAddress, localHomeRef));
+ }
+
+ /*
+ * Bind ObjectFactory for default local businesses (and LocalHome if bound together)
+ */
+
+ if (hasLocalBusinessView)
+ {
+ // Get Classname to set for Reference
+ String defaultLocalClassName = this.getHumanReadableListOfInterfacesInRefAddrs(refAddrsForDefaultLocal);
+
+ // Create a Reference
+ Reference defaultLocalRef = createStandardReference(
+ JndiSessionRegistrarBase.OBJECT_FACTORY_CLASSNAME_PREFIX + defaultLocalClassName,
+ localProxyFactoryKey, containerName, true);
+
+ // Add all Reference Addresses for Default Local Reference
+ for (RefAddr refAddr : refAddrsForDefaultLocal)
+ {
+ log.debug("Adding " + RefAddr.class.getSimpleName() + " to Default Local "
+ + Reference.class.getSimpleName() + ": Type \"" + refAddr.getType() + "\", Content \""
+ + refAddr.getContent() + "\"");
+ defaultLocalRef.add(refAddr);
+ }
+
+ // Bind the Default Local Reference to JNDI
+ String defaultLocalAddress = smd.getLocalJndiName();
+ log.debug("Default Local Business View for EJB " + smd.getEjbName() + " to be bound into JNDI at \""
+ + defaultLocalAddress + "\"");
+
+ bindingSet.addDefaultLocalBinding(new JndiReferenceBinding(defaultLocalAddress, defaultLocalRef));
+
+ // Bind ObjectFactory specific to each Local Business Interface
+ for (String businessLocal : businessLocals)
+ {
+ RefAddr refAddr = new StringRefAddr(
+ ProxyFactoryReferenceAddressTypes.REF_ADDR_TYPE_PROXY_BUSINESS_INTERFACE_LOCAL, businessLocal);
+ Reference ref = createStandardReference(JndiSessionRegistrarBase.OBJECT_FACTORY_CLASSNAME_PREFIX
+ + businessLocal, localProxyFactoryKey, containerName, true);
+ ref.add(refAddr);
+ String address = JbossSessionBeanJndiNameResolver.resolveJndiName(smd, businessLocal);
+ log.debug("Local Business View for " + businessLocal + " of EJB " + smd.getEjbName()
+ + " to be bound into JNDI at \"" + address + "\"");
+
+ bindingSet.addBusinessLocalBinding(businessLocal, new JndiReferenceBinding(address, ref));
+ }
+ }
+ }
+ return bindingSet;
+ }
+
+ /**
+ * Unbinds from JNDI all appropriate objects registered
+ * by the EJB described by the specified metadata. Additionally
+ * responsible for destruction and deregistration of any all ProxyFactory
+ * implementations required by the EJB
+ *
+ * @param context The JNDI Context to use for unbinding
+ * @param smd
+ */
+ public void unbindEjb(final Context context, final JBossSessionBeanMetaData smd)
+ {
+ // Log
+ String ejbName = smd.getEjbName();
+ log.debug("Unbinding JNDI References for Session Bean: " + ejbName);
+
+ // Get Business Locals
+ BusinessLocalsMetaData businessLocals = smd.getBusinessLocals();
+
+ // Get Business Remotes
+ BusinessRemotesMetaData businessRemotes = smd.getBusinessRemotes();
+
+ // Get Local Home
+ String localHome = StringUtils.adjustWhitespaceStringToNull(smd.getLocalHome());
+
+ // Get Remote Home
+ String remoteHome = StringUtils.adjustWhitespaceStringToNull(smd.getHome());
+
+ // Determine if there are local/remote views
+ boolean hasLocalView = (localHome != null || (businessLocals != null && businessLocals.size() > 0));
+ boolean hasRemoteView = (remoteHome != null || (businessRemotes != null && businessRemotes.size() > 0));
+
+ /*
+ * Remove Proxy Factories
+ */
+
+ // If there's a remote view
+ /*
+ * Remove Remote ObjectFactories to JNDI
+ */
+
+ if (hasRemoteView)
+ {
+ // Obtain RemoteBinding URL
+ List<RemoteBindingMetaData> remoteBindings = smd.getRemoteBindings();
+
+ // Get Default Remote JNDI Name
+ String defaultRemoteJndiName = smd.getJndiName();
+
+ // Find and deregister a remote proxy factory
+ String remoteProxyFactoryKey = this.getProxyFactoryRegistryKey(defaultRemoteJndiName, smd, false);
+ this.deregisterProxyFactory(remoteProxyFactoryKey);
+
+ // Determine if remote home and business remotes are bound to same JNDI Address
+ boolean bindRemoteAndHomeTogether = this.isHomeAndBusinessBoundTogether(smd, false);
+ // Bind Home (not bound together) if exists
+ if ((smd.getHome() != null && !smd.getHome().equals("")) && !bindRemoteAndHomeTogether)
+ {
+ String homeAddress = smd.getHomeJndiName();
+ log.debug("Remote Home View for EJB " + smd.getEjbName() + " to be unbound from JNDI at \"" + homeAddress
+ + "\"");
+ this.unbind(context, homeAddress);
+ }
+
+ /*
+ * Unbind ObjectFactory for default remote businesses (and home if bound together)
+ */
+
+ // Bind the Default Remote Reference to JNDI
+ log.debug("Default Remote Business View for EJB " + smd.getEjbName() + " to be unbound from JNDI at \""
+ + defaultRemoteJndiName + "\"");
+ this.unbind(context, defaultRemoteJndiName);
+
+ // Unbind all @RemoteBinding.jndiBindings
+ if (remoteBindings != null)
+ {
+ for (RemoteBindingMetaData remoteBinding : remoteBindings)
+ {
+ String remoteBindingJndiName = remoteBinding.getJndiName();
+ if (remoteBindingJndiName != null && remoteBindingJndiName.trim().length() > 0)
+ {
+ // Unbind the JNDI entry
+ this.unbind(context, remoteBindingJndiName);
+
+ // Find and deregister the remote proxy factory
+ String remoteBindingProxyFactoryKey = this.getProxyFactoryRegistryKey(remoteBindingJndiName, smd,
+ false);
+ this.deregisterProxyFactory(remoteBindingProxyFactoryKey);
+ }
+ }
+ }
+
+ // Unbind ObjectFactory specific to each Remote Business Interface
+ if (businessRemotes != null)
+ {
+ for (String businessRemote : businessRemotes)
+ {
+ String address = JbossSessionBeanJndiNameResolver.resolveJndiName(smd, businessRemote);
+ log.debug("Remote Business View for " + businessRemote + " of EJB " + smd.getEjbName()
+ + " to be unbound from JNDI at \"" + address + "\"");
+ this.unbind(context, address);
+ }
+ }
+ }
+ // If there's a local view
+ if (hasLocalView)
+ {
+ // Get default local JNDI Name
+ String defaultLocalJndiName = smd.getLocalJndiName();
+
+ // Remove local proxy factory
+ String localProxyFactoryKey = this.getProxyFactoryRegistryKey(defaultLocalJndiName, smd, true);
+ this.deregisterProxyFactory(localProxyFactoryKey);
+
+ // Determine if local home and business locals are bound to same JNDI Address
+ boolean bindLocalAndLocalHomeTogether = this.isHomeAndBusinessBoundTogether(smd, true);
+
+ // Unbind Local Home (not bound together) if exists
+ if ((smd.getLocalHome() != null && !smd.getLocalHome().equals("")) && !bindLocalAndLocalHomeTogether)
+ {
+ String localHomeAddress = smd.getLocalHomeJndiName();
+ log.debug("Local Home View for EJB " + smd.getEjbName() + " to be unbound from JNDI at \""
+ + localHomeAddress + "\"");
+ this.unbind(context, localHomeAddress);
+ }
+
+ /*
+ * Unbind ObjectFactory for default local businesses (and LocalHome if bound together)
+ */
+
+ // Unbind the Default Local Reference to JNDI
+ String defaultLocalAddress = smd.getLocalJndiName();
+ log.debug("Default Local Business View for EJB " + smd.getEjbName() + " to be unbound from JNDI at \""
+ + defaultLocalAddress + "\"");
+ this.unbind(context, defaultLocalAddress);
+
+ // Unbind ObjectFactory specific to each Local Business Interface
+ if (businessLocals != null)
+ {
+ for (String businessLocal : businessLocals)
+ {
+ String address = JbossSessionBeanJndiNameResolver.resolveJndiName(smd, businessLocal);
+ log.debug("Local Business View for " + businessLocal + " of EJB " + smd.getEjbName()
+ + " to be unbound from JNDI at \"" + address + "\"");
+ this.unbind(context, address);
+ }
+ }
+ }
+ }
+
+ // --------------------------------------------------------------------------------||
+ // Contracts ----------------------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ /**
+ * Creates and returns a new local proxy factory for this Session Bean
+ *
+ * @param name The unique name for the ProxyFactory
+ * @param containerName The name of the Container upon which Proxies
+ * from the returned ProxyFactory will invoke
+ * @param containerGuid The globally-unique name of the container
+ * @param smd The metadata representing this Session EJB
+ * @param cl The ClassLoader for this EJB Container
+ * @param advisor The Advisor for proxies created by this factory
+ */
+ protected abstract ProxyFactory createLocalProxyFactory(final String name, final String containerName,
+ final String containerGuid, final JBossSessionBeanMetaData smd, final ClassLoader cl, final Advisor advisor);
+
+ /**
+ * Creates and returns a new remote proxy factory for this Session Bean
+ *
+ * @param name The unique name for the ProxyFactory
+ * @param containerName The name of the Container upon which Proxies
+ * from the returned ProxyFactory will invoke
+ * @param containerGuid The globally-unique name of the container
+ * @param smd The metadata representing this Session EJB
+ * @param cl The ClassLoader for this EJB Container
+ * @param url The URL to use for Remoting
+ * @param advisor The Advisor for proxies created by this factory
+ * @param interceptorStackName The name of the client-side interceptor stack to use.
+ * If null the default will apply.
+ */
+ protected abstract ProxyFactory createRemoteProxyFactory(final String name, final String containerName,
+ final String containerGuid, final JBossSessionBeanMetaData smd, final ClassLoader cl, final String url,
+ final Advisor advisor, final String interceptorStackName);
+
+ // --------------------------------------------------------------------------------||
+ // Helper Methods -----------------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ /**
+ * Creates a new <code>Reference</code> whose <code>classname</code> is
+ * the given <code>referenceName</code> and whose <code>classFactory</code>
+ * is {@link #getSessionProxyObjectFactoryType()}, adding
+ * the requisite Registry key for the ProxyFactory and the requisite
+ * target EJB Container Name as ReferenceAddresses.
+ */
+ protected Reference createStandardReference(String referenceName, String proxyFactoryRegistryKey,
+ String containerName, boolean isLocal)
+ {
+ Reference ref = new Reference(referenceName, this.getSessionProxyObjectFactoryType(), null);
+
+ // Add the Proxy Factory Registry key for this Reference
+ assert proxyFactoryRegistryKey != null && !proxyFactoryRegistryKey.trim().equals("") : "Proxy Factory Registry key is required but not supplied";
+ String proxyFactoryRefType = ProxyFactoryReferenceAddressTypes.REF_ADDR_TYPE_PROXY_FACTORY_REGISTRY_KEY;
+ RefAddr proxyFactoryRefAddr = new StringRefAddr(proxyFactoryRefType, proxyFactoryRegistryKey);
+ ref.add(proxyFactoryRefAddr);
+ log.debug("Adding " + RefAddr.class.getSimpleName() + " to " + Reference.class.getSimpleName() + ": Type \""
+ + proxyFactoryRefType + "\", Content \"" + proxyFactoryRegistryKey + "\"");
+
+ // Add the Container name for this Reference
+ assert containerName != null && !containerName.trim().equals("") : "Container Name is required but not supplied";
+ String ejbContainerRefType = ProxyFactoryReferenceAddressTypes.REF_ADDR_TYPE_EJBCONTAINER_NAME;
+ RefAddr containerRefAddr = new StringRefAddr(ejbContainerRefType, containerName);
+ ref.add(containerRefAddr);
+ log.debug("Adding " + RefAddr.class.getSimpleName() + " to " + Reference.class.getSimpleName() + ": Type \""
+ + ejbContainerRefType + "\", Content \"" + containerName + "\"");
+
+ // Add a RefAddr to mark local/remote
+ String isLocalRefAddrType = ProxyFactoryReferenceAddressTypes.REF_ADDR_TYPE_IS_LOCAL;
+ RefAddr isLocalRefAddr = new StringRefAddr(isLocalRefAddrType, Boolean.toString(isLocal));
+ ref.add(isLocalRefAddr);
+
+ // Return
+ return ref;
+ }
+
+ protected void bind(final Context context, final JndiReferenceBindingSet bindings, final boolean useRebind,
+ final boolean bindLocals)
+ {
+ // Initialize
+ Collection<JndiReferenceBinding> addressesToBind = new ArrayList<JndiReferenceBinding>();
+ StringBuffer sb = new StringBuffer();
+ sb.append("Binding the following Entries in Global JNDI:\n\n");
+
+ for (JndiReferenceBinding binding : bindings.getDefaultRemoteBindings())
+ {
+ sb.append("\t");
+ sb.append(binding.getJndiName());
+ sb.append(" - EJB3.x Default Remote Business Interface\n");
+ addressesToBind.add(binding);
+ }
+
+ for (JndiReferenceBinding binding : bindings.getHomeRemoteBindings())
+ {
+ sb.append("\t");
+ sb.append(binding.getJndiName());
+ sb.append(" - EJB2.x Remote Home Interface\n");
+ addressesToBind.add(binding);
+ }
+
+ for (Set<JndiReferenceBinding> businessBindings : bindings.getBusinessRemoteBindings().values())
+ {
+ for (JndiReferenceBinding binding : businessBindings)
+ {
+ sb.append("\t");
+ sb.append(binding.getJndiName());
+ sb.append(" - EJB3.x Remote Business Interface\n");
+ addressesToBind.add(binding);
+ }
+ }
+
+ if (bindLocals)
+ {
+ for (JndiReferenceBinding binding : bindings.getDefaultLocalBindings())
+ {
+ sb.append("\t");
+ sb.append(binding.getJndiName());
+ sb.append(" - EJB3.x Default Local Business Interface\n");
+ addressesToBind.add(binding);
+ }
+
+ for (JndiReferenceBinding binding : bindings.getHomeLocalBindings())
+ {
+ sb.append("\t");
+ sb.append(binding.getJndiName());
+ sb.append(" - EJB2.x Local Home Interface\n");
+ addressesToBind.add(binding);
+ }
+
+ for (Set<JndiReferenceBinding> businessBindings : bindings.getBusinessLocalBindings().values())
+ {
+ for (JndiReferenceBinding binding : businessBindings)
+ {
+ sb.append("\t");
+ sb.append(binding.getJndiName());
+ sb.append(" - EJB3.x Local Business Interface\n");
+ addressesToBind.add(binding);
+ }
+ }
+ }
+
+ // Log
+ log.info(sb.toString());
+
+ // Bind all addresses
+ for (JndiReferenceBinding binding : addressesToBind)
+ {
+ bind(context, binding, useRebind);
+ }
+ }
+
+ protected void bind(Context context, JndiReferenceBinding binding, boolean useRebind)
+ {
+ if (binding != null)
+ {
+ if (useRebind)
+ rebind(context, binding.getJndiName(), binding.getReference());
+ else
+ bind(context, binding.getJndiName(), binding.getReference());
+ }
+ }
+
+ /**
+ * Binds the specified Reference into JNDI at the specified address
+ *
+ * @param context The JNDI Context to use
+ * @param address the address
+ * @param ref the reference to bind
+ */
+ protected void bind(Context context, String address, Reference ref)
+ {
+ try
+ {
+ Util.bind(context, address, ref);
+ log.debug("Bound " + ref.getClass().getName() + " into JNDI at \"" + address + "\"");
+ }
+ catch (NamingException e)
+ {
+ throw new RuntimeException("Could not bind " + ref + " into JNDI at \"" + address + "\"", e);
+ }
+ }
+
+ /**
+ * Re-binds the specified Reference into JNDI at the specified address
+ *
+ * @param context The JNDI Context to use
+ * @param address the address
+ * @param object the object to bind
+ */
+ protected void rebind(Context context, String address, Reference ref)
+ {
+ try
+ {
+ Util.rebind(context, address, ref);
+ log.debug("Bound " + ref.getClass().getName() + " into JNDI at \"" + address + "\"");
+ }
+ catch (NamingException e)
+ {
+ throw new RuntimeException("Could not bind " + ref + " into JNDI at \"" + address + "\"", e);
+ }
+ }
+
+ /**
+ * Unbinds the specified address from JNDI
+ *
+ * @param context The JNDI Context to use
+ * @param address
+ */
+ protected void unbind(Context context, String address)
+ {
+ // Unbind
+ try
+ {
+ Util.unbind(context, address);
+ }
+ catch (NameNotFoundException nnfe)
+ {
+ // Swallow, who cares? :)
+ }
+ catch (NamingException e)
+ {
+ throw new RuntimeException("Could not unbind \"" + address + "\" from JNDI", e);
+ }
+ }
+
+ /**
+ * Returns whether the business interfaces and EJB2.x Home should be bound to
+ * the same JNDI Name
+ *
+ * @param smd
+ * @param isLocal
+ * @return
+ */
+ protected boolean isHomeAndBusinessBoundTogether(JBossSessionBeanMetaData smd, boolean isLocal)
+ {
+ // Initialize
+ boolean bindTogether = false;
+
+ // If local
+ if (isLocal)
+ {
+ // If no local home defined
+ if (smd.getLocalHome() == null)
+ {
+ // Not bound together
+ return false;
+ }
+
+ // If no business locals defined
+ BusinessLocalsMetaData businessLocals = smd.getBusinessLocals();
+ if (businessLocals == null || businessLocals.size() == 0)
+ {
+ // Not bound together
+ return false;
+ }
+
+ // Bind together if Local Default JNDI Name == Local Home JNDI Name
+ bindTogether = smd.getLocalJndiName().equals(smd.getLocalHomeJndiName());
+ }
+ // If Remote
+ else
+ {
+ // If no home defined
+ if (smd.getHome() == null)
+ {
+ // Not bound together
+ return false;
+ }
+
+ // If no business remotes defined
+ BusinessRemotesMetaData businessRemotes = smd.getBusinessRemotes();
+ if (businessRemotes == null || businessRemotes.size() == 0)
+ {
+ // Not bound together
+ return false;
+ }
+
+ // Bind together if Remote Default JNDI Name == Remote Home JNDI Name
+ bindTogether = smd.getJndiName().equals(smd.getHomeJndiName());
+ }
+
+ // Return
+ return bindTogether;
+ }
+
+ /**
+ * Creates and returns a new RefAddr to flag the proper
+ * InvokerLocator URL used by remoting for the EJB represented
+ * by the specified metadata
+ *
+ * @param clientBindUrl
+ * @return
+ */
+ protected RefAddr createRemotingRefAddr(String clientBindUrl)
+ {
+ assert clientBindUrl != null && clientBindUrl.trim().toString().length() != 0 : InvokerLocator.class
+ .getSimpleName()
+ + " URL must be defined, and is unspecified";
+ RefAddr refAddr = new StringRefAddr(ProxyFactoryReferenceAddressTypes.REF_ADDR_TYPE_INVOKER_LOCATOR_URL,
+ clientBindUrl);
+
+ // Return
+ return refAddr;
+ }
+
+ /**
+ * Returns the name of the unique key under which a Proxy Factory will
+ * be registered. Will follow form:
+ *
+ * ProxyFactory/{ejbName}/{jndiName}
+ *
+ * @param jndiName
+ * @param smd
+ * @param isLocal
+ */
+ public String getProxyFactoryRegistryKey(String jndiName, JBossSessionBeanMetaData smd, boolean isLocal)
+ {
+ // Initialize
+ String suffix = null;
+
+ // Set Suffix
+ suffix = jndiName;
+
+ // Ensure suffix is specified
+ assert suffix != null && !suffix.equals("") : ProxyFactory.class.getSimpleName()
+ + " key prefix for binding to registry is not specified";
+
+ // Assemble and return
+ String key = JndiSessionRegistrarBase.KEY_PREFIX_PROXY_FACTORY_REGISTRY + smd.getEjbName() + "/" + suffix;
+ return key;
+ }
+
+ /**
+ * Makes a comma-delimited list of interfaces bound for setting the
+ * Classname of the Reference. This will show up in JNDIView and make
+ * it clear to application developers what will be castable from the lookup result
+ *
+ * @param refAddrs
+ * @return
+ */
+ protected String getHumanReadableListOfInterfacesInRefAddrs(List<RefAddr> refAddrs)
+ {
+ // Make a Comma-delimited list of interfaces bound for setting the Classname of the Reference
+ // This will show up in JNDIView and make it clear to application developers
+ // what will be castable from the lookup result
+ StringBuffer defaultRemotes = new StringBuffer();
+ int remotesCount = 0;
+ int interfaceCount = 0;
+ for (RefAddr refAddr : refAddrs)
+ {
+ remotesCount++;
+ String refAddrType = refAddr.getType();
+ if (isRefAddrTypeEjbInterface(refAddrType))
+ {
+ if (interfaceCount > 0)
+ {
+ defaultRemotes.append(", ");
+ }
+ defaultRemotes.append(refAddr.getContent());
+ interfaceCount++;
+ }
+ }
+ return defaultRemotes.toString();
+ }
+
+ /**
+ * Returns whether the specified RefAddr type denotes an EJB Interface
+ *
+ * @param refAddrType
+ * @return
+ */
+ private boolean isRefAddrTypeEjbInterface(String refAddrType)
+ {
+ return refAddrType.equals(ProxyFactoryReferenceAddressTypes.REF_ADDR_TYPE_PROXY_BUSINESS_INTERFACE_LOCAL)
+ || refAddrType.equals(ProxyFactoryReferenceAddressTypes.REF_ADDR_TYPE_PROXY_BUSINESS_INTERFACE_REMOTE)
+ || refAddrType.equals(ProxyFactoryReferenceAddressTypes.REF_ADDR_TYPE_PROXY_EJB2x_INTERFACE_HOME_LOCAL)
+ || refAddrType.equals(ProxyFactoryReferenceAddressTypes.REF_ADDR_TYPE_PROXY_EJB2x_INTERFACE_HOME_REMOTE);
+ }
+
+ /**
+ * Registers the specified proxy factory into the registry
+ *
+ * @param name The unique name for the ProxyFactory
+ * @param factory
+ * @param smd Metadata describing the EJB
+ */
+ protected void registerProxyFactory(String name, ProxyFactory factory, JBossEnterpriseBeanMetaData smd)
+ throws DuplicateBindException
+ {
+ // Register
+ log.debug("Registering " + factory + " under key \"" + name + "\"...");
+ try
+ {
+ Ejb3RegistrarLocator.locateRegistrar().bind(name, factory);
+ }
+ catch (DuplicateBindException e)
+ {
+ /*
+ * Note on registry key collisions:
+ *
+ * Indicates that either the keys created are not unique or that we're attempting to redeploy
+ * an EJB that was not properly deregistered. Either way, this is a programmatic problem
+ * and not the fault of the bean provider/developer/deployer
+ */
+
+ throw new DuplicateBindException("Could not register " + factory + " under an already registered key, \""
+ + name + "\"", e);
+ }
+ }
+
+ /**
+ * Deregisters the proxy factory with the specified name from the registry
+ *
+ * @param name
+ */
+ protected void deregisterProxyFactory(String name)
+ {
+ // Log
+ log.debug("Deregistering " + ProxyFactory.class.getSimpleName() + " under name \"" + name + "\"");
+
+ // Deregister
+ try
+ {
+ Ejb3RegistrarLocator.locateRegistrar().unbind(name);
+ }
+ catch (NotBoundException nbe)
+ {
+ // Swallow, already deregistered
+ }
+
+ // EJBTHREE-1473
+ // Deregister with AOP if registered
+ //TODO This should probably be in a cleaner location, ie.
+ // implement a callback for AOP Registration/Deregistration
+ // that decouples JNDI Registration and abstracts whether
+ // a Proxy Factory is Remote or not
+ if (Dispatcher.singleton.isRegistered(name))
+ {
+ Dispatcher.singleton.unregisterTarget(name);
+ }
+ }
+
+ // --------------------------------------------------------------------------------||
+ // Accessors / Mutators -----------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ public String getSessionProxyObjectFactoryType()
+ {
+ return sessionProxyObjectFactoryType;
+ }
+
+ public void setSessionProxyObjectFactoryType(String sessionProxyObjectFactoryType)
+ {
+ this.sessionProxyObjectFactoryType = sessionProxyObjectFactoryType;
+ }
+
+}
Added: projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/jndiregistrar/JndiStatefulSessionRegistrar.java
===================================================================
--- projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/jndiregistrar/JndiStatefulSessionRegistrar.java (rev 0)
+++ projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/jndiregistrar/JndiStatefulSessionRegistrar.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -0,0 +1,119 @@
+/*
+ * 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.proxy.impl.jndiregistrar;
+
+import org.jboss.aop.Advisor;
+import org.jboss.aop.Dispatcher;
+import org.jboss.ejb3.proxy.impl.factory.ProxyFactory;
+import org.jboss.ejb3.proxy.impl.factory.session.stateful.StatefulSessionLocalProxyFactory;
+import org.jboss.ejb3.proxy.impl.factory.session.stateful.StatefulSessionRemoteProxyFactory;
+import org.jboss.logging.Logger;
+import org.jboss.metadata.ejb.jboss.JBossSessionBeanMetaData;
+
+/**
+ * JndiStatefulSessionRegistrar
+ *
+ * Responsible for binding of ObjectFactories and
+ * creation/registration of associated ProxyFactories,
+ * centralizing operations for SFSB Implementations
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+public class JndiStatefulSessionRegistrar extends JndiSessionRegistrarBase
+{
+
+ // --------------------------------------------------------------------------------||
+ // Class Members ------------------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ private static final Logger log = Logger.getLogger(JndiStatefulSessionRegistrar.class);
+
+ // --------------------------------------------------------------------------------||
+ // Constructor --------------------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ /**
+ * Creates a JNDI Registrar from the specified configuration properties, none of
+ * which may be null.
+ *
+ * @param statelessSessionProxyObjectFactoryType String representation of the JNDI Object Factory to use for SLSBs
+ */
+ public JndiStatefulSessionRegistrar(String statelessSessionProxyObjectFactoryType)
+ {
+ super(statelessSessionProxyObjectFactoryType);
+ }
+
+ // --------------------------------------------------------------------------------||
+ // Required Implementations -------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ /**
+ * Creates and returns a new local proxy factory for this SFSB
+ *
+ * @param name The unique name for the ProxyFactory
+ * @param containerName The name of the Container upon which Proxies
+ * from the returned ProxyFactory will invoke
+ * @param containerGuid The globally-unique name of the container
+ * @param smd The metadata representing this SFSB
+ * @param cl The ClassLoader for this EJB Container
+ * @param advisor The Advisor for proxies created by this factory
+ */
+ @Override
+ protected ProxyFactory createLocalProxyFactory(final String name, final String containerName,
+ final String containerGuid, final JBossSessionBeanMetaData smd, final ClassLoader cl, final Advisor advisor)
+ {
+ return new StatefulSessionLocalProxyFactory(name, containerName, containerGuid, smd, cl, advisor);
+ }
+
+ /**
+ * Creates and returns a new remote proxy factory for this SFSB
+ *
+ * @param name The unique name for the ProxyFactory
+ * @param containerName The name of the Container upon which Proxies
+ * from the returned ProxyFactory will invoke
+ * @param containerGuid The globally-unique name of the container
+ * @param smd The metadata representing this SFSB
+ * @param cl The ClassLoader for this EJB Container
+ * @param url The URL to use for Remoting
+ * @param advisor The Advisor for proxies created by this factory
+ * @param interceptorStackName The name of the client-side interceptor stack to use.
+ * If null the default will apply.
+ */
+ @Override
+ protected ProxyFactory createRemoteProxyFactory(final String name, final String containerName,
+ final String containerGuid, final JBossSessionBeanMetaData smd, final ClassLoader cl, final String url,
+ final Advisor advisor, final String interceptorStackName)
+ {
+ // Create
+ ProxyFactory factory = new StatefulSessionRemoteProxyFactory(name, containerName, containerGuid, smd, cl, url,
+ advisor, interceptorStackName);
+
+ // Register with Remoting
+ log.debug("Registering with Remoting Dispatcher under name \"" + factory.getName() + "\": " + factory);
+ Dispatcher.singleton.registerTarget(factory.getName(), factory);
+
+ // Return
+ return factory;
+ }
+
+}
Added: projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/jndiregistrar/JndiStatelessSessionRegistrar.java
===================================================================
--- projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/jndiregistrar/JndiStatelessSessionRegistrar.java (rev 0)
+++ projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/jndiregistrar/JndiStatelessSessionRegistrar.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -0,0 +1,119 @@
+/*
+ * 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.proxy.impl.jndiregistrar;
+
+import org.jboss.aop.Advisor;
+import org.jboss.aop.Dispatcher;
+import org.jboss.ejb3.proxy.impl.factory.ProxyFactory;
+import org.jboss.ejb3.proxy.impl.factory.session.stateless.StatelessSessionLocalProxyFactory;
+import org.jboss.ejb3.proxy.impl.factory.session.stateless.StatelessSessionRemoteProxyFactory;
+import org.jboss.logging.Logger;
+import org.jboss.metadata.ejb.jboss.JBossSessionBeanMetaData;
+
+/**
+ * JndiStatelessSessionRegistrar
+ *
+ * Responsible for binding of ObjectFactories and
+ * creation/registration of associated ProxyFactories,
+ * centralizing operations for SLSB Implementations
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+public class JndiStatelessSessionRegistrar extends JndiSessionRegistrarBase
+{
+ // --------------------------------------------------------------------------------||
+ // Class Members ------------------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ private static final Logger log = Logger.getLogger(JndiStatelessSessionRegistrar.class);
+
+ // --------------------------------------------------------------------------------||
+ // Constructor --------------------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ /**
+ * Creates a JNDI Registrar from the specified configuration properties, none of
+ * which may be null.
+ *
+ * @param statelessSessionProxyObjectFactoryType String representation of the JNDI Object Factory to use for SLSBs
+ */
+ public JndiStatelessSessionRegistrar(String statelessSessionProxyObjectFactoryType)
+ {
+ super(statelessSessionProxyObjectFactoryType);
+ }
+
+ // --------------------------------------------------------------------------------||
+ // Required Implementations -------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ /**
+ * Creates and returns a new local proxy factory for this SLSB
+ *
+ * @param name The unique name for the ProxyFactory
+ * @param containerName The name of the Container upon which Proxies
+ * from the returned ProxyFactory will invoke
+ * @param containerGuid The globally-unique name of the container
+ * @param containerGuid The globally-unique name of the container
+ * @param smd The metadata representing this SLSB
+ * @param cl The ClassLoader for this EJB Container
+ * @param advisor The Advisor for proxies created by this factory
+ */
+ @Override
+ protected ProxyFactory createLocalProxyFactory(final String name, final String containerName,
+ final String containerGuid, final JBossSessionBeanMetaData smd, final ClassLoader cl, final Advisor advisor)
+ {
+ return new StatelessSessionLocalProxyFactory(name, containerName, containerGuid, smd, cl, advisor);
+ }
+
+ /**
+ * Creates and returns a new remote proxy factory for this Session Bean
+ *
+ * @param name The unique name for the ProxyFactory
+ * @param containerName The name of the Container upon which Proxies
+ * from the returned ProxyFactory will invoke
+ * @param containerGuid The globally-unique name of the container
+ * @param smd The metadata representing this Session EJB
+ * @param cl The ClassLoader for this EJB Container
+ * @param url The URL to use for Remoting
+ * @param advisor The Advisor for proxies created by this factory
+ * @param interceptorStackName The name of the client-side interceptor stack to use.
+ * If null the default will apply.
+ */
+ @Override
+ protected ProxyFactory createRemoteProxyFactory(final String name, final String containerName,
+ final String containerGuid, final JBossSessionBeanMetaData smd, final ClassLoader cl, final String url,
+ final Advisor advisor, final String interceptorStackName)
+ {
+ // Create
+ ProxyFactory factory = new StatelessSessionRemoteProxyFactory(name, containerName, containerGuid, smd, cl, url,
+ advisor, interceptorStackName);
+
+ // Register with Remoting
+ log.debug("Registering with Remoting Dispatcher under name \"" + factory.getName() + "\": " + factory);
+ Dispatcher.singleton.registerTarget(factory.getName(), factory);
+
+ // Return
+ return factory;
+ }
+
+}
Added: projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/objectfactory/Ejb3RegistrarProxyObjectFactory.java
===================================================================
--- projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/objectfactory/Ejb3RegistrarProxyObjectFactory.java (rev 0)
+++ projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/objectfactory/Ejb3RegistrarProxyObjectFactory.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -0,0 +1,59 @@
+/*
+ * 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.proxy.impl.objectfactory;
+
+import java.io.Serializable;
+
+import javax.naming.spi.ObjectFactory;
+
+import org.jboss.logging.Logger;
+
+/**
+ * Ejb3RegistrarProxyObjectFactory
+ *
+ * A Proxy Object Factory using an underlying
+ * Proxy Factory Registry intended to be obtained
+ * as a managed object from the Object Store
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+public abstract class Ejb3RegistrarProxyObjectFactory extends ProxyObjectFactory implements ObjectFactory, Serializable
+{
+ // --------------------------------------------------------------------------------||
+ // Class Members ------------------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ private static final long serialVersionUID = 1L;
+
+ private static final Logger log = Logger.getLogger(Ejb3RegistrarProxyObjectFactory.class);
+
+ // --------------------------------------------------------------------------------||
+ // Constructor --------------------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ public Ejb3RegistrarProxyObjectFactory()
+ {
+
+ }
+
+}
Added: projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/objectfactory/ProxyFactoryReferenceAddressTypes.java
===================================================================
--- projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/objectfactory/ProxyFactoryReferenceAddressTypes.java (rev 0)
+++ projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/objectfactory/ProxyFactoryReferenceAddressTypes.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -0,0 +1,92 @@
+/*
+ * 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.proxy.impl.objectfactory;
+
+/**
+ * ProxyFactoryReferenceAddressTypes
+ *
+ * This interface defines the key constants used as
+ * valid factory reference address types expected by the
+ * ProxyObjectFactory
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+public interface ProxyFactoryReferenceAddressTypes
+{
+ // --------------------------------------------------------------------------------||
+ // Constants ----------------------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ /*
+ * The following are Reference Address Types denoting the type of interface
+ * represented by the contents, which should be the fully-qualified class
+ * name of the interface
+ */
+
+ /**
+ * Reference Address Type for EJB3 Remote Business Interfaces
+ */
+ String REF_ADDR_TYPE_PROXY_BUSINESS_INTERFACE_REMOTE = "Remote Business Interface";
+
+ /**
+ * Reference Address Type for EJB3 Local Business Interfaces
+ */
+ String REF_ADDR_TYPE_PROXY_BUSINESS_INTERFACE_LOCAL = "Local Business Interface";
+
+ /**
+ * Reference Address Type for EJB2.x Remote Home Interfaces
+ */
+ String REF_ADDR_TYPE_PROXY_EJB2x_INTERFACE_HOME_REMOTE = "EJB 2.x Remote Home Interface";
+
+ /**
+ * Reference Address Type for EJB2.x Local Home Interfaces
+ */
+ String REF_ADDR_TYPE_PROXY_EJB2x_INTERFACE_HOME_LOCAL = "EJB 2.x Local Home Interface";
+
+ /*
+ * The following are Reference Address Types denoting metadata
+ * used for interaction with the ProxyFactoryRegistry
+ */
+
+ /**
+ * Reference Address Type for the key to which the desired ProxyFactory
+ * is bound
+ */
+ String REF_ADDR_TYPE_PROXY_FACTORY_REGISTRY_KEY = "ProxyFactoryKey";
+
+ /*
+ * The following are ReferenceAddress types denoting the Name of the EJB Container associated
+ * with a Reference
+ */
+
+ String REF_ADDR_TYPE_EJBCONTAINER_NAME = "EJB Container Name";
+
+ /*
+ * The following are Reference Address Types used in Remoting
+ */
+
+ String REF_ADDR_TYPE_INVOKER_LOCATOR_URL = "Remoting Host URL";
+
+ String REF_ADDR_TYPE_IS_LOCAL = "Proxy Factory is Local";
+
+}
Added: projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/objectfactory/ProxyObjectFactory.java
===================================================================
--- projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/objectfactory/ProxyObjectFactory.java (rev 0)
+++ projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/objectfactory/ProxyObjectFactory.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -0,0 +1,452 @@
+/*
+ * 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.proxy.impl.objectfactory;
+
+import java.io.Serializable;
+import java.lang.reflect.InvocationHandler;
+import java.lang.reflect.Proxy;
+import java.util.ArrayList;
+import java.util.Enumeration;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Hashtable;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import javax.naming.Context;
+import javax.naming.Name;
+import javax.naming.RefAddr;
+import javax.naming.Reference;
+import javax.naming.spi.ObjectFactory;
+
+import org.jboss.aop.advice.Interceptor;
+import org.jboss.aspects.remoting.InvokeRemoteInterceptor;
+import org.jboss.aspects.remoting.PojiProxy;
+import org.jboss.ejb3.common.registrar.spi.Ejb3Registrar;
+import org.jboss.ejb3.common.registrar.spi.Ejb3RegistrarLocator;
+import org.jboss.ejb3.common.registrar.spi.NotBoundException;
+import org.jboss.ejb3.proxy.impl.factory.ProxyFactory;
+import org.jboss.ejb3.proxy.impl.remoting.IsLocalProxyFactoryInterceptor;
+import org.jboss.logging.Logger;
+import org.jboss.remoting.InvokerLocator;
+
+/**
+ * ProxyObjectFactory
+ *
+ * Base upon which Proxy Object Factories may build. Defines
+ * abstractions to:
+ *
+ * <ul>
+ * <li>Obtain a proxy based on metadata received
+ * from Reference Address information associated with the bound
+ * Reference</li>
+ * <li>Use a pluggable ProxyFactoryRegistry</li>
+ * </ul>
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+public abstract class ProxyObjectFactory implements ObjectFactory, Serializable
+{
+ // --------------------------------------------------------------------------------||
+ // Class Members ------------------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * Logger
+ */
+ private static final Logger log = Logger.getLogger(ProxyObjectFactory.class.getName());
+
+ // --------------------------------------------------------------------------------||
+ // Required Implementations ------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ /**
+ * Returns an appropriate Proxy based on the Reference Address information
+ * associated with the Reference (obj) bound at name in the specified nameCtx with
+ * specified environment.
+ *
+ * @see javax.naming.spi.ObjectFactory#getObjectInstance(java.lang.Object,
+ * javax.naming.Name, javax.naming.Context, java.util.Hashtable)
+ */
+ public Object getObjectInstance(Object obj, Name name, Context nameCtx, Hashtable<?, ?> environment)
+ throws Exception
+ {
+ // Log
+ log.debug(ProxyObjectFactory.class.getName() + " servicing request for " + name.toString());
+
+ // Cast Reference
+ assert (Reference.class.isAssignableFrom(obj.getClass())) : "Object bound at " + name.toString()
+ + " was not of expected type " + Reference.class.getName();
+ Reference ref = (Reference) obj;
+
+ // Get a useful object for handling Reference Addresses
+ Map<String, List<String>> refAddrs = this.getReferenceAddresses(ref);
+
+ // Obtain the key used for looking up the appropriate ProxyFactory in the Registry
+ String proxyFactoryRegistryKey = this.getSingleRequiredReferenceAddressValue(name, refAddrs,
+ ProxyFactoryReferenceAddressTypes.REF_ADDR_TYPE_PROXY_FACTORY_REGISTRY_KEY);
+
+ /*
+ * Obtain the Proxy Factory either
+ * locally via the Ejb3Registry, or
+ * via the remote Dispatcher
+ */
+
+ // Obtain Proxy Factory
+ ProxyFactory proxyFactory = null;
+
+ // Determine if Remote or Local (EJBTHREE-1403)
+ String isLocalStringFromRefAddr = this.getSingleRequiredReferenceAddressValue(name, refAddrs,
+ ProxyFactoryReferenceAddressTypes.REF_ADDR_TYPE_IS_LOCAL);
+ assert isLocalStringFromRefAddr != null && isLocalStringFromRefAddr.trim().length() > 0 : "Required "
+ + RefAddr.class.getSimpleName() + " \"" + ProxyFactoryReferenceAddressTypes.REF_ADDR_TYPE_IS_LOCAL
+ + "\" was not found at JNDI Name " + name;
+ boolean isLocal = new Boolean(isLocalStringFromRefAddr);
+
+ // If this is local
+ if (isLocal)
+ {
+ try
+ {
+ // Get local EJB3 Registrar
+ Ejb3Registrar registrar = Ejb3RegistrarLocator.locateRegistrar();
+
+ Object pfObj = registrar.lookup(proxyFactoryRegistryKey);
+ assert pfObj != null : ProxyFactory.class.getName() + " from key " + proxyFactoryRegistryKey + " was null";
+ assert pfObj instanceof ProxyFactory : " Object obtained from key " + proxyFactoryRegistryKey
+ + " was expected to be of type " + ProxyFactory.class.getName() + " but was instead " + pfObj;
+ proxyFactory = (ProxyFactory) pfObj;
+ }
+ // BES 2008/08/22 -- a NotBoundException doesn't mean failure, just
+ // means the container isn't deployed in this server. So don't catch it
+ // in an inner try/catch; let it propagate to the outer catch.
+ catch (NotBoundException nbe)
+ {
+ proxyFactory = createProxyFactoryProxy(name, refAddrs, proxyFactoryRegistryKey);
+ }
+ }
+ // Registrar is not local, so use Remoting to Obtain Proxy Factory
+ else
+ {
+ proxyFactory = createProxyFactoryProxy(name, refAddrs, proxyFactoryRegistryKey);
+ }
+
+ // Get the proxy returned from the ProxyFactory
+ Object proxy = this.getProxy(proxyFactory, name, refAddrs);
+ assert proxy != null : "Proxy returned from " + proxyFactory + " was null.";
+
+ // Return the Proxy
+ return proxy;
+ }
+
+ /**
+ * Creates a remoting proxy to the proxy factory.
+ *
+ * @param name
+ * @param refAddrs
+ * @param proxyFactoryRegistryKey
+ * @return
+ * @throws Exception
+ */
+ protected ProxyFactory createProxyFactoryProxy(Name name, Map<String, List<String>> refAddrs,
+ String proxyFactoryRegistryKey) throws Exception
+ {
+ // Obtain the URL for invoking upon the Registry
+ String url = this.getSingleReferenceAddressValue(name, refAddrs,
+ ProxyFactoryReferenceAddressTypes.REF_ADDR_TYPE_INVOKER_LOCATOR_URL);
+
+ // Create an InvokerLocator
+ assert url != null && url.trim().length() != 0 : InvokerLocator.class.getSimpleName()
+ + " URL is required, but is not specified; improperly bound reference "
+ + "in JNDI or looking up local Proxy from Remote JVM";
+ if (url == null || url.trim().length() == 0)
+ {
+ throw new RuntimeException("Could not find " + InvokerLocator.class.getSimpleName()
+ + " URL at JNDI address \"" + name + "\"; looking up local Proxy from Remote JVM?");
+ }
+ InvokerLocator locator = new InvokerLocator(url);
+
+ // Create a POJI Proxy to the Registrar
+ Interceptor[] interceptors =
+ {IsLocalProxyFactoryInterceptor.singleton, InvokeRemoteInterceptor.singleton};
+ PojiProxy handler = new PojiProxy(proxyFactoryRegistryKey, locator, interceptors);
+ Class<?>[] interfaces = new Class<?>[]
+ {this.getProxyFactoryClass()};
+
+ return (ProxyFactory) Proxy.newProxyInstance(interfaces[0].getClassLoader(), interfaces, handler);
+ }
+
+ /**
+ * Obtains the single value of the specified type as obtained from the specified reference
+ * addresses bound at the specified Name. Asserts that the value exists and is the only one
+ * for the specified type.
+ *
+ * @param name
+ * @param referenceAddresses
+ * @param refAddrType
+ * @return
+ */
+ protected String getSingleRequiredReferenceAddressValue(Name name, Map<String, List<String>> referenceAddresses,
+ String refAddrType)
+ {
+ // Get the value
+ String value = this.getSingleReferenceAddressValue(name, referenceAddresses, refAddrType);
+ assert (value != null && !value.trim().equals("")) : "Exactly one " + RefAddr.class.getSimpleName() + " of type "
+ + refAddrType + " must be defined for Name " + name.toString() + ", none found";
+
+ // Return
+ return value;
+ }
+
+ /**
+ * Obtains the single value of the specified type as obtained from the specified reference
+ * addresses bound at the specified Name. Asserts that the value exists and is the only one
+ * for the specified type.
+ *
+ * @param name
+ * @param referenceAddresses
+ * @param refAddrType
+ * @return
+ */
+ protected String getSingleReferenceAddressValue(Name name, Map<String, List<String>> referenceAddresses,
+ String refAddrType)
+ {
+ // Get the values
+ List<String> values = referenceAddresses.get(refAddrType);
+ assert values == null || values.size() == 1 : "Only one " + RefAddr.class.getSimpleName() + " of type "
+ + refAddrType + " may be defined, instead found: " + values;
+ String value = null;
+ if (values != null)
+ {
+ value = values.get(0).trim();
+ }
+
+ // Return
+ return value;
+ }
+
+ /**
+ * Looks to the metadata specified by the reference addresses to determine if
+ * an EJB3 Business View is defined here. Additionally checks that both local
+ * and remote business interfaces are not bound to the same JNDI Address
+ *
+ * @param name
+ * @param referenceAddresses
+ * @return
+ */
+ protected boolean hasBusiness(Name name, Map<String, List<String>> referenceAddresses)
+ {
+ // Initialize
+ boolean hasBusiness = false;
+
+ // Obtain metadata
+ boolean hasLocalBusiness = this.hasLocalBusiness(referenceAddresses);
+ boolean hasRemoteBusiness = this.hasRemoteBusiness(referenceAddresses);
+
+ // Ensure both local and remote home are not specified here
+ String errorMessage = "ObjectFactory at JNDI \"" + name.toString()
+ + "\" contains references to both local and remote business interfaces";
+ assert !(hasLocalBusiness && hasRemoteBusiness) : errorMessage;
+ if (hasLocalBusiness && hasRemoteBusiness)
+ {
+ throw new RuntimeException(errorMessage);
+ }
+
+ // Set
+ hasBusiness = hasLocalBusiness || hasRemoteBusiness;
+
+ // Return
+ return hasBusiness;
+
+ }
+
+ /**
+ * If the specified proxy has been defined outside of
+ * this naming Context's ClassLoader, it must be reconstructed
+ * using the TCL so we avoid CCE. This is especially vital using
+ * a scope ClassLoader (ie. has defined by Servlet spec during Web Injection)
+ *
+ * @param proxy
+ */
+ protected Object redefineProxyInTcl(Object proxy)
+ {
+ /*
+ * We've got to ensure that the Proxy will be assignable to the target
+ * within this CL
+ */
+
+ // Get the TCL
+ ClassLoader tcl = Thread.currentThread().getContextClassLoader();
+
+ // Get the Proxy's CL
+ ClassLoader proxyCl = proxy.getClass().getClassLoader();
+
+ // If the classloaders are not equal
+ if (tcl != proxyCl)
+ {
+ /*
+ * Reconstruct/redefine the Proxy in our CL
+ */
+
+ // Get the Proxy Class
+ Class<?> proxyClass = proxy.getClass();
+
+ // Ensure we've got a Proxy
+ assert Proxy.isProxyClass(proxyClass) : "Assumed Proxy is not an instance of " + Proxy.class.getName();
+
+ // Get the InvocationHandler
+ InvocationHandler handler = Proxy.getInvocationHandler(proxy);
+
+ // Get the Interfaces
+ Class<?>[] proxyInterfaces = proxyClass.getInterfaces();
+
+ // Make a Set to hold the redefined classes
+ Set<Class<?>> ourClInterfaces = new HashSet<Class<?>>();
+
+ // For each interface defined by the Proxy
+ for (Class<?> proxyInterface : proxyInterfaces)
+ {
+ // Get the FQN
+ String proxyInterfaceName = proxyInterface.getName();
+
+ // Redefine the class in our CL
+ Class<?> ourDefinedProxyInterface = null;
+ try
+ {
+ ourDefinedProxyInterface = Class.forName(proxyInterfaceName, false, tcl);
+ }
+ catch (ClassNotFoundException e)
+ {
+ throw new RuntimeException("Can not find interface declared by Proxy in our CL + " + tcl, e);
+ }
+
+ // Add the Class to the Set
+ ourClInterfaces.add(ourDefinedProxyInterface);
+ }
+
+ // Redefine the Proxy in our CL
+ proxy = Proxy.newProxyInstance(tcl, ourClInterfaces.toArray(new Class<?>[]
+ {}), handler);
+
+ // Return the new Proxy
+ return proxy;
+ }
+ else
+ {
+ return proxy;
+ }
+ }
+
+ /**
+ * Determines if the specified metadata contains a type of local business
+ *
+ * @param referenceAddresses
+ * @return
+ */
+ protected boolean hasLocalBusiness(Map<String, List<String>> referenceAddresses)
+ {
+ return referenceAddresses
+ .containsKey(ProxyFactoryReferenceAddressTypes.REF_ADDR_TYPE_PROXY_BUSINESS_INTERFACE_LOCAL);
+ }
+
+ /**
+ * Determines if the specified metadata contains a type of remote business
+ *
+ * @param referenceAddresses
+ * @return
+ */
+ protected boolean hasRemoteBusiness(Map<String, List<String>> referenceAddresses)
+ {
+ return referenceAddresses
+ .containsKey(ProxyFactoryReferenceAddressTypes.REF_ADDR_TYPE_PROXY_BUSINESS_INTERFACE_REMOTE);
+ }
+
+ // --------------------------------------------------------------------------------||
+ // Specifications -----------------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ protected abstract Object getProxy(ProxyFactory proxyFactory, Name name, Map<String, List<String>> referenceAddresses);
+
+ /**
+ * Obtains the type or supertype used by proxy factories for this Object Factory
+ * @return
+ */
+ protected abstract Class<?> getProxyFactoryClass();
+
+ // --------------------------------------------------------------------------------||
+ // Internal Helper Methods --------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ /**
+ * Underlying Enumeration for handling Reference Addresses is clumsy (though ordered properly);
+ * iterate through and put in a useful form for this implementation
+ *
+ * @param ref
+ * @return A Map consisting of keys holding reference types, and values of
+ * Lists containing their contents
+ */
+ private Map<String, List<String>> getReferenceAddresses(Reference ref)
+ {
+
+ // Initialize and instanciate a more reasonable object for handling Reference Addresses
+ Map<String, List<String>> referenceAddresses = new HashMap<String, List<String>>();
+
+ // For all Reference Addresses
+ int count = 0;
+ Enumeration<RefAddr> refAddrs = ref.getAll();
+ while (refAddrs.hasMoreElements())
+ {
+ // Get the current Reference Address information
+ RefAddr refAddr = refAddrs.nextElement();
+ String type = refAddr.getType();
+ Class<?> expectedContentsType = String.class;
+ Object refAddrContent = refAddr.getContent();
+ assert (refAddrContent != null) : "Encountered Reference Address of type " + type + " but with null Content";
+ assert (expectedContentsType.isAssignableFrom(refAddrContent.getClass())) : "Content of Reference Address of type \""
+ + type + "\" at index " + count + " was not of expected Java type " + expectedContentsType.getName();
+ String content = (String) refAddr.getContent();
+
+ // If our map doesn't yet contain an entry for this type
+ if (!referenceAddresses.containsKey(type))
+ {
+ // Create an entry in the Map to hold the reference addresses
+ referenceAddresses.put(type, new ArrayList<String>());
+ }
+
+ // Place an entry for the contents at index "type"
+ referenceAddresses.get(type).add(content);
+ log.trace("Found reference type \"" + type + "\" with content \"" + content + "\"");
+
+ // Increase the internal counter
+ count++;
+ }
+
+ // Return
+ return referenceAddresses;
+
+ }
+
+}
Added: projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/objectfactory/session/SessionProxyObjectFactory.java
===================================================================
--- projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/objectfactory/session/SessionProxyObjectFactory.java (rev 0)
+++ projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/objectfactory/session/SessionProxyObjectFactory.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -0,0 +1,211 @@
+/*
+ * 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.proxy.impl.objectfactory.session;
+
+import java.util.List;
+import java.util.Map;
+
+import javax.naming.Name;
+
+import org.jboss.ejb3.proxy.impl.factory.ProxyFactory;
+import org.jboss.ejb3.proxy.impl.factory.session.SessionSpecProxyFactory;
+import org.jboss.ejb3.proxy.impl.objectfactory.Ejb3RegistrarProxyObjectFactory;
+import org.jboss.ejb3.proxy.impl.objectfactory.ProxyFactoryReferenceAddressTypes;
+import org.jboss.logging.Logger;
+
+/**
+ * SessionProxyObjectFactory
+ *
+ * A Base JNDI Object Factory responsible for parsing metadata
+ * obtained from Reference Address information, and
+ * returning the appropriate Session Proxy
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+public abstract class SessionProxyObjectFactory extends Ejb3RegistrarProxyObjectFactory
+{
+
+ // --------------------------------------------------------------------------------||
+ // Class Members -----------------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ private static final long serialVersionUID = 1L;
+
+ private static final Logger log = Logger.getLogger(SessionProxyObjectFactory.class);
+
+ // --------------------------------------------------------------------------------||
+ // Required Implementations ------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ /**
+ * Creates an proxy from the appropriate ProxyFactory as determined by
+ * metadata in the specified reference addresses
+ *
+ * @param name The JNDI Name looked up
+ * @param referenceAddresses A Map of RefAddr instances in form key = type and
+ * value = List of values for this type
+ */
+ protected Object createProxy(ProxyFactory factory, Name name, Map<String, List<String>> referenceAddresses)
+ {
+ // Initialize
+ Object proxy = null;
+
+ // Determine if a home is defined here
+ boolean hasHome = this.hasHome(name, referenceAddresses);
+
+ // Determine if a business interface is defined here
+ boolean hasBusiness = this.hasBusiness(name, referenceAddresses);
+
+ // Cast
+ SessionSpecProxyFactory sFactory = null;
+ try
+ {
+ sFactory = (SessionSpecProxyFactory) this.getProxyFactoryClass().cast(factory);
+ }
+ catch (ClassCastException cce)
+ {
+ throw new RuntimeException(ProxyFactory.class.getSimpleName() + " used in "
+ + SessionProxyObjectFactory.class.getSimpleName() + " must be of type "
+ + SessionSpecProxyFactory.class.getName() + " but was instead " + factory, cce);
+ }
+
+ // If home and business are bound together
+ if (hasHome && hasBusiness)
+ {
+ proxy = sFactory.createProxyDefault();
+ log.debug("Created Proxy for both EJB2.x Home and EJB3 Business Interfaces.");
+ }
+ // If bound to home only
+ else if (hasHome)
+ {
+ proxy = sFactory.createProxyHome();
+ log.debug("Created Proxy for EJB2.x Home Interface(s)");
+ }
+ // If bound to business only
+ else if (hasBusiness)
+ {
+ // Initialize
+ String type = null;
+
+ // If local
+ if (this.hasLocalBusiness(referenceAddresses))
+ {
+ type = ProxyFactoryReferenceAddressTypes.REF_ADDR_TYPE_PROXY_BUSINESS_INTERFACE_LOCAL;
+ }
+ // If remote
+ else
+ {
+ type = ProxyFactoryReferenceAddressTypes.REF_ADDR_TYPE_PROXY_BUSINESS_INTERFACE_REMOTE;
+ }
+
+ // Get all business interfaces to be used
+ List<String> businessInterfaces = referenceAddresses.get(type);
+
+ // If only one is defined
+ if (businessInterfaces.size() == 1)
+ {
+ // Obtain a proxy specific to this business interface
+ String businessInterface = businessInterfaces.get(0);
+ proxy = sFactory.createProxyBusiness(businessInterface);
+ log.debug("Created Proxy of type " + proxy.getClass().getSimpleName() + " for EJB3 Business Interface: "
+ + businessInterface);
+
+ // Ensure the proxy is visible to the TCL
+ proxy = this.redefineProxyInTcl(proxy);
+ }
+ else
+ {
+ // Use a general-purpose proxy for all business interfaces
+ proxy = sFactory.createProxyDefault();
+ log.debug("Created Proxy of type " + proxy.getClass().getSimpleName() + " for EJB3 Business Interfaces: "
+ + businessInterfaces);
+ }
+ }
+ // No valid type is bound here
+ else
+ {
+ throw new RuntimeException(factory + " found associated with JNDI Binding " + name.toString()
+ + " is not bound to create/return any valid EJB2.x Home or EJB3 Business Interfaces");
+ }
+
+ // Obtain the target container name
+ String containerName = this.getSingleRequiredReferenceAddressValue(name, referenceAddresses,
+ ProxyFactoryReferenceAddressTypes.REF_ADDR_TYPE_EJBCONTAINER_NAME);
+ assert containerName != null && containerName.trim().length() > 0 : "Container Name must be specified via reference address + \""
+ + ProxyFactoryReferenceAddressTypes.REF_ADDR_TYPE_EJBCONTAINER_NAME + "\"";
+
+ // Return
+ return proxy;
+ }
+
+ /**
+ * Obtains the type or supertype used by proxy factories for this Object Factory
+ * @return
+ */
+ @Override
+ protected Class<SessionSpecProxyFactory> getProxyFactoryClass()
+ {
+ return SessionSpecProxyFactory.class;
+ }
+
+ // --------------------------------------------------------------------------------||
+ // Helper Methods -----------------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ /**
+ * Looks to the metadata specified by the reference addresses to determine if
+ * an EJB2.x home interface is defined here. Additionally checks to ensure
+ * that both remote and local homes are not bound to the same JNDI Address
+ *
+ * @param name
+ * @param referenceAddresses
+ * @return
+ */
+ protected boolean hasHome(Name name, Map<String, List<String>> referenceAddresses)
+ {
+ // Initialize
+ boolean hasHome = false;
+
+ // Obtain metadata
+ boolean hasLocalHome = referenceAddresses
+ .containsKey(ProxyFactoryReferenceAddressTypes.REF_ADDR_TYPE_PROXY_EJB2x_INTERFACE_HOME_LOCAL);
+ boolean hasRemoteHome = referenceAddresses
+ .containsKey(ProxyFactoryReferenceAddressTypes.REF_ADDR_TYPE_PROXY_EJB2x_INTERFACE_HOME_REMOTE);
+
+ // Ensure both local and remote home are not specified here
+ String errorMessage = "ObjectFactory at JNDI \"" + name.toString()
+ + "\" contains references to both local and remote homes";
+ assert !(hasLocalHome && hasRemoteHome) : errorMessage;
+ if (hasLocalHome && hasRemoteHome)
+ {
+ throw new RuntimeException(errorMessage);
+ }
+
+ // Set if has home defined
+ hasHome = hasLocalHome || hasRemoteHome;
+
+ // Return
+ return hasHome;
+ }
+
+}
Added: projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/objectfactory/session/service/ServiceProxyObjectFactory.java
===================================================================
--- projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/objectfactory/session/service/ServiceProxyObjectFactory.java (rev 0)
+++ projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/objectfactory/session/service/ServiceProxyObjectFactory.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -0,0 +1,134 @@
+/*
+ * 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.proxy.impl.objectfactory.session.service;
+
+import java.util.List;
+import java.util.Map;
+
+import javax.naming.Name;
+
+import org.jboss.ejb3.proxy.impl.factory.ProxyFactory;
+import org.jboss.ejb3.proxy.impl.factory.session.service.ServiceProxyFactory;
+import org.jboss.ejb3.proxy.impl.objectfactory.Ejb3RegistrarProxyObjectFactory;
+import org.jboss.ejb3.proxy.impl.objectfactory.ProxyFactoryReferenceAddressTypes;
+import org.jboss.logging.Logger;
+
+/**
+ * ServiceProxyObjectFactory
+ *
+ * A JNDI ObjectFactory responsible for returning the
+ * appropriate @Service Proxy upon lookup
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+public class ServiceProxyObjectFactory extends Ejb3RegistrarProxyObjectFactory
+{
+ // --------------------------------------------------------------------------------||
+ // Class Members -----------------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ private static final long serialVersionUID = 1L;
+
+ private static final Logger log = Logger.getLogger(ServiceProxyObjectFactory.class);
+
+ // --------------------------------------------------------------------------------||
+ // Required Implementations -------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ /*
+ * TODO
+ *
+ * This implementation simply creates a new proxy upon each lookup. We should
+ * improve performance by providing a caching mechanism to cache:
+ *
+ * Proxy per JNDI Address
+ *
+ * Can be done via a static Map? Not in an instance variable because
+ * ObjectFactories are made upon each lookup
+ */
+ /**
+ * @Service Object Factories must always create a new @Service Proxy if one is not
+ * available in the internal cache, otherwise use the cached one and return
+ *
+ * @param proxyFactory The ProxyFactory to use
+ * @param name The JNDI name looked up
+ * @param referenceAddresses
+ */
+ @Override
+ protected Object getProxy(ProxyFactory proxyFactory, Name name, Map<String, List<String>> referenceAddresses)
+ {
+ // Initialize
+ Object proxy = null;
+
+ // Determine if a business interface is defined here
+ boolean hasBusiness = this.hasBusiness(name, referenceAddresses);
+
+ // Cast
+ ServiceProxyFactory sFactory = null;
+ try
+ {
+ sFactory = this.getProxyFactoryClass().cast(proxyFactory);
+ }
+ catch (ClassCastException cce)
+ {
+ throw new RuntimeException(ProxyFactory.class.getSimpleName() + " used in "
+ + ServiceProxyFactory.class.getSimpleName() + " must be of type " + ServiceProxyFactory.class.getName()
+ + " but was instead " + proxyFactory, cce);
+ }
+
+ // If bound to business
+ if (hasBusiness)
+ {
+ // Use a general-purpose proxy for all business interfaces
+ proxy = sFactory.createProxyDefault();
+ log.debug("Created Proxy of type " + proxy.getClass().getSimpleName() + ".");
+
+ }
+ // No valid type is bound here
+ else
+ {
+ throw new RuntimeException(proxyFactory + " found associated with JNDI Binding " + name.toString()
+ + " is not bound to create/return any valid @Service Business Interfaces");
+ }
+
+ // Obtain the target container name
+ String containerName = this.getSingleRequiredReferenceAddressValue(name, referenceAddresses,
+ ProxyFactoryReferenceAddressTypes.REF_ADDR_TYPE_EJBCONTAINER_NAME);
+ assert containerName != null && containerName.trim().length() > 0 : "Container Name must be specified via reference address + \""
+ + ProxyFactoryReferenceAddressTypes.REF_ADDR_TYPE_EJBCONTAINER_NAME + "\"";
+
+ // Return
+ return proxy;
+ }
+
+ /**
+ * Obtains the type or supertype used by proxy factories for this Object Factory
+ * @return
+ */
+ @Override
+ protected Class<ServiceProxyFactory> getProxyFactoryClass()
+ {
+ return ServiceProxyFactory.class;
+ }
+
+}
Added: projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/objectfactory/session/stateful/StatefulSessionProxyObjectFactory.java
===================================================================
--- projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/objectfactory/session/stateful/StatefulSessionProxyObjectFactory.java (rev 0)
+++ projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/objectfactory/session/stateful/StatefulSessionProxyObjectFactory.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -0,0 +1,70 @@
+/*
+ * 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.proxy.impl.objectfactory.session.stateful;
+
+import java.util.List;
+import java.util.Map;
+
+import javax.naming.Name;
+
+import org.jboss.ejb3.proxy.impl.factory.ProxyFactory;
+import org.jboss.ejb3.proxy.impl.objectfactory.session.SessionProxyObjectFactory;
+
+/**
+ * StatefulSessionProxyObjectFactory
+ *
+ * A JNDI ObjectFactory responsible for returning the
+ * appropriate SFSB Proxy upon lookup
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+public class StatefulSessionProxyObjectFactory extends SessionProxyObjectFactory
+{
+ // --------------------------------------------------------------------------------||
+ // Class Members -----------------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ private static final long serialVersionUID = 1L;
+
+ // --------------------------------------------------------------------------------||
+ // Required Implementations -------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ /**
+ * SFSB Object Factories must always create a new SFSB Proxy
+ *
+ * @param proxyFactory The ProxyFactory to use
+ * @param name The JNDI name looked up
+ * @param referenceAddresses
+ */
+ @Override
+ protected Object getProxy(ProxyFactory proxyFactory, Name name, Map<String, List<String>> referenceAddresses)
+ {
+ // Create a new Proxy Instance
+ Object proxy = this.createProxy(proxyFactory, name, referenceAddresses);
+
+ // Return the Proxy
+ return proxy;
+ }
+
+}
Added: projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/objectfactory/session/stateless/StatelessSessionProxyObjectFactory.java
===================================================================
--- projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/objectfactory/session/stateless/StatelessSessionProxyObjectFactory.java (rev 0)
+++ projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/objectfactory/session/stateless/StatelessSessionProxyObjectFactory.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -0,0 +1,82 @@
+/*
+ * 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.proxy.impl.objectfactory.session.stateless;
+
+import java.util.List;
+import java.util.Map;
+
+import javax.naming.Name;
+
+import org.jboss.ejb3.proxy.impl.factory.ProxyFactory;
+import org.jboss.ejb3.proxy.impl.objectfactory.session.SessionProxyObjectFactory;
+
+/**
+ * StatelessSessionProxyObjectFactory
+ *
+ * A JNDI ObjectFactory responsible for returning the
+ * appropriate SLSB Proxy upon lookup
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+public class StatelessSessionProxyObjectFactory extends SessionProxyObjectFactory
+{
+ // --------------------------------------------------------------------------------||
+ // Class Members -----------------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ private static final long serialVersionUID = 1L;
+
+ // --------------------------------------------------------------------------------||
+ // Required Implementations -------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ /*
+ * TODO
+ *
+ * This implementation simply creates a new proxy upon each lookup. We should
+ * improve performance by providing a caching mechanism to cache:
+ *
+ * Home
+ * Business
+ * One per interface-specific business
+ *
+ * This cache will have to be done at the Server Side as ObjectFactory is a
+ * client-specific construct recreated upon each lookup
+ */
+ /**
+ * SLSB Object Factories must always create a new SLSB Proxy if one is not
+ * available in the internal cache, otherwise use the cached one and return
+ *
+ * @param proxyFactory The ProxyFactory to use
+ * @param name The JNDI name looked up
+ * @param referenceAddresses
+ */
+ @Override
+ protected Object getProxy(ProxyFactory proxyFactory, Name name, Map<String, List<String>> referenceAddresses)
+ {
+ //TODO Implement caching
+ // Just create a new Proxy instance for now
+ return this.createProxy(proxyFactory, name, referenceAddresses);
+ }
+
+}
Added: projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/objectstore/ObjectStoreBindings.java
===================================================================
--- projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/objectstore/ObjectStoreBindings.java (rev 0)
+++ projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/objectstore/ObjectStoreBindings.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -0,0 +1,114 @@
+/*
+ * 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.proxy.impl.objectstore;
+
+/**
+ * ObjectStoreBindings
+ *
+ * Defines constants used in binding POJOs to
+ * the Object Store
+ *
+ * These values must match those either used to
+ * Register beans programmatically or via
+ * XML Configuration
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+public interface ObjectStoreBindings
+{
+ // --------------------------------------------------------------------------------||
+ // Constants ----------------------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ /*
+ * The following are Namespaces used by EJB3
+ */
+
+ /**
+ * Namespace for all Beans for EJB3
+ */
+ String OBJECTSTORE_NAMESPACE_EJB3 = "org.jboss.ejb3.";
+
+ /**
+ * Namespace of all EJB Containers, should not be used directly but
+ * instead precedes namespaces for SLSB, SFSB, MDB, and @Service
+ */
+ String OBJECTSTORE_NAMESPACE_EJBCONTAINER = ObjectStoreBindings.OBJECTSTORE_NAMESPACE_EJB3 + "EJBContainer.";
+
+ /**
+ * Namespace for SFSB Containers
+ */
+ String OBJECTSTORE_NAMESPACE_EJBCONTAINER_STATEFUL = ObjectStoreBindings.OBJECTSTORE_NAMESPACE_EJBCONTAINER
+ + "StatefulSession.";
+
+ /**
+ * Namespace for SLSB Containers
+ */
+ String OBJECTSTORE_NAMESPACE_EJBCONTAINER_STATELESS = ObjectStoreBindings.OBJECTSTORE_NAMESPACE_EJBCONTAINER
+ + "StatelessSession.";
+
+ /**
+ * Namespace for @Service Containers
+ */
+ String OBJECTSTORE_NAMESPACE_EJBCONTAINER_SERVICE = ObjectStoreBindings.OBJECTSTORE_NAMESPACE_EJBCONTAINER
+ + "Service.";
+
+ /**
+ * Namespace for MDB Containers
+ */
+ String OBJECTSTORE_NAMESPACE_EJBCONTAINER_MDB = ObjectStoreBindings.OBJECTSTORE_NAMESPACE_EJBCONTAINER + "MDB.";
+
+ /*
+ * The following are Bindings used as Object Store Bean Names
+ */
+
+ /**
+ * Namespace for all JNDI Registrars
+ */
+ String OBJECTSTORE_NAMESPACE_JNDI_REGISTRAR = ObjectStoreBindings.OBJECTSTORE_NAMESPACE_EJB3 + "JndiRegistrar.";
+
+ /**
+ * Namespace for Session EJB JNDI Registrars
+ */
+ String OBJECTSTORE_NAMESPACE_JNDI_REGISTRAR_SESSION = ObjectStoreBindings.OBJECTSTORE_NAMESPACE_JNDI_REGISTRAR
+ + "Session.";
+
+ /**
+ * Bind name for SLSB JNDI Registrar
+ */
+ String OBJECTSTORE_BEAN_NAME_JNDI_REGISTRAR_SLSB = ObjectStoreBindings.OBJECTSTORE_NAMESPACE_JNDI_REGISTRAR_SESSION
+ + "SLSBJndiRegistrar";
+
+ /**
+ * Bind name for SFSB JNDI Registrar
+ */
+ String OBJECTSTORE_BEAN_NAME_JNDI_REGISTRAR_SFSB = ObjectStoreBindings.OBJECTSTORE_NAMESPACE_JNDI_REGISTRAR_SESSION
+ + "SFSBJndiRegistrar";
+
+ /**
+ * Bind name for @Service JNDI Registrar
+ */
+ String OBJECTSTORE_BEAN_NAME_JNDI_REGISTRAR_SERVICE = ObjectStoreBindings.OBJECTSTORE_NAMESPACE_JNDI_REGISTRAR_SESSION
+ + "ServiceJndiRegistrar";
+
+}
Added: projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/remoting/IsLocalProxyFactoryInterceptor.java
===================================================================
--- projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/remoting/IsLocalProxyFactoryInterceptor.java (rev 0)
+++ projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/remoting/IsLocalProxyFactoryInterceptor.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -0,0 +1,79 @@
+/*
+ * 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.proxy.impl.remoting;
+
+import java.io.Serializable;
+
+import org.jboss.aop.Dispatcher;
+import org.jboss.aop.advice.Interceptor;
+import org.jboss.aop.joinpoint.Invocation;
+import org.jboss.aop.joinpoint.InvocationResponse;
+import org.jboss.logging.Logger;
+
+/**
+ * Routes the call to the local container, bypassing further client-side
+ * interceptors and any remoting layer, if this interceptor was created
+ * in this JVM.
+ *
+ * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
+ * @author Brian Stansberry
+ *
+ * @version $Revision: 61667 $
+ */
+public class IsLocalProxyFactoryInterceptor implements Interceptor, Serializable
+{
+ private static final long serialVersionUID = -1264055696758370812L;
+
+ public static final IsLocalProxyFactoryInterceptor singleton = new IsLocalProxyFactoryInterceptor();
+
+ private static final Logger log = Logger.getLogger(IsLocalProxyFactoryInterceptor.class);
+
+ private static final long stamp = System.currentTimeMillis();
+
+ private long marshalledStamp = stamp;
+
+ public String getName()
+ {
+ return getClass().getName();
+ }
+
+ public Object invoke(Invocation invocation) throws Throwable
+ {
+ if (isLocal())
+ {
+ Object oid = invocation.getMetaData(Dispatcher.DISPATCHER, Dispatcher.OID);
+ if (Dispatcher.singleton.isRegistered(oid))
+ {
+ InvocationResponse response = Dispatcher.singleton.invoke(invocation);
+ invocation.setResponseContextInfo(response.getContextInfo());
+ log.debug("Local invocation, handling locally via current Dispatcher");
+ return response.getResponse();
+ }
+ }
+ return invocation.invokeNext();
+ }
+
+ private boolean isLocal()
+ {
+ return stamp == marshalledStamp;
+ }
+}
Added: projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/remoting/ProxyRemotingUtils.java
===================================================================
--- projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/remoting/ProxyRemotingUtils.java (rev 0)
+++ projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/remoting/ProxyRemotingUtils.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -0,0 +1,216 @@
+/*
+ * 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.proxy.impl.remoting;
+
+import java.lang.reflect.Proxy;
+import java.net.MalformedURLException;
+
+import org.jboss.aop.advice.Interceptor;
+import org.jboss.aspects.remoting.PojiProxy;
+import org.jboss.ejb3.common.registrar.spi.Ejb3RegistrarLocator;
+import org.jboss.ejb3.common.registrar.spi.NotBoundException;
+import org.jboss.ejb3.proxy.impl.invocation.InvokableContextStatefulRemoteProxyInvocationHack;
+import org.jboss.ejb3.proxy.spi.container.InvokableContext;
+import org.jboss.logging.Logger;
+import org.jboss.remoting.InvokerLocator;
+import org.jboss.remoting.transport.Connector;
+
+/**
+ * ProxyRemotingUtils
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+public class ProxyRemotingUtils
+{
+ // --------------------------------------------------------------------------------||
+ // Class Members ------------------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ private static final Logger log = Logger.getLogger(ProxyRemotingUtils.class);
+
+ /*
+ * Default Remoting Client Bind URL Support
+ */
+
+ /**
+ * The name under which the Remoting Connector is bound in MC
+ */
+ private static final String OBJECT_NAME_REMOTING_CONNECTOR = "org.jboss.ejb3.RemotingConnector";
+
+ /**
+ * The default URL for InvokerLocator in the case @RemoteBinding
+ * does not specify it
+ *
+ * Synchronization policy on "this"
+ */
+ protected static String DEFAULT_CLIENT_BINDING;
+
+ /**
+ * The default URL for InvokerLocator if if cannot be read from the EJB3 Remoting Connector
+ */
+ protected static final String DEFAULT_CLIENT_BINDING_IF_CONNECTOR_NOT_FOUND = "socket://0.0.0.0:3873";
+
+ // --------------------------------------------------------------------------------||
+ // Functional Methods -------------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ /**
+ * Obtains the default client binding
+ *
+ * Will return the value of the InvokerLocator
+ * used by the EJB3 Remoting Connector
+ *
+ * EJBTHREE-1419
+ */
+ public static synchronized String getDefaultClientBinding()
+ {
+
+ // If the binding has not yet been set
+ if (DEFAULT_CLIENT_BINDING == null)
+ {
+ try
+ {
+ // Use the binding specified by the Connector
+ try
+ {
+ DEFAULT_CLIENT_BINDING = getClientBinding(OBJECT_NAME_REMOTING_CONNECTOR);
+ }
+ catch (Exception e)
+ {
+ throw new RuntimeException("Could not obtain " + InvokerLocator.class.getSimpleName()
+ + " from EJB3 Remoting Connector", e);
+ }
+ }
+ // The EJB3 Remoting Connector was not found in MC
+ catch (NotBoundException nbe)
+ {
+ // Log a warning
+ log.warn("Could not find the EJB3 Remoting Connector bound in the Object Store (MC) at the expected name: "
+ + OBJECT_NAME_REMOTING_CONNECTOR + ". Defaulting a client bind URL to "
+ + DEFAULT_CLIENT_BINDING_IF_CONNECTOR_NOT_FOUND);
+
+ // Set a default URL
+ DEFAULT_CLIENT_BINDING = DEFAULT_CLIENT_BINDING_IF_CONNECTOR_NOT_FOUND;
+ }
+ }
+
+ // Return
+ return DEFAULT_CLIENT_BINDING;
+ }
+
+ /**
+ * Obtains the client binding for the specified
+ * invokerName (supplied as the Object Store bind name in
+ * MC)
+ *
+ * @param invokerName
+ * @return
+ * @throws NotBoundException If the specified invokerName is not bound in MC
+ */
+ public static String getClientBinding(String invokerName) throws NotBoundException
+ {
+ // Initialize
+ String url = null;
+ Connector connector = null;
+
+ // Lookup the Connector in MC
+ try
+ {
+ connector = Ejb3RegistrarLocator.locateRegistrar().lookup(invokerName, Connector.class);
+ }
+ catch (NotBoundException nbe)
+ {
+ // Log and rethrow
+ log.warn("Could not find the remoting connector for the specified invoker name, " + invokerName + " in MC");
+ throw nbe;
+ }
+
+ // Use the binding specified by the Connector
+ try
+ {
+ url = connector.getInvokerLocator();
+ }
+ catch (Exception e)
+ {
+ throw new RuntimeException("Could not obtain " + InvokerLocator.class.getSimpleName()
+ + " from EJB3 Remoting Connector", e);
+ }
+
+ // Return
+ return url;
+ }
+
+ /**
+ * Creates a remote proxy to the container using the specified
+ * arguments.
+ *
+ * This is here to centralize the hackiness of this approach. Ideally
+ * remoting should be an add-on capability, not built-in to the core
+ * logic of having a proxy to a container. Thus marked as FIXME.
+ *
+ * @param containerName
+ * @param containerGuid
+ * @param url
+ * @param interceptors
+ * @param target
+ * @return
+ */
+ //FIXME
+ public static InvokableContext createRemoteProxyToContainer(String containerName, String containerGuid, String url,
+ Interceptor[] interceptors, Object target)
+ {
+ // Default the remoting URL if necessary
+ if (url == null || url.trim().length() == 0)
+ {
+ url = ProxyRemotingUtils.getDefaultClientBinding();
+ }
+
+ // Create an InvokerLocator
+ InvokerLocator locator = null;
+ try
+ {
+ locator = new InvokerLocator(url);
+ }
+ catch (MalformedURLException e)
+ {
+ throw new RuntimeException("Could not create " + InvokerLocator.class.getSimpleName() + " to url \"" + url
+ + "\"", e);
+ }
+
+ /*
+ * Create a Proxy
+ */
+
+ // Create a POJI Proxy to the Container
+ PojiProxy handler = new InvokableContextStatefulRemoteProxyInvocationHack(containerName, containerGuid, locator,
+ interceptors, target);
+ Class<?>[] interfaces = new Class<?>[]
+ {InvokableContext.class};
+ InvokableContext container = (InvokableContext) Proxy.newProxyInstance(InvokableContext.class.getClassLoader(),
+ interfaces, handler);
+
+ // Return
+ return container;
+ }
+
+}
Added: projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/remoting/SessionSpecRemotingMetadata.java
===================================================================
--- projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/remoting/SessionSpecRemotingMetadata.java (rev 0)
+++ projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/remoting/SessionSpecRemotingMetadata.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -0,0 +1,45 @@
+/*
+ * 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.proxy.impl.remoting;
+
+/**
+ * SessionSpecRemotingMetadata
+ *
+ * Contains constants used in Remoting metadata
+ * for Session Spec Invocations
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+public interface SessionSpecRemotingMetadata
+{
+
+ /**
+ * AOP Metadata Tag for SFSB Remoting Invocations
+ */
+ String TAG_SESSION_INVOCATION = "SessionInvocation";
+
+ /**
+ * AOP Metadata Key for SFSB Session ID
+ */
+ String KEY_INVOKED_METHOD = "InvokedMethod";
+}
Added: projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/remoting/StatefulSessionRemotingMetadata.java
===================================================================
--- projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/remoting/StatefulSessionRemotingMetadata.java (rev 0)
+++ projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/impl/remoting/StatefulSessionRemotingMetadata.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -0,0 +1,45 @@
+/*
+ * 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.proxy.impl.remoting;
+
+/**
+ * StatefulSessionRemotingMetadata
+ *
+ * Contains constants used in Remoting metadata
+ * for SFSB Invocations
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+public interface StatefulSessionRemotingMetadata
+{
+
+ /**
+ * AOP Metadata Tag for SFSB Remoting Invocations
+ */
+ String TAG_SFSB_INVOCATION = "SFSBInvocation";
+
+ /**
+ * AOP Metadata Key for SFSB Session ID
+ */
+ String KEY_SESSION_ID = "SessionID";
+}
Deleted: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/common/SessionTestCaseBase.java
===================================================================
--- projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/common/SessionTestCaseBase.java 2009-03-12 05:07:26 UTC (rev 85762)
+++ projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/common/SessionTestCaseBase.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -1,88 +0,0 @@
-/*
- * 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.test.proxy.common;
-
-import java.net.URL;
-
-import org.jboss.aop.AspectManager;
-import org.jboss.aop.AspectXmlLoader;
-import org.jboss.ejb3.common.registrar.plugin.mc.Ejb3McRegistrar;
-import org.jboss.ejb3.common.registrar.spi.Ejb3RegistrarLocator;
-import org.jboss.ejb3.test.mc.bootstrap.EmbeddedTestMcBootstrap;
-import org.jboss.logging.Logger;
-
-/**
- * SessionTestCaseBase
- *
- * Operations common to Proxy Session Test Cases
- *
- * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
- * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
- * @version $Revision: $
- */
-public abstract class SessionTestCaseBase
-{
- // --------------------------------------------------------------------------------||
- // Class Members ------------------------------------------------------------------||
- // --------------------------------------------------------------------------------||
-
- private static final Logger log = Logger.getLogger(SessionTestCaseBase.class);
-
- protected static EmbeddedTestMcBootstrap bootstrap;
-
- protected static final String FILENAME_EJB3_INTERCEPTORS_AOP = "ejb3-interceptors-aop.xml";
-
- // --------------------------------------------------------------------------------||
- // Lifecycle Methods --------------------------------------------------------------||
- // --------------------------------------------------------------------------------||
-
- public static void setUpBeforeClass() throws Throwable
- {
- bootstrap = new EmbeddedTestMcBootstrap();
- bootstrap.run();
-
- // Bind the Registrar
- Ejb3RegistrarLocator.bindRegistrar(new Ejb3McRegistrar(bootstrap.getKernel()));
-
- // Load ejb3-interceptors-aop.xml into AspectManager
- ClassLoader cl = Thread.currentThread().getContextClassLoader();
- String ejb3InterceptorsAopFilename = getEjb3InterceptorsAopFilename();
- URL url = cl.getResource(ejb3InterceptorsAopFilename);
- if (url == null)
- {
- throw new RuntimeException("Could not load " + AspectManager.class.getSimpleName()
- + " with definitions from XML as file " + ejb3InterceptorsAopFilename + " could not be found");
- }
- AspectXmlLoader.deployXML(url);
- log.info("Deployed AOP XML: " + ejb3InterceptorsAopFilename);
- }
-
- // --------------------------------------------------------------------------------||
- // Accessors ----------------------------------------------------------------------||
- // --------------------------------------------------------------------------------||
-
- protected static String getEjb3InterceptorsAopFilename()
- {
- return SessionTestCaseBase.FILENAME_EJB3_INTERCEPTORS_AOP;
- }
-
-}
Deleted: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/common/Utils.java
===================================================================
--- projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/common/Utils.java 2009-03-12 05:07:26 UTC (rev 85762)
+++ projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/common/Utils.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -1,131 +0,0 @@
-/*
- * 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.test.proxy.common;
-
-import org.jboss.ejb3.test.common.MetaDataHelper;
-import org.jboss.ejb3.test.proxy.common.container.ServiceContainer;
-import org.jboss.ejb3.test.proxy.common.container.StatefulContainer;
-import org.jboss.ejb3.test.proxy.common.container.StatelessContainer;
-import org.jboss.logging.Logger;
-import org.jboss.metadata.ejb.jboss.JBossServiceBeanMetaData;
-import org.jboss.metadata.ejb.jboss.JBossSessionBeanMetaData;
-import org.jboss.metadata.ejb.jboss.jndipolicy.plugins.BasicJndiBindingPolicy;
-import org.jboss.metadata.ejb.jboss.jndipolicy.plugins.JBossSessionPolicyDecorator;
-
-/**
- * Utils
- *
- * Utilities for Generating Test EJBs
- *
- * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
- * @version $Revision: $
- */
-public class Utils
-{
- // --------------------------------------------------------------------------------||
- // Class Members ------------------------------------------------------------------||
- // --------------------------------------------------------------------------------||
-
- private static final Logger log = Logger.getLogger(Utils.class);
-
- // --------------------------------------------------------------------------------||
- // Functional Methods -------------------------------------------------------------||
- // --------------------------------------------------------------------------------||
-
- /**
- * Creates and returns a SLSB Container for the SLSB Implementation Class specified
- *
- * @param slsbImplementationClass
- * @return
- * @throws Throwable
- */
- public static StatelessContainer createSlsb(Class<?> slsbImplementationClass) throws Throwable
- {
- // Get Metadata
- JBossSessionBeanMetaData beanMetaData = MetaDataHelper.getMetadataFromBeanImplClass(slsbImplementationClass);
-
- // Decorate Metadata
- beanMetaData = new JBossSessionPolicyDecorator(beanMetaData, new BasicJndiBindingPolicy());
-
- // Make a Container
- StatelessContainer container = new StatelessContainer(beanMetaData, Thread.currentThread()
- .getContextClassLoader());
-
- // Return
- return container;
- }
-
- /**
- * Creates and returns a SLSB Container for the SLSB Implementation Class specified
- *
- * @param sfsbImplementationClass
- * @return
- * @throws Throwable
- */
- public static StatefulContainer createSfsb(Class<?> sfsbImplementationClass) throws Throwable
- {
- // Get Metadata
- JBossSessionBeanMetaData beanMetaData = MetaDataHelper.getMetadataFromBeanImplClass(sfsbImplementationClass);
-
- // Decorate Metadata
- beanMetaData = new JBossSessionPolicyDecorator(beanMetaData, new BasicJndiBindingPolicy());
-
- // Make a Container
- StatefulContainer container = new StatefulContainer(beanMetaData, Thread.currentThread().getContextClassLoader());
-
- // Return
- return container;
- }
-
- /**
- * Creates and returns a @Service Container for the Service Implementation Class specified
- *
- * @param sfsbImplementationClass
- * @return
- * @throws Throwable
- */
- public static ServiceContainer createService(Class<?> serviceImplementationClass) throws Throwable
- {
- // Get Metadata
- JBossSessionBeanMetaData beanMetaData = MetaDataHelper.getMetadataFromBeanImplClass(serviceImplementationClass);
-
- // Ensure @Service
- if (!beanMetaData.isService())
- {
- throw new RuntimeException("Specified implementation class for @Service was not a Service Bean: "
- + serviceImplementationClass.getName());
- }
-
- // Cast
- JBossServiceBeanMetaData smd = (JBossServiceBeanMetaData) beanMetaData;
-
- // Decorate Metadata
- beanMetaData = new JBossSessionPolicyDecorator(smd, new BasicJndiBindingPolicy());
-
- // Make a Container
- ServiceContainer container = new ServiceContainer(smd, Thread.currentThread().getContextClassLoader());
-
- // Return
- return container;
- }
-
-}
Deleted: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/common/container/ProxyTestClassAdvisor.java
===================================================================
--- projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/common/container/ProxyTestClassAdvisor.java 2009-03-12 05:07:26 UTC (rev 85762)
+++ projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/common/container/ProxyTestClassAdvisor.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -1,157 +0,0 @@
-/*
- * 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.test.proxy.common.container;
-
-import java.lang.reflect.Method;
-import java.util.Set;
-
-import org.jboss.aop.AspectManager;
-import org.jboss.aop.ClassAdvisor;
-import org.jboss.aop.util.MethodHashing;
-import org.jboss.logging.Logger;
-
-/**
- * ProxyTestClassAdvisor
- *
- * An Advisor for SessionContainers used in the EJB3
- * Proxy Test Suite
- *
- * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
- * @version $Revision: $
- */
-public class ProxyTestClassAdvisor extends ClassAdvisor
-{
-
- // --------------------------------------------------------------------------------||
- // Class Members ------------------------------------------------------------------||
- // --------------------------------------------------------------------------------||
-
- /**
- * Logger
- */
- private static final Logger log = Logger.getLogger(ProxyTestClassAdvisor.class);
-
- // --------------------------------------------------------------------------------||
- // Instance Members ---------------------------------------------------------------||
- // --------------------------------------------------------------------------------||
-
- /**
- * The backing SessionContainer to be advised
- */
- private SessionContainer container;
-
- // --------------------------------------------------------------------------------||
- // Constructor --------------------------------------------------------------------||
- // --------------------------------------------------------------------------------||
-
- /**
- * Constructor
- *
- * Creates an Advisor targeted for the specified SessionContainer,
- * repopulating the method tables and rebuilding the method chains
- * to include virtual methods defined by the EJB itself.
- *
- * @param container
- * @param manager
- */
- public ProxyTestClassAdvisor(SessionContainer container, AspectManager manager)
- {
- // Call Super implementation, advising the Bean Implementation class
- super(container.getBeanClass(), manager);
-
- // Set the Container
- this.setContainer(container);
-
- // Recreate Method Tables (advisedMethods)
- try
- {
- this.createMethodTables();
- }
- catch (Exception e)
- {
- throw new RuntimeException(e);
- }
-
- // Reinitialize the method chain (for methodInfos)
- this.initializeMethodChain();
-
- }
-
- // --------------------------------------------------------------------------------||
- // Overridden Implementations -----------------------------------------------------||
- // --------------------------------------------------------------------------------||
-
- /**
- * Overridden method tables definition to include
- * virtual methods declared by the Container's EJB
- */
- @Override
- protected void createMethodTables() throws Exception
- {
- // Call Super
- super.createMethodTables();
-
- // Obtain Virtual Methods declared by the EJB
- Set<Method> virtualMethods = getVirtualMethods();
-
- // If virtual methods exist
- if (virtualMethods != null)
- {
- // For each virtual method
- for (Method virtualMethod : virtualMethods)
- {
- // Calculate the hash
- long hash = MethodHashing.methodHash(virtualMethod);
-
- // Add to the advised methods
- this.advisedMethods.put(hash, virtualMethod);
-
- // Log
- log.debug("Added method with hash " + hash + " to those advised for " + this.clazz + ": " + virtualMethod);
- }
- }
- }
-
- // --------------------------------------------------------------------------------||
- // Accessors / Mutators -----------------------------------------------------------||
- // --------------------------------------------------------------------------------||
-
- /**
- * Delegates back to the Container to obtain virtual methods
- * declared by the EJB
- */
- private Set<Method> getVirtualMethods()
- {
- return this.getContainer().getVirtualMethods();
- }
-
- protected SessionContainer getContainer()
- {
- return container;
- }
-
- private void setContainer(SessionContainer container)
- {
- this.container = container;
- }
-
-}
Deleted: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/common/container/ProxyTestClassProxyHack.java
===================================================================
--- projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/common/container/ProxyTestClassProxyHack.java 2009-03-12 05:07:26 UTC (rev 85762)
+++ projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/common/container/ProxyTestClassProxyHack.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -1,74 +0,0 @@
-/*
- * 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.test.proxy.common.container;
-
-import org.jboss.aop.InstanceAdvisor;
-import org.jboss.aop.joinpoint.Invocation;
-import org.jboss.aop.joinpoint.InvocationResponse;
-import org.jboss.aop.proxy.ClassProxy;
-import org.jboss.aop.proxy.ProxyMixin;
-import org.jboss.ejb3.proxy.spi.container.InvokableContext;
-import org.jboss.util.NotImplementedException;
-
-/**
- * ProxyTestClassProxyHack
- *
- * Adapted from ClassProxyHack in EJB3 Core
- * (ie. Carlo).
- *
- * Used to expose the dynamic invocation handling
- * of an InvokableContext to Remoting
- *
- * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
- * @version $Revision: $
- */
-class ProxyTestClassProxyHack implements ClassProxy
-{
- private InvokableContext container;
-
- ProxyTestClassProxyHack(InvokableContext container)
- {
- assert container != null : "Specified " + InvokableContext.class.getSimpleName() + " may not be null.";
- this.container = container;
- }
-
- public InvocationResponse _dynamicInvoke(Invocation invocation) throws Throwable
- {
- return container.dynamicInvoke(invocation);
- }
-
- public void setMixins(ProxyMixin[] mixins)
- {
- throw new NotImplementedException();
- }
-
- public InstanceAdvisor _getInstanceAdvisor()
- {
- throw new NotImplementedException();
- }
-
- public void _setInstanceAdvisor(InstanceAdvisor newAdvisor)
- {
- throw new NotImplementedException();
- }
-
-}
Deleted: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/common/container/ServiceContainer.java
===================================================================
--- projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/common/container/ServiceContainer.java 2009-03-12 05:07:26 UTC (rev 85762)
+++ projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/common/container/ServiceContainer.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -1,137 +0,0 @@
-/*
- * 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.test.proxy.common.container;
-
-import java.io.Serializable;
-import java.util.UUID;
-
-import org.jboss.ejb3.proxy.objectstore.ObjectStoreBindings;
-import org.jboss.ejb3.proxy.spi.container.InvokableContext;
-import org.jboss.logging.Logger;
-import org.jboss.metadata.ejb.jboss.JBossSessionBeanMetaData;
-
-/**
- * A simple @Service container that binds proxies and can be invoked.
- *
- * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
- * @version $Revision: $
- */
-public class ServiceContainer extends SessionSpecContainer implements InvokableContext
-{
-
- // --------------------------------------------------------------------------------||
- // Class Members ------------------------------------------------------------------||
- // --------------------------------------------------------------------------------||
-
- private static final Logger log = Logger.getLogger(ServiceContainer.class);
-
- // --------------------------------------------------------------------------------||
- // Instance Members ---------------------------------------------------------------||
- // --------------------------------------------------------------------------------||
-
- /**
- * Singleton instance
- */
- private Object beanInstance;
-
- // --------------------------------------------------------------------------------||
- // Constructors -------------------------------------------------------------------||
- // --------------------------------------------------------------------------------||
-
- public ServiceContainer(JBossSessionBeanMetaData metaData, ClassLoader classLoader) throws ClassNotFoundException
- {
- super(metaData, classLoader);
- }
-
- // --------------------------------------------------------------------------------||
- // Required Implementations -------------------------------------------------------||
- // --------------------------------------------------------------------------------||
-
- /**
- * Creates a unique name for this container
- *
- * @return
- */
- @Override
- protected final String createContainerName()
- {
- return ObjectStoreBindings.OBJECTSTORE_NAMESPACE_EJBCONTAINER_SERVICE + this.getMetaData().getEjbName() + "/"
- + UUID.randomUUID();
- }
-
- /**
- * Returns the name under which the JNDI Registrar for this container is bound
- *
- * @return
- */
- @Override
- protected String getJndiRegistrarBindName()
- {
- return ObjectStoreBindings.OBJECTSTORE_BEAN_NAME_JNDI_REGISTRAR_SERVICE;
- }
-
- /**
- * Obtains the appropriate bean instance for invocation.
- * Specified Session ID will be ignored
- *
- * @param sessionId
- * @return
- */
- @Override
- //FIXME: @Service has no Session ID
- protected synchronized Object getBeanInstance(Serializable sessionId)
- {
- // Check if bean instance is not yet created
- if (this.getBeanInstance() == null)
- {
- try
- {
- // Create and set the instance
- Object beanInstance = this.createInstance();
- this.setBeanInstance(beanInstance);
- log.info("Set bean (Singleton) instance: " + beanInstance);
- }
- catch (Throwable t)
- {
- throw new RuntimeException("Error in creating new @Service Bean Instance", t);
- }
- }
-
- // Return
- return this.getBeanInstance();
- }
-
- // --------------------------------------------------------------------------------||
- // Accessors / Mutators -----------------------------------------------------------||
- // --------------------------------------------------------------------------------||
-
- protected Object getBeanInstance()
- {
- return beanInstance;
- }
-
- protected void setBeanInstance(Object beanInstance)
- {
- this.beanInstance = beanInstance;
- }
-
-}
Deleted: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/common/container/SessionContainer.java
===================================================================
--- projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/common/container/SessionContainer.java 2009-03-12 05:07:26 UTC (rev 85762)
+++ projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/common/container/SessionContainer.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -1,623 +0,0 @@
-/*
- * 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.test.proxy.common.container;
-
-import java.io.Serializable;
-import java.lang.reflect.Method;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Set;
-
-import javax.naming.Context;
-import javax.naming.InitialContext;
-import javax.naming.NamingException;
-
-import org.jboss.aop.Advisor;
-import org.jboss.aop.AspectManager;
-import org.jboss.aop.Dispatcher;
-import org.jboss.aop.MethodInfo;
-import org.jboss.aop.advice.Interceptor;
-import org.jboss.aop.joinpoint.Invocation;
-import org.jboss.aop.joinpoint.InvocationResponse;
-import org.jboss.aop.joinpoint.MethodInvocation;
-import org.jboss.beans.metadata.api.annotations.Start;
-import org.jboss.beans.metadata.api.annotations.Stop;
-import org.jboss.ejb3.common.lang.SerializableMethod;
-import org.jboss.ejb3.common.registrar.spi.Ejb3Registrar;
-import org.jboss.ejb3.common.registrar.spi.Ejb3RegistrarLocator;
-import org.jboss.ejb3.common.registrar.spi.NotBoundException;
-import org.jboss.ejb3.proxy.jndiregistrar.JndiSessionRegistrarBase;
-import org.jboss.ejb3.proxy.remoting.StatefulSessionRemotingMetadata;
-import org.jboss.ejb3.proxy.spi.container.InvokableContext;
-import org.jboss.ejb3.proxy.spi.intf.SessionProxy;
-import org.jboss.ejb3.proxy.spi.intf.StatefulSessionProxy;
-import org.jboss.logging.Logger;
-import org.jboss.metadata.ejb.jboss.JBossSessionBeanMetaData;
-import org.jboss.metadata.ejb.spec.BusinessLocalsMetaData;
-import org.jboss.metadata.ejb.spec.BusinessRemotesMetaData;
-
-/**
- * SessionContainer
- *
- * A Mock Session Container for use in Proxy Testing
- *
- * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
- * @version $Revision: $
- */
-public abstract class SessionContainer implements InvokableContext
-{
- // --------------------------------------------------------------------------------||
- // Class Members ------------------------------------------------------------------||
- // --------------------------------------------------------------------------------||
-
- private static final Logger log = Logger.getLogger(SessionContainer.class);
-
- // --------------------------------------------------------------------------------||
- // Instance Members ---------------------------------------------------------------||
- // --------------------------------------------------------------------------------||
-
- /**
- * The unique name under which this container has been registered
- */
- private String name;
-
- /**
- * The CL for this container and all classes associated with this EJB
- */
- private ClassLoader classLoader;
-
- /**
- * Metadata for this Container
- */
- private JBossSessionBeanMetaData metaData;
-
- /**
- * The Bean Implementation Class
- */
- private Class<?> beanClass;
-
- /**
- * The optional JNDI Registrar
- */
- private JndiSessionRegistrarBase jndiRegistrar;
-
- /**
- * The JNDI Context to use for binding
- */
- private Context jndiContext;
-
- /**
- * The AOP Advisor
- */
- private Advisor advisor;
-
- // --------------------------------------------------------------------------------||
- // Constructor --------------------------------------------------------------------||
- // --------------------------------------------------------------------------------||
-
- /**
- * Constructor
- *
- * @param metaData
- * @param classLoader
- */
- protected SessionContainer(JBossSessionBeanMetaData metaData, ClassLoader classLoader)
- {
- // Set Metadata
- this.setMetaData(metaData);
-
- // Set CL
- this.setClassLoader(classLoader);
-
- // Set name
- this.setName(this.createContainerName());
-
- // Set Bean Class
- String beanClassName = this.getMetaData().getEjbClass();
- try
- {
- this.setBeanClass(this.getClassLoader().loadClass(beanClassName));
- }
- catch (ClassNotFoundException e)
- {
- throw new RuntimeException("Could not find Bean Implementation class \"" + beanClassName + "\" in the "
- + ClassLoader.class.getSimpleName() + " for " + this);
- }
-
- // Set Advisor
- AspectManager aspectManager = AspectManager.instance(this.getClassLoader());
- Advisor advisor = new ProxyTestClassAdvisor(this, aspectManager);
- this.setAdvisor(advisor);
- }
-
- // --------------------------------------------------------------------------------||
- // Functional Methods -------------------------------------------------------------||
- // --------------------------------------------------------------------------------||
-
- /**
- * Invokes the method described by the specified serializable method
- * as called from the specified proxy, using the specified arguments
- *
- * @param proxy The proxy making the invocation
- * @param method The method to be invoked
- * @param args The arguments to the invocation
- * @throws Throwable A possible exception thrown by the invocation
- * @return
- */
- public Object invoke(SessionProxy proxy, SerializableMethod method, Object[] args) throws Throwable
- {
- Method m = method.toMethod(this.getClassLoader());
-
- // Invoke on the bean
- return invokeBean(proxy, m, args);
- }
-
- /**
- * Invocation point of entry for Remoting
- *
- * @param invocation
- * @return
- * @throws Throwable
- */
- public InvocationResponse dynamicInvoke(Invocation invocation) throws Throwable
- {
- /*
- * Set the proper TCL
- */
-
- // Hold a reference to the existing TCL
- ClassLoader originalLoader = Thread.currentThread().getContextClassLoader();
-
- // Set the Container's CL as TCL, required to unmarshall methods from the bean impl class
- Thread.currentThread().setContextClassLoader(this.getClassLoader());
-
- try
- {
-
- /*
- * Obtain the target method (unmarshall from invocation)
- */
-
- // Cast
- assert invocation instanceof MethodInvocation : SessionContainer.class.getName()
- + ".dynamicInoke supports only " + MethodInvocation.class.getSimpleName() + ", but has been passed: "
- + invocation;
- MethodInvocation mi = (MethodInvocation) invocation;
-
- // Get the method hash
- long methodHash = mi.getMethodHash();
- log.debug("Received dynamic invocation for method with hash: " + methodHash);
-
- // Get the Method via MethodInfo from the Advisor
- Advisor advisor = this.getAdvisor();
- MethodInfo info = advisor.getMethodInfo(mi.getMethodHash());
-
- /*
- * Build a new Invocation
- */
-
- // Construct the invocation
- MethodInvocation newInvocation = new MethodInvocation(info, new Interceptor[]
- {});
- Object[] args = mi.getArguments();
- newInvocation.setArguments(args);
- newInvocation.setMetaData(mi.getMetaData());
- newInvocation.setAdvisor(advisor);
-
- // Obtain the Session ID
- Serializable sessionId = null;
- Object objSessionId = mi.getMetaData(StatefulSessionRemotingMetadata.TAG_SFSB_INVOCATION,
- StatefulSessionRemotingMetadata.KEY_SESSION_ID);
- if (objSessionId != null)
- {
- assert objSessionId instanceof Serializable : "Session IDs must be " + Serializable.class.getSimpleName();
- sessionId = (Serializable) objSessionId;
- }
-
- // Get the target, and set on the invocation
- Object target = this.getBeanInstance(sessionId);
- newInvocation.setTargetObject(target);
-
- // Create an Object reference to hold the return value
- Object returnValue = null;
-
- // Create a reference to the Invocation's response
- InvocationResponse response = null;
-
- /*
- * Invoke
- */
-
- // Invoke
- returnValue = newInvocation.invokeNext();
-
- // Create a Response
- response = new InvocationResponse(returnValue);
- Map<Object, Object> responseContext = newInvocation.getResponseContextInfo();
- response.setContextInfo(responseContext);
-
- // Return
- return response;
- }
- finally
- {
- // Reset the TCL to original
- Thread.currentThread().setContextClassLoader(originalLoader);
- }
- }
-
- protected Object createInstance() throws InstantiationException, IllegalAccessException
- {
- return this.getBeanClass().newInstance();
- }
-
- //FIXME: Should be agnostic to Session IDs, SLSBs have none
- public Object invokeBean(Object proxy, Method method, Object args[]) throws Throwable
- {
- // Initialize a Session ID
- Object sessionId = null;
-
- // Obtain the InvocationHandler
- if (proxy instanceof StatefulSessionProxy)
- {
- StatefulSessionProxy statefulProxy = (StatefulSessionProxy) proxy;
-
- // Get the Session ID
- sessionId = statefulProxy.getTarget();
- }
-
- // Get the appropriate instance
- Object obj = this.getBeanInstance((Serializable) sessionId);
-
- // Invoke
- return method.invoke(obj, args);
- }
-
- @Start
- public void start() throws Throwable
- {
- log.info("Starting " + this);
-
- // Register with Remoting
- Dispatcher.singleton.registerTarget(this.getName(), new ProxyTestClassProxyHack(this));
-
- // Obtain registrar
- JndiSessionRegistrarBase registrar = this.getJndiRegistrar();
-
- // Bind all appropriate references/factories to Global JNDI for Client access, if a JNDI Registrar is present
- if (registrar != null)
- {
- this.setJndiRegistrar(registrar);
- registrar.bindEjb(this.getJndiContext(), this.getMetaData(), this.getClassLoader(), this.getName(), this
- .getName(), this.getAdvisor());
- }
- else
- {
- log.warn("No " + JndiSessionRegistrarBase.class.getSimpleName()
- + " was found; byassing binding of Proxies to " + this.getName() + " in Global JNDI.");
- }
-
- }
-
- @Stop
- public void stop()
- {
- log.info("Stopping " + this);
-
- // Deregister with Remoting
- Dispatcher.singleton.unregisterTarget(this.getName());
-
- // Obtain registrar
- JndiSessionRegistrarBase registrar = this.getJndiRegistrar();
-
- // If the registrar has been used for this container, unbind all JNDI references
- if (registrar != null)
- {
- registrar.unbindEjb(this.getJndiContext(), this.getMetaData());
- }
- }
-
- /**
- * Obtains the JndiSessionRegistrarBase from MC, null if not found
- *
- * @return
- */
- protected JndiSessionRegistrarBase getJndiRegistrar()
- {
- // If the JNDI Registrar has not yet been set
- if (this.jndiRegistrar == null)
- {
- // Initialize
- String jndiRegistrarBindName = this.getJndiRegistrarBindName();
-
- // Obtain Registrar
- Ejb3Registrar registrar = Ejb3RegistrarLocator.locateRegistrar();
-
- // Lookup
- Object obj = null;
- try
- {
- obj = registrar.lookup(jndiRegistrarBindName);
- }
- // If not installed, warn and return null
- catch (NotBoundException e)
- {
- log.warn("No " + JndiSessionRegistrarBase.class.getName()
- + " was found installed in the ObjectStore (Registry) at " + jndiRegistrarBindName);
- return null;
-
- }
-
- // Cast and set
- this.setJndiRegistrar((JndiSessionRegistrarBase) obj);
- }
-
- // Return
- return jndiRegistrar;
- }
-
- // --------------------------------------------------------------------------------||
- // Contracts ----------------------------------------------------------------------||
- // --------------------------------------------------------------------------------||
-
- /**
- * Creates a unique name for this container
- *
- * @return
- */
- protected abstract String createContainerName();
-
- /**
- * Returns the name under which the JNDI Registrar for this container is bound
- *
- * @return
- */
- protected abstract String getJndiRegistrarBindName();
-
- /**
- * Obtains the appropriate bean instance for invocation
- * as called from the specified proxy
- *
- * @param sessionId
- * @return
- */
- protected abstract Object getBeanInstance(Serializable sessionId);
-
- // --------------------------------------------------------------------------------||
- // Internal Helper Methods --------------------------------------------------------||
- // --------------------------------------------------------------------------------||
-
- /**
- * Obtains a List of all methods handled by the bean class
- *
- * @return The methods handled by the bean class directly
- */
- public Set<Method> getVirtualMethods()
- {
- // Initialize
- Set<Method> virtualMethods = new HashSet<Method>();
-
- // Obtain Metadata
- JBossSessionBeanMetaData smd = this.getMetaData();
-
- // Obtain CL
- ClassLoader cl = this.getClassLoader();
-
- /*
- * Business Remotes
- */
-
- // Obtain all specified business remotes
- BusinessRemotesMetaData businessRemotes = smd.getBusinessRemotes();
- if (businessRemotes != null)
- {
- // For each business remote
- for (String businessRemote : businessRemotes)
- {
- // Load the Class
- Class<?> businessRemoteClass = null;
- try
- {
- businessRemoteClass = Class.forName(businessRemote, true, cl);
- }
- catch (ClassNotFoundException e)
- {
- throw new RuntimeException("Could not find specified business remote class: " + businessRemote, e);
- }
-
- // Obtain all methods declared by the class
- Method[] declaredMethods = businessRemoteClass.getMethods();
-
- // Add each method
- for (Method declaredMethod : declaredMethods)
- {
- virtualMethods.add(declaredMethod);
- }
- }
- }
-
- /*
- * Business Locals
- */
-
- // Obtain all specified business locals
- BusinessLocalsMetaData businessLocals = smd.getBusinessLocals();
- if (businessLocals != null)
- {
- // For each business local
- for (String businessLocal : businessLocals)
- {
- // Load the Class
- Class<?> businessLocalClass = null;
- try
- {
- businessLocalClass = Class.forName(businessLocal, true, cl);
- }
- catch (ClassNotFoundException e)
- {
- throw new RuntimeException("Could not find specified business local class: " + businessLocal, e);
- }
-
- // Obtain all methods declared by the class
- Method[] declaredMethods = businessLocalClass.getMethods();
-
- // Add each method
- for (Method declaredMethod : declaredMethods)
- {
- virtualMethods.add(declaredMethod);
- }
- }
- }
-
- // Remote Home
- String remoteHomeClassName = smd.getHome();
- if (remoteHomeClassName != null)
- {
- Class<?> remoteHomeClass = null;
- try
- {
- remoteHomeClass = Class.forName(remoteHomeClassName, true, cl);
- }
- catch (ClassNotFoundException e)
- {
- throw new RuntimeException("Could not find specified Remote Home Class: " + remoteHomeClassName, e);
- }
- if (remoteHomeClass != null)
- {
- Method[] declaredMethods = remoteHomeClass.getMethods();
- for (Method declaredMethod : declaredMethods)
- virtualMethods.add(declaredMethod);
-
- declaredMethods = javax.ejb.EJBObject.class.getMethods();
- for (Method declaredMethod : declaredMethods)
- virtualMethods.add(declaredMethod);
- }
- }
-
- // Local Home
- String localHomeClassName = smd.getLocalHome();
- if (localHomeClassName != null)
- {
- Class<?> localHomeClass = null;
- try
- {
- localHomeClass = Class.forName(localHomeClassName, true, cl);
- }
- catch (ClassNotFoundException e)
- {
- throw new RuntimeException("Could not find specified Local Home Class: " + localHomeClass, e);
- }
- if (localHomeClass != null)
- {
- Method[] declaredMethods = localHomeClass.getMethods();
- for (Method declaredMethod : declaredMethods)
- virtualMethods.add(declaredMethod);
-
- declaredMethods = javax.ejb.EJBLocalObject.class.getMethods();
- for (Method declaredMethod : declaredMethods)
- virtualMethods.add(declaredMethod);
- }
- }
-
- return virtualMethods;
- }
-
- // --------------------------------------------------------------------------------||
- // Accessors / Mutators -----------------------------------------------------------||
- // --------------------------------------------------------------------------------||
-
- public String getName()
- {
- return name;
- }
-
- protected void setName(String name)
- {
- this.name = name;
- }
-
- public ClassLoader getClassLoader()
- {
- return classLoader;
- }
-
- private void setClassLoader(ClassLoader classLoader)
- {
- this.classLoader = classLoader;
- }
-
- public JBossSessionBeanMetaData getMetaData()
- {
- return metaData;
- }
-
- private void setMetaData(JBossSessionBeanMetaData metaData)
- {
- this.metaData = metaData;
- }
-
- public Class<?> getBeanClass()
- {
- return beanClass;
- }
-
- private void setBeanClass(Class<?> beanClass)
- {
- this.beanClass = beanClass;
- }
-
- public void setJndiRegistrar(JndiSessionRegistrarBase jndiRegistrar)
- {
- this.jndiRegistrar = jndiRegistrar;
- }
-
- protected Context getJndiContext()
- {
- if (this.jndiContext == null)
- {
- try
- {
- this.setJndiContext(new InitialContext());
- }
- catch (NamingException e)
- {
- throw new RuntimeException("Could not create new default JNDI Context for Container: " + this.getName(), e);
- }
- }
- return jndiContext;
- }
-
- private void setJndiContext(Context jndiContext)
- {
- this.jndiContext = jndiContext;
- }
-
- public Advisor getAdvisor()
- {
- return advisor;
- }
-
- public void setAdvisor(Advisor advisor)
- {
- this.advisor = advisor;
- }
-}
Deleted: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/common/container/SessionSpecContainer.java
===================================================================
--- projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/common/container/SessionSpecContainer.java 2009-03-12 05:07:26 UTC (rev 85762)
+++ projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/common/container/SessionSpecContainer.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -1,51 +0,0 @@
-/*
- * 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.test.proxy.common.container;
-
-import org.jboss.metadata.ejb.jboss.JBossSessionBeanMetaData;
-
-/**
- * SessionSpecContainer
- *
- * A Mock Session Container adhering to the EJB 3.0 Specification
- * for use in Proxy Testing
- *
- * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
- * @version $Revision: $
- */
-public abstract class SessionSpecContainer extends SessionContainer
-{
- // --------------------------------------------------------------------------------||
- // Constructor --------------------------------------------------------------------||
- // --------------------------------------------------------------------------------||
-
- /**
- * Constructor
- *
- * @param metadata
- * @param classLoader
- */
- protected SessionSpecContainer(JBossSessionBeanMetaData metadata, ClassLoader classLoader)
- {
- super(metadata, classLoader);
- }
-}
Deleted: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/common/container/StatefulContainer.java
===================================================================
--- projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/common/container/StatefulContainer.java 2009-03-12 05:07:26 UTC (rev 85762)
+++ projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/common/container/StatefulContainer.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -1,155 +0,0 @@
-/*
- * 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.test.proxy.common.container;
-
-import java.io.Serializable;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.UUID;
-
-import org.jboss.ejb3.proxy.objectstore.ObjectStoreBindings;
-import org.jboss.ejb3.proxy.spi.container.StatefulSessionFactory;
-import org.jboss.metadata.ejb.jboss.JBossSessionBeanMetaData;
-
-/**
- * StatefulContainer
- *
- * A Mock SFSB Container for use in Testing
- *
- * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
- * @version $Revision: $
- */
-public class StatefulContainer extends SessionSpecContainer implements StatefulSessionFactory
-{
-
- // --------------------------------------------------------------------------------||
- // Instance Members ---------------------------------------------------------------||
- // --------------------------------------------------------------------------------||
-
- /**
- * Cache of SFSB instances in key = sessionId and value = instance
- */
- private Map<Object, Object> cache;
-
- // --------------------------------------------------------------------------------||
- // Constructor --------------------------------------------------------------------||
- // --------------------------------------------------------------------------------||
-
- public StatefulContainer(JBossSessionBeanMetaData metaData, ClassLoader classLoader) throws ClassNotFoundException
- {
- // Call super
- super(metaData, classLoader);
-
- // Instanciate Cache
- this.setCache(new HashMap<Object, Object>());
-
- }
-
- // --------------------------------------------------------------------------------||
- // Required Implementations -------------------------------------------------------||
- // --------------------------------------------------------------------------------||
-
- /**
- * Creates a new user session and returns the unique Session ID
- *
- * @return
- */
- public Serializable createSession()
- {
- // Create a new Session ID
- Serializable sessionId = UUID.randomUUID();
-
- // Create a new Instance
- Object instance = null;
- try
- {
- instance = this.createInstance();
- }
- catch (Throwable t)
- {
- throw new RuntimeException("Error in creating new instance of " + this.getBeanClass(), t);
- }
-
- // Place in cache
- this.getCache().put(sessionId, instance);
-
- // Return
- return sessionId;
- }
-
- /**
- * Creates a unique name for this container
- *
- * @return
- */
- protected final String createContainerName()
- {
- return ObjectStoreBindings.OBJECTSTORE_NAMESPACE_EJBCONTAINER_STATEFUL + this.getMetaData().getEjbName() + "/"
- + UUID.randomUUID();
- }
-
- /**
- * Returns the name under which the JNDI Registrar for this container is bound
- *
- * @return
- */
- protected String getJndiRegistrarBindName()
- {
- return ObjectStoreBindings.OBJECTSTORE_BEAN_NAME_JNDI_REGISTRAR_SFSB;
- }
-
- /**
- * Obtains the appropriate bean instance for invocation
- * as called from the specified proxy
- *
- * @param sessionId
- * @return
- */
- protected Object getBeanInstance(Serializable sessionId)
- {
- // Sanity Check
- assert sessionId != null : "No Session ID specified, and this is required for SFSB Invocation";
-
- // Get the corresponding instance from the cache
- Object bean = this.getCache().get(sessionId);
- assert bean != null : "Session ID of " + sessionId
- + " declared, but no corresponding bean instance could be found";
-
- // Return
- return bean;
- }
-
- // --------------------------------------------------------------------------------||
- // Accessors / Mutators -----------------------------------------------------------||
- // --------------------------------------------------------------------------------||
-
- protected Map<Object, Object> getCache()
- {
- return cache;
- }
-
- protected void setCache(Map<Object, Object> cache)
- {
- this.cache = cache;
- }
-
-}
Deleted: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/common/container/StatelessContainer.java
===================================================================
--- projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/common/container/StatelessContainer.java 2009-03-12 05:07:26 UTC (rev 85762)
+++ projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/common/container/StatelessContainer.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -1,85 +0,0 @@
-/*
- * 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.test.proxy.common.container;
-
-import java.io.Serializable;
-import java.util.UUID;
-
-import org.jboss.ejb3.proxy.objectstore.ObjectStoreBindings;
-import org.jboss.ejb3.proxy.spi.container.InvokableContext;
-import org.jboss.metadata.ejb.jboss.JBossSessionBeanMetaData;
-
-/**
- * A simple stateless container that binds proxies and can be invoked.
- *
- * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
- * @version $Revision: $
- */
-public class StatelessContainer extends SessionSpecContainer implements InvokableContext
-{
- public StatelessContainer(JBossSessionBeanMetaData metaData, ClassLoader classLoader) throws ClassNotFoundException
- {
- super(metaData, classLoader);
- }
-
- /**
- * Creates a unique name for this container
- *
- * @return
- */
- protected final String createContainerName()
- {
- return ObjectStoreBindings.OBJECTSTORE_NAMESPACE_EJBCONTAINER_STATELESS + this.getMetaData().getEjbName() + "/"
- + UUID.randomUUID();
- }
-
- /**
- * Returns the name under which the JNDI Registrar for this container is bound
- *
- * @return
- */
- protected String getJndiRegistrarBindName()
- {
- return ObjectStoreBindings.OBJECTSTORE_BEAN_NAME_JNDI_REGISTRAR_SLSB;
- }
-
- /**
- * Obtains the appropriate bean instance for invocation.
- * Specified Session ID will be ignored
- *
- * @param sessionId
- * @return
- */
- //FIXME: SLSBs have no Session ID
- protected Object getBeanInstance(Serializable sessionId)
- {
- // Typically this would be obtained from a Pool
- try
- {
- return this.createInstance();
- }
- catch (Throwable t)
- {
- throw new RuntimeException("Error in creating new SLSB Bean Instance", t);
- }
- }
-}
Deleted: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/ejbthree1517/ReturnStaticValueInterceptor.java
===================================================================
--- projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/ejbthree1517/ReturnStaticValueInterceptor.java 2009-03-12 05:07:26 UTC (rev 85762)
+++ projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/ejbthree1517/ReturnStaticValueInterceptor.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -1,70 +0,0 @@
-/*
- * 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.test.proxy.ejbthree1517;
-
-import org.jboss.aop.advice.Interceptor;
-import org.jboss.aop.joinpoint.Invocation;
-import org.jboss.logging.Logger;
-
-/**
- * ReturnStaticValueInterceptor
- *
- * A test interceptor which returns a static value
- * upon every invocation
- *
- * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
- * @version $Revision: $
- */
-public class ReturnStaticValueInterceptor implements Interceptor
-{
-
- // --------------------------------------------------------------------------------||
- // Class Members ------------------------------------------------------------------||
- // --------------------------------------------------------------------------------||
-
- private static final Logger log = Logger.getLogger(ReturnStaticValueInterceptor.class);
-
- public static final String RETURN_VALUE = "ALR is better than Carlo.";
-
- // --------------------------------------------------------------------------------||
- // Required Implementations -------------------------------------------------------||
- // --------------------------------------------------------------------------------||
-
- /* (non-Javadoc)
- * @see org.jboss.aop.advice.Interceptor#getName()
- */
- public String getName()
- {
- return this.getClass().getName();
- }
-
- /* (non-Javadoc)
- * @see org.jboss.aop.advice.Interceptor#invoke(org.jboss.aop.joinpoint.Invocation)
- */
- public Object invoke(Invocation invocation) throws Throwable
- {
- // No matter the invocation, return the set value
- log.info("Going to return static value for invocation " + invocation);
- return ReturnStaticValueInterceptor.RETURN_VALUE;
- }
-
-}
Deleted: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/ejbthree1517/TestClientInterceptorStack.java
===================================================================
--- projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/ejbthree1517/TestClientInterceptorStack.java 2009-03-12 05:07:26 UTC (rev 85762)
+++ projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/ejbthree1517/TestClientInterceptorStack.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -1,71 +0,0 @@
-/*
- * 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.test.proxy.ejbthree1517;
-
-/**
- * TestClientInterceptorStack
- *
- * A Remote Business interface to test the remote client
- * interceptor stack explicitly defined by @RemoteBinding.interceptorStack
- *
- * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
- * @version $Revision: $
- */
-public interface TestClientInterceptorStack
-{
- // --------------------------------------------------------------------------------||
- // Class Members ------------------------------------------------------------------||
- // --------------------------------------------------------------------------------||
-
- /*
- * Default Return Value
- */
- String DEFAULT_RETURN_VALUE = "Standard Return Value from the Bean";
-
- /*
- * JNDI Bindings
- */
-
- String JNDI_BINDING_NORMAL_STACK_SFSB = "SFSB-Normal";
-
- String JNDI_BINDING_OVERRIDDEN_STACK_SFSB = "SFSB-Overridden";
-
- String JNDI_BINDING_NORMAL_STACK_SLSB = "SLSB-Normal";
-
- String JNDI_BINDING_OVERRIDDEN_STACK_SLSB = "SLSB-Overridden";
-
- /*
- * Interceptor Stacks
- */
-
- String INTERCEPTOR_STACK_OVERRIDE = "OverrideInterceptors_EJBTHREE-1517";
-
- // --------------------------------------------------------------------------------||
- // Required Implementations -------------------------------------------------------||
- // --------------------------------------------------------------------------------||
-
- /**
- * Returns the value, which will either be TestClientInterceptorStack.DEFAULT_RETURN_VALUE
- * or something defined by an interceptor in an overridden stack
- */
- String getValue();
-}
Deleted: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/ejbthree1517/TestClientInterceptorStackBeanBase.java
===================================================================
--- projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/ejbthree1517/TestClientInterceptorStackBeanBase.java 2009-03-12 05:07:26 UTC (rev 85762)
+++ projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/ejbthree1517/TestClientInterceptorStackBeanBase.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -1,46 +0,0 @@
-/*
- * 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.test.proxy.ejbthree1517;
-
-/**
- * TestClientInterceptorStackBeanBase
- *
- * Base class for test EJBs
- *
- * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
- * @version $Revision: $
- */
-public class TestClientInterceptorStackBeanBase implements TestClientInterceptorStack
-{
- // --------------------------------------------------------------------------------||
- // Required Implementations -------------------------------------------------------||
- // --------------------------------------------------------------------------------||
-
- /**
- * Returns the value, which will either be TestClientInterceptorStack.DEFAULT_RETURN_VALUE
- * or something defined by an interceptor in an overridden stack
- */
- public String getValue()
- {
- return TestClientInterceptorStack.DEFAULT_RETURN_VALUE;
- }
-}
Deleted: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/ejbthree1517/TestClientInterceptorStackStatefulBean.java
===================================================================
--- projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/ejbthree1517/TestClientInterceptorStackStatefulBean.java 2009-03-12 05:07:26 UTC (rev 85762)
+++ projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/ejbthree1517/TestClientInterceptorStackStatefulBean.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -1,50 +0,0 @@
-/*
- * 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.test.proxy.ejbthree1517;
-
-import javax.ejb.Remote;
-import javax.ejb.Stateful;
-
-import org.jboss.ejb3.annotation.RemoteBinding;
-import org.jboss.ejb3.annotation.RemoteBindings;
-
-/**
- * TestClientInterceptorStackStatefulBean
- *
- * A test SFSB with 2 bindings, one for the standard
- * client interceptor stack and one for an overridden stack
- *
- * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
- * @version $Revision: $
- */
- at Stateful
- at Remote(TestClientInterceptorStack.class)
- at RemoteBindings(
-{
- @RemoteBinding(jndiBinding = TestClientInterceptorStack.JNDI_BINDING_NORMAL_STACK_SFSB),
- @RemoteBinding(jndiBinding = TestClientInterceptorStack.JNDI_BINDING_OVERRIDDEN_STACK_SFSB, interceptorStack = TestClientInterceptorStack.INTERCEPTOR_STACK_OVERRIDE)})
-public class TestClientInterceptorStackStatefulBean extends TestClientInterceptorStackBeanBase
- implements
- TestClientInterceptorStack
-{
-
-}
Deleted: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/ejbthree1517/TestClientInterceptorStackStatelessBean.java
===================================================================
--- projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/ejbthree1517/TestClientInterceptorStackStatelessBean.java 2009-03-12 05:07:26 UTC (rev 85762)
+++ projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/ejbthree1517/TestClientInterceptorStackStatelessBean.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -1,50 +0,0 @@
-/*
- * 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.test.proxy.ejbthree1517;
-
-import javax.ejb.Remote;
-import javax.ejb.Stateless;
-
-import org.jboss.ejb3.annotation.RemoteBinding;
-import org.jboss.ejb3.annotation.RemoteBindings;
-
-/**
- * TestClientInterceptorStackStatelessBean
- *
- * A test SLSB with 2 bindings, one for the standard
- * client interceptor stack and one for an overridden stack
- *
- * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
- * @version $Revision: $
- */
- at Stateless
- at Remote(TestClientInterceptorStack.class)
- at RemoteBindings(
-{
- @RemoteBinding(jndiBinding = TestClientInterceptorStack.JNDI_BINDING_NORMAL_STACK_SLSB),
- @RemoteBinding(jndiBinding = TestClientInterceptorStack.JNDI_BINDING_OVERRIDDEN_STACK_SLSB, interceptorStack = TestClientInterceptorStack.INTERCEPTOR_STACK_OVERRIDE)})
-public class TestClientInterceptorStackStatelessBean extends TestClientInterceptorStackBeanBase
- implements
- TestClientInterceptorStack
-{
-
-}
Deleted: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/ejbthree1529/ExplicitInvokerNameBean.java
===================================================================
--- projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/ejbthree1529/ExplicitInvokerNameBean.java 2009-03-12 05:07:26 UTC (rev 85762)
+++ projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/ejbthree1529/ExplicitInvokerNameBean.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -1,55 +0,0 @@
-/*
- * 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.test.proxy.ejbthree1529;
-
-import javax.ejb.Remote;
-import javax.ejb.Stateless;
-
-import org.jboss.ejb3.annotation.RemoteBinding;
-
-/**
- * ExplicitInvokerNameBean
- *
- * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
- * @version $Revision: $
- */
- at Stateless
- at Remote(ExplicitInvokerNameRemoteBusiness.class)
- at RemoteBinding(invokerName = ExplicitInvokerNameRemoteBusiness.MC_NAME_INVOKER, jndiBinding = ExplicitInvokerNameRemoteBusiness.JNDI_NAME_EXPLICIT_INVOKER_NAME)
-public class ExplicitInvokerNameBean implements ExplicitInvokerNameRemoteBusiness
-{
-
- // --------------------------------------------------------------------------------||
- // Required Implementations -------------------------------------------------------||
- // --------------------------------------------------------------------------------||
-
- /**
- * Returns the contracted RETURN_VALUE
- *
- * @return
- */
- public String invoke()
- {
- return ExplicitInvokerNameRemoteBusiness.RETURN_VALUE;
- }
-
-}
Deleted: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/ejbthree1529/ExplicitInvokerNameRemoteBusiness.java
===================================================================
--- projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/ejbthree1529/ExplicitInvokerNameRemoteBusiness.java 2009-03-12 05:07:26 UTC (rev 85762)
+++ projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/ejbthree1529/ExplicitInvokerNameRemoteBusiness.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -1,55 +0,0 @@
-/*
- * 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.test.proxy.ejbthree1529;
-
-/**
- * ExplicitInvokerNameRemoteBusiness
- *
- * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
- * @version $Revision: $
- */
-public interface ExplicitInvokerNameRemoteBusiness
-{
- // --------------------------------------------------------------------------------||
- // Constants ----------------------------------------------------------------------||
- // --------------------------------------------------------------------------------||
-
- String RETURN_VALUE = "Hip hip hurray!";
-
- /**
- * Name of the invoker in MC as defined by the MC *-jboss-beans.xml
- */
- String MC_NAME_INVOKER = "ejbthree1529.Connector";
-
- String JNDI_NAME_EXPLICIT_INVOKER_NAME = "ExplicitInvokerName";
-
- // --------------------------------------------------------------------------------||
- // Contracts ----------------------------------------------------------------------||
- // --------------------------------------------------------------------------------||
-
- /**
- * Returns the contracted RETURN_VALUE
- *
- * @return
- */
- String invoke();
-}
Copied: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/SessionTestCaseBase.java (from rev 85752, projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/common/SessionTestCaseBase.java)
===================================================================
--- projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/SessionTestCaseBase.java (rev 0)
+++ projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/SessionTestCaseBase.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -0,0 +1,88 @@
+/*
+ * 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.test.proxy.impl.common;
+
+import java.net.URL;
+
+import org.jboss.aop.AspectManager;
+import org.jboss.aop.AspectXmlLoader;
+import org.jboss.ejb3.common.registrar.plugin.mc.Ejb3McRegistrar;
+import org.jboss.ejb3.common.registrar.spi.Ejb3RegistrarLocator;
+import org.jboss.ejb3.test.mc.bootstrap.EmbeddedTestMcBootstrap;
+import org.jboss.logging.Logger;
+
+/**
+ * SessionTestCaseBase
+ *
+ * Operations common to Proxy Session Test Cases
+ *
+ * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+public abstract class SessionTestCaseBase
+{
+ // --------------------------------------------------------------------------------||
+ // Class Members ------------------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ private static final Logger log = Logger.getLogger(SessionTestCaseBase.class);
+
+ protected static EmbeddedTestMcBootstrap bootstrap;
+
+ protected static final String FILENAME_EJB3_INTERCEPTORS_AOP = "ejb3-interceptors-aop.xml";
+
+ // --------------------------------------------------------------------------------||
+ // Lifecycle Methods --------------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ public static void setUpBeforeClass() throws Throwable
+ {
+ bootstrap = new EmbeddedTestMcBootstrap();
+ bootstrap.run();
+
+ // Bind the Registrar
+ Ejb3RegistrarLocator.bindRegistrar(new Ejb3McRegistrar(bootstrap.getKernel()));
+
+ // Load ejb3-interceptors-aop.xml into AspectManager
+ ClassLoader cl = Thread.currentThread().getContextClassLoader();
+ String ejb3InterceptorsAopFilename = getEjb3InterceptorsAopFilename();
+ URL url = cl.getResource(ejb3InterceptorsAopFilename);
+ if (url == null)
+ {
+ throw new RuntimeException("Could not load " + AspectManager.class.getSimpleName()
+ + " with definitions from XML as file " + ejb3InterceptorsAopFilename + " could not be found");
+ }
+ AspectXmlLoader.deployXML(url);
+ log.info("Deployed AOP XML: " + ejb3InterceptorsAopFilename);
+ }
+
+ // --------------------------------------------------------------------------------||
+ // Accessors ----------------------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ protected static String getEjb3InterceptorsAopFilename()
+ {
+ return SessionTestCaseBase.FILENAME_EJB3_INTERCEPTORS_AOP;
+ }
+
+}
Property changes on: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/SessionTestCaseBase.java
___________________________________________________________________
Name: svn:mergeinfo
+
Copied: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/Utils.java (from rev 85752, projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/common/Utils.java)
===================================================================
--- projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/Utils.java (rev 0)
+++ projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/Utils.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -0,0 +1,131 @@
+/*
+ * 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.test.proxy.impl.common;
+
+import org.jboss.ejb3.test.common.MetaDataHelper;
+import org.jboss.ejb3.test.proxy.impl.common.container.ServiceContainer;
+import org.jboss.ejb3.test.proxy.impl.common.container.StatefulContainer;
+import org.jboss.ejb3.test.proxy.impl.common.container.StatelessContainer;
+import org.jboss.logging.Logger;
+import org.jboss.metadata.ejb.jboss.JBossServiceBeanMetaData;
+import org.jboss.metadata.ejb.jboss.JBossSessionBeanMetaData;
+import org.jboss.metadata.ejb.jboss.jndipolicy.plugins.BasicJndiBindingPolicy;
+import org.jboss.metadata.ejb.jboss.jndipolicy.plugins.JBossSessionPolicyDecorator;
+
+/**
+ * Utils
+ *
+ * Utilities for Generating Test EJBs
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+public class Utils
+{
+ // --------------------------------------------------------------------------------||
+ // Class Members ------------------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ private static final Logger log = Logger.getLogger(Utils.class);
+
+ // --------------------------------------------------------------------------------||
+ // Functional Methods -------------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ /**
+ * Creates and returns a SLSB Container for the SLSB Implementation Class specified
+ *
+ * @param slsbImplementationClass
+ * @return
+ * @throws Throwable
+ */
+ public static StatelessContainer createSlsb(Class<?> slsbImplementationClass) throws Throwable
+ {
+ // Get Metadata
+ JBossSessionBeanMetaData beanMetaData = MetaDataHelper.getMetadataFromBeanImplClass(slsbImplementationClass);
+
+ // Decorate Metadata
+ beanMetaData = new JBossSessionPolicyDecorator(beanMetaData, new BasicJndiBindingPolicy());
+
+ // Make a Container
+ StatelessContainer container = new StatelessContainer(beanMetaData, Thread.currentThread()
+ .getContextClassLoader());
+
+ // Return
+ return container;
+ }
+
+ /**
+ * Creates and returns a SLSB Container for the SLSB Implementation Class specified
+ *
+ * @param sfsbImplementationClass
+ * @return
+ * @throws Throwable
+ */
+ public static StatefulContainer createSfsb(Class<?> sfsbImplementationClass) throws Throwable
+ {
+ // Get Metadata
+ JBossSessionBeanMetaData beanMetaData = MetaDataHelper.getMetadataFromBeanImplClass(sfsbImplementationClass);
+
+ // Decorate Metadata
+ beanMetaData = new JBossSessionPolicyDecorator(beanMetaData, new BasicJndiBindingPolicy());
+
+ // Make a Container
+ StatefulContainer container = new StatefulContainer(beanMetaData, Thread.currentThread().getContextClassLoader());
+
+ // Return
+ return container;
+ }
+
+ /**
+ * Creates and returns a @Service Container for the Service Implementation Class specified
+ *
+ * @param sfsbImplementationClass
+ * @return
+ * @throws Throwable
+ */
+ public static ServiceContainer createService(Class<?> serviceImplementationClass) throws Throwable
+ {
+ // Get Metadata
+ JBossSessionBeanMetaData beanMetaData = MetaDataHelper.getMetadataFromBeanImplClass(serviceImplementationClass);
+
+ // Ensure @Service
+ if (!beanMetaData.isService())
+ {
+ throw new RuntimeException("Specified implementation class for @Service was not a Service Bean: "
+ + serviceImplementationClass.getName());
+ }
+
+ // Cast
+ JBossServiceBeanMetaData smd = (JBossServiceBeanMetaData) beanMetaData;
+
+ // Decorate Metadata
+ beanMetaData = new JBossSessionPolicyDecorator(smd, new BasicJndiBindingPolicy());
+
+ // Make a Container
+ ServiceContainer container = new ServiceContainer(smd, Thread.currentThread().getContextClassLoader());
+
+ // Return
+ return container;
+ }
+
+}
Property changes on: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/Utils.java
___________________________________________________________________
Name: svn:mergeinfo
+
Copied: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/container/ProxyTestClassAdvisor.java (from rev 85752, projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/common/container/ProxyTestClassAdvisor.java)
===================================================================
--- projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/container/ProxyTestClassAdvisor.java (rev 0)
+++ projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/container/ProxyTestClassAdvisor.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -0,0 +1,157 @@
+/*
+ * 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.test.proxy.impl.common.container;
+
+import java.lang.reflect.Method;
+import java.util.Set;
+
+import org.jboss.aop.AspectManager;
+import org.jboss.aop.ClassAdvisor;
+import org.jboss.aop.util.MethodHashing;
+import org.jboss.logging.Logger;
+
+/**
+ * ProxyTestClassAdvisor
+ *
+ * An Advisor for SessionContainers used in the EJB3
+ * Proxy Test Suite
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+public class ProxyTestClassAdvisor extends ClassAdvisor
+{
+
+ // --------------------------------------------------------------------------------||
+ // Class Members ------------------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ /**
+ * Logger
+ */
+ private static final Logger log = Logger.getLogger(ProxyTestClassAdvisor.class);
+
+ // --------------------------------------------------------------------------------||
+ // Instance Members ---------------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ /**
+ * The backing SessionContainer to be advised
+ */
+ private SessionContainer container;
+
+ // --------------------------------------------------------------------------------||
+ // Constructor --------------------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ /**
+ * Constructor
+ *
+ * Creates an Advisor targeted for the specified SessionContainer,
+ * repopulating the method tables and rebuilding the method chains
+ * to include virtual methods defined by the EJB itself.
+ *
+ * @param container
+ * @param manager
+ */
+ public ProxyTestClassAdvisor(SessionContainer container, AspectManager manager)
+ {
+ // Call Super implementation, advising the Bean Implementation class
+ super(container.getBeanClass(), manager);
+
+ // Set the Container
+ this.setContainer(container);
+
+ // Recreate Method Tables (advisedMethods)
+ try
+ {
+ this.createMethodTables();
+ }
+ catch (Exception e)
+ {
+ throw new RuntimeException(e);
+ }
+
+ // Reinitialize the method chain (for methodInfos)
+ this.initializeMethodChain();
+
+ }
+
+ // --------------------------------------------------------------------------------||
+ // Overridden Implementations -----------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ /**
+ * Overridden method tables definition to include
+ * virtual methods declared by the Container's EJB
+ */
+ @Override
+ protected void createMethodTables() throws Exception
+ {
+ // Call Super
+ super.createMethodTables();
+
+ // Obtain Virtual Methods declared by the EJB
+ Set<Method> virtualMethods = getVirtualMethods();
+
+ // If virtual methods exist
+ if (virtualMethods != null)
+ {
+ // For each virtual method
+ for (Method virtualMethod : virtualMethods)
+ {
+ // Calculate the hash
+ long hash = MethodHashing.methodHash(virtualMethod);
+
+ // Add to the advised methods
+ this.advisedMethods.put(hash, virtualMethod);
+
+ // Log
+ log.debug("Added method with hash " + hash + " to those advised for " + this.clazz + ": " + virtualMethod);
+ }
+ }
+ }
+
+ // --------------------------------------------------------------------------------||
+ // Accessors / Mutators -----------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ /**
+ * Delegates back to the Container to obtain virtual methods
+ * declared by the EJB
+ */
+ private Set<Method> getVirtualMethods()
+ {
+ return this.getContainer().getVirtualMethods();
+ }
+
+ protected SessionContainer getContainer()
+ {
+ return container;
+ }
+
+ private void setContainer(SessionContainer container)
+ {
+ this.container = container;
+ }
+
+}
Property changes on: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/container/ProxyTestClassAdvisor.java
___________________________________________________________________
Name: svn:mergeinfo
+
Copied: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/container/ProxyTestClassProxyHack.java (from rev 85752, projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/common/container/ProxyTestClassProxyHack.java)
===================================================================
--- projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/container/ProxyTestClassProxyHack.java (rev 0)
+++ projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/container/ProxyTestClassProxyHack.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -0,0 +1,74 @@
+/*
+ * 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.test.proxy.impl.common.container;
+
+import org.jboss.aop.InstanceAdvisor;
+import org.jboss.aop.joinpoint.Invocation;
+import org.jboss.aop.joinpoint.InvocationResponse;
+import org.jboss.aop.proxy.ClassProxy;
+import org.jboss.aop.proxy.ProxyMixin;
+import org.jboss.ejb3.proxy.spi.container.InvokableContext;
+import org.jboss.util.NotImplementedException;
+
+/**
+ * ProxyTestClassProxyHack
+ *
+ * Adapted from ClassProxyHack in EJB3 Core
+ * (ie. Carlo).
+ *
+ * Used to expose the dynamic invocation handling
+ * of an InvokableContext to Remoting
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+class ProxyTestClassProxyHack implements ClassProxy
+{
+ private InvokableContext container;
+
+ ProxyTestClassProxyHack(InvokableContext container)
+ {
+ assert container != null : "Specified " + InvokableContext.class.getSimpleName() + " may not be null.";
+ this.container = container;
+ }
+
+ public InvocationResponse _dynamicInvoke(Invocation invocation) throws Throwable
+ {
+ return container.dynamicInvoke(invocation);
+ }
+
+ public void setMixins(ProxyMixin[] mixins)
+ {
+ throw new NotImplementedException();
+ }
+
+ public InstanceAdvisor _getInstanceAdvisor()
+ {
+ throw new NotImplementedException();
+ }
+
+ public void _setInstanceAdvisor(InstanceAdvisor newAdvisor)
+ {
+ throw new NotImplementedException();
+ }
+
+}
Property changes on: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/container/ProxyTestClassProxyHack.java
___________________________________________________________________
Name: svn:mergeinfo
+
Copied: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/container/ServiceContainer.java (from rev 85752, projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/common/container/ServiceContainer.java)
===================================================================
--- projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/container/ServiceContainer.java (rev 0)
+++ projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/container/ServiceContainer.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -0,0 +1,137 @@
+/*
+ * 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.test.proxy.impl.common.container;
+
+import java.io.Serializable;
+import java.util.UUID;
+
+import org.jboss.ejb3.proxy.impl.objectstore.ObjectStoreBindings;
+import org.jboss.ejb3.proxy.spi.container.InvokableContext;
+import org.jboss.logging.Logger;
+import org.jboss.metadata.ejb.jboss.JBossSessionBeanMetaData;
+
+/**
+ * A simple @Service container that binds proxies and can be invoked.
+ *
+ * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
+ * @version $Revision: $
+ */
+public class ServiceContainer extends SessionSpecContainer implements InvokableContext
+{
+
+ // --------------------------------------------------------------------------------||
+ // Class Members ------------------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ private static final Logger log = Logger.getLogger(ServiceContainer.class);
+
+ // --------------------------------------------------------------------------------||
+ // Instance Members ---------------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ /**
+ * Singleton instance
+ */
+ private Object beanInstance;
+
+ // --------------------------------------------------------------------------------||
+ // Constructors -------------------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ public ServiceContainer(JBossSessionBeanMetaData metaData, ClassLoader classLoader) throws ClassNotFoundException
+ {
+ super(metaData, classLoader);
+ }
+
+ // --------------------------------------------------------------------------------||
+ // Required Implementations -------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ /**
+ * Creates a unique name for this container
+ *
+ * @return
+ */
+ @Override
+ protected final String createContainerName()
+ {
+ return ObjectStoreBindings.OBJECTSTORE_NAMESPACE_EJBCONTAINER_SERVICE + this.getMetaData().getEjbName() + "/"
+ + UUID.randomUUID();
+ }
+
+ /**
+ * Returns the name under which the JNDI Registrar for this container is bound
+ *
+ * @return
+ */
+ @Override
+ protected String getJndiRegistrarBindName()
+ {
+ return ObjectStoreBindings.OBJECTSTORE_BEAN_NAME_JNDI_REGISTRAR_SERVICE;
+ }
+
+ /**
+ * Obtains the appropriate bean instance for invocation.
+ * Specified Session ID will be ignored
+ *
+ * @param sessionId
+ * @return
+ */
+ @Override
+ //FIXME: @Service has no Session ID
+ protected synchronized Object getBeanInstance(Serializable sessionId)
+ {
+ // Check if bean instance is not yet created
+ if (this.getBeanInstance() == null)
+ {
+ try
+ {
+ // Create and set the instance
+ Object beanInstance = this.createInstance();
+ this.setBeanInstance(beanInstance);
+ log.info("Set bean (Singleton) instance: " + beanInstance);
+ }
+ catch (Throwable t)
+ {
+ throw new RuntimeException("Error in creating new @Service Bean Instance", t);
+ }
+ }
+
+ // Return
+ return this.getBeanInstance();
+ }
+
+ // --------------------------------------------------------------------------------||
+ // Accessors / Mutators -----------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ protected Object getBeanInstance()
+ {
+ return beanInstance;
+ }
+
+ protected void setBeanInstance(Object beanInstance)
+ {
+ this.beanInstance = beanInstance;
+ }
+
+}
Property changes on: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/container/ServiceContainer.java
___________________________________________________________________
Name: svn:mergeinfo
+
Copied: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/container/SessionContainer.java (from rev 85752, projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/common/container/SessionContainer.java)
===================================================================
--- projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/container/SessionContainer.java (rev 0)
+++ projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/container/SessionContainer.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -0,0 +1,623 @@
+/*
+ * 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.test.proxy.impl.common.container;
+
+import java.io.Serializable;
+import java.lang.reflect.Method;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+
+import javax.naming.Context;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+
+import org.jboss.aop.Advisor;
+import org.jboss.aop.AspectManager;
+import org.jboss.aop.Dispatcher;
+import org.jboss.aop.MethodInfo;
+import org.jboss.aop.advice.Interceptor;
+import org.jboss.aop.joinpoint.Invocation;
+import org.jboss.aop.joinpoint.InvocationResponse;
+import org.jboss.aop.joinpoint.MethodInvocation;
+import org.jboss.beans.metadata.api.annotations.Start;
+import org.jboss.beans.metadata.api.annotations.Stop;
+import org.jboss.ejb3.common.lang.SerializableMethod;
+import org.jboss.ejb3.common.registrar.spi.Ejb3Registrar;
+import org.jboss.ejb3.common.registrar.spi.Ejb3RegistrarLocator;
+import org.jboss.ejb3.common.registrar.spi.NotBoundException;
+import org.jboss.ejb3.proxy.impl.jndiregistrar.JndiSessionRegistrarBase;
+import org.jboss.ejb3.proxy.impl.remoting.StatefulSessionRemotingMetadata;
+import org.jboss.ejb3.proxy.spi.container.InvokableContext;
+import org.jboss.ejb3.proxy.spi.intf.SessionProxy;
+import org.jboss.ejb3.proxy.spi.intf.StatefulSessionProxy;
+import org.jboss.logging.Logger;
+import org.jboss.metadata.ejb.jboss.JBossSessionBeanMetaData;
+import org.jboss.metadata.ejb.spec.BusinessLocalsMetaData;
+import org.jboss.metadata.ejb.spec.BusinessRemotesMetaData;
+
+/**
+ * SessionContainer
+ *
+ * A Mock Session Container for use in Proxy Testing
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+public abstract class SessionContainer implements InvokableContext
+{
+ // --------------------------------------------------------------------------------||
+ // Class Members ------------------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ private static final Logger log = Logger.getLogger(SessionContainer.class);
+
+ // --------------------------------------------------------------------------------||
+ // Instance Members ---------------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ /**
+ * The unique name under which this container has been registered
+ */
+ private String name;
+
+ /**
+ * The CL for this container and all classes associated with this EJB
+ */
+ private ClassLoader classLoader;
+
+ /**
+ * Metadata for this Container
+ */
+ private JBossSessionBeanMetaData metaData;
+
+ /**
+ * The Bean Implementation Class
+ */
+ private Class<?> beanClass;
+
+ /**
+ * The optional JNDI Registrar
+ */
+ private JndiSessionRegistrarBase jndiRegistrar;
+
+ /**
+ * The JNDI Context to use for binding
+ */
+ private Context jndiContext;
+
+ /**
+ * The AOP Advisor
+ */
+ private Advisor advisor;
+
+ // --------------------------------------------------------------------------------||
+ // Constructor --------------------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ /**
+ * Constructor
+ *
+ * @param metaData
+ * @param classLoader
+ */
+ protected SessionContainer(JBossSessionBeanMetaData metaData, ClassLoader classLoader)
+ {
+ // Set Metadata
+ this.setMetaData(metaData);
+
+ // Set CL
+ this.setClassLoader(classLoader);
+
+ // Set name
+ this.setName(this.createContainerName());
+
+ // Set Bean Class
+ String beanClassName = this.getMetaData().getEjbClass();
+ try
+ {
+ this.setBeanClass(this.getClassLoader().loadClass(beanClassName));
+ }
+ catch (ClassNotFoundException e)
+ {
+ throw new RuntimeException("Could not find Bean Implementation class \"" + beanClassName + "\" in the "
+ + ClassLoader.class.getSimpleName() + " for " + this);
+ }
+
+ // Set Advisor
+ AspectManager aspectManager = AspectManager.instance(this.getClassLoader());
+ Advisor advisor = new ProxyTestClassAdvisor(this, aspectManager);
+ this.setAdvisor(advisor);
+ }
+
+ // --------------------------------------------------------------------------------||
+ // Functional Methods -------------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ /**
+ * Invokes the method described by the specified serializable method
+ * as called from the specified proxy, using the specified arguments
+ *
+ * @param proxy The proxy making the invocation
+ * @param method The method to be invoked
+ * @param args The arguments to the invocation
+ * @throws Throwable A possible exception thrown by the invocation
+ * @return
+ */
+ public Object invoke(SessionProxy proxy, SerializableMethod method, Object[] args) throws Throwable
+ {
+ Method m = method.toMethod(this.getClassLoader());
+
+ // Invoke on the bean
+ return invokeBean(proxy, m, args);
+ }
+
+ /**
+ * Invocation point of entry for Remoting
+ *
+ * @param invocation
+ * @return
+ * @throws Throwable
+ */
+ public InvocationResponse dynamicInvoke(Invocation invocation) throws Throwable
+ {
+ /*
+ * Set the proper TCL
+ */
+
+ // Hold a reference to the existing TCL
+ ClassLoader originalLoader = Thread.currentThread().getContextClassLoader();
+
+ // Set the Container's CL as TCL, required to unmarshall methods from the bean impl class
+ Thread.currentThread().setContextClassLoader(this.getClassLoader());
+
+ try
+ {
+
+ /*
+ * Obtain the target method (unmarshall from invocation)
+ */
+
+ // Cast
+ assert invocation instanceof MethodInvocation : SessionContainer.class.getName()
+ + ".dynamicInoke supports only " + MethodInvocation.class.getSimpleName() + ", but has been passed: "
+ + invocation;
+ MethodInvocation mi = (MethodInvocation) invocation;
+
+ // Get the method hash
+ long methodHash = mi.getMethodHash();
+ log.debug("Received dynamic invocation for method with hash: " + methodHash);
+
+ // Get the Method via MethodInfo from the Advisor
+ Advisor advisor = this.getAdvisor();
+ MethodInfo info = advisor.getMethodInfo(mi.getMethodHash());
+
+ /*
+ * Build a new Invocation
+ */
+
+ // Construct the invocation
+ MethodInvocation newInvocation = new MethodInvocation(info, new Interceptor[]
+ {});
+ Object[] args = mi.getArguments();
+ newInvocation.setArguments(args);
+ newInvocation.setMetaData(mi.getMetaData());
+ newInvocation.setAdvisor(advisor);
+
+ // Obtain the Session ID
+ Serializable sessionId = null;
+ Object objSessionId = mi.getMetaData(StatefulSessionRemotingMetadata.TAG_SFSB_INVOCATION,
+ StatefulSessionRemotingMetadata.KEY_SESSION_ID);
+ if (objSessionId != null)
+ {
+ assert objSessionId instanceof Serializable : "Session IDs must be " + Serializable.class.getSimpleName();
+ sessionId = (Serializable) objSessionId;
+ }
+
+ // Get the target, and set on the invocation
+ Object target = this.getBeanInstance(sessionId);
+ newInvocation.setTargetObject(target);
+
+ // Create an Object reference to hold the return value
+ Object returnValue = null;
+
+ // Create a reference to the Invocation's response
+ InvocationResponse response = null;
+
+ /*
+ * Invoke
+ */
+
+ // Invoke
+ returnValue = newInvocation.invokeNext();
+
+ // Create a Response
+ response = new InvocationResponse(returnValue);
+ Map<Object, Object> responseContext = newInvocation.getResponseContextInfo();
+ response.setContextInfo(responseContext);
+
+ // Return
+ return response;
+ }
+ finally
+ {
+ // Reset the TCL to original
+ Thread.currentThread().setContextClassLoader(originalLoader);
+ }
+ }
+
+ protected Object createInstance() throws InstantiationException, IllegalAccessException
+ {
+ return this.getBeanClass().newInstance();
+ }
+
+ //FIXME: Should be agnostic to Session IDs, SLSBs have none
+ public Object invokeBean(Object proxy, Method method, Object args[]) throws Throwable
+ {
+ // Initialize a Session ID
+ Object sessionId = null;
+
+ // Obtain the InvocationHandler
+ if (proxy instanceof StatefulSessionProxy)
+ {
+ StatefulSessionProxy statefulProxy = (StatefulSessionProxy) proxy;
+
+ // Get the Session ID
+ sessionId = statefulProxy.getTarget();
+ }
+
+ // Get the appropriate instance
+ Object obj = this.getBeanInstance((Serializable) sessionId);
+
+ // Invoke
+ return method.invoke(obj, args);
+ }
+
+ @Start
+ public void start() throws Throwable
+ {
+ log.info("Starting " + this);
+
+ // Register with Remoting
+ Dispatcher.singleton.registerTarget(this.getName(), new ProxyTestClassProxyHack(this));
+
+ // Obtain registrar
+ JndiSessionRegistrarBase registrar = this.getJndiRegistrar();
+
+ // Bind all appropriate references/factories to Global JNDI for Client access, if a JNDI Registrar is present
+ if (registrar != null)
+ {
+ this.setJndiRegistrar(registrar);
+ registrar.bindEjb(this.getJndiContext(), this.getMetaData(), this.getClassLoader(), this.getName(), this
+ .getName(), this.getAdvisor());
+ }
+ else
+ {
+ log.warn("No " + JndiSessionRegistrarBase.class.getSimpleName()
+ + " was found; byassing binding of Proxies to " + this.getName() + " in Global JNDI.");
+ }
+
+ }
+
+ @Stop
+ public void stop()
+ {
+ log.info("Stopping " + this);
+
+ // Deregister with Remoting
+ Dispatcher.singleton.unregisterTarget(this.getName());
+
+ // Obtain registrar
+ JndiSessionRegistrarBase registrar = this.getJndiRegistrar();
+
+ // If the registrar has been used for this container, unbind all JNDI references
+ if (registrar != null)
+ {
+ registrar.unbindEjb(this.getJndiContext(), this.getMetaData());
+ }
+ }
+
+ /**
+ * Obtains the JndiSessionRegistrarBase from MC, null if not found
+ *
+ * @return
+ */
+ protected JndiSessionRegistrarBase getJndiRegistrar()
+ {
+ // If the JNDI Registrar has not yet been set
+ if (this.jndiRegistrar == null)
+ {
+ // Initialize
+ String jndiRegistrarBindName = this.getJndiRegistrarBindName();
+
+ // Obtain Registrar
+ Ejb3Registrar registrar = Ejb3RegistrarLocator.locateRegistrar();
+
+ // Lookup
+ Object obj = null;
+ try
+ {
+ obj = registrar.lookup(jndiRegistrarBindName);
+ }
+ // If not installed, warn and return null
+ catch (NotBoundException e)
+ {
+ log.warn("No " + JndiSessionRegistrarBase.class.getName()
+ + " was found installed in the ObjectStore (Registry) at " + jndiRegistrarBindName);
+ return null;
+
+ }
+
+ // Cast and set
+ this.setJndiRegistrar((JndiSessionRegistrarBase) obj);
+ }
+
+ // Return
+ return jndiRegistrar;
+ }
+
+ // --------------------------------------------------------------------------------||
+ // Contracts ----------------------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ /**
+ * Creates a unique name for this container
+ *
+ * @return
+ */
+ protected abstract String createContainerName();
+
+ /**
+ * Returns the name under which the JNDI Registrar for this container is bound
+ *
+ * @return
+ */
+ protected abstract String getJndiRegistrarBindName();
+
+ /**
+ * Obtains the appropriate bean instance for invocation
+ * as called from the specified proxy
+ *
+ * @param sessionId
+ * @return
+ */
+ protected abstract Object getBeanInstance(Serializable sessionId);
+
+ // --------------------------------------------------------------------------------||
+ // Internal Helper Methods --------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ /**
+ * Obtains a List of all methods handled by the bean class
+ *
+ * @return The methods handled by the bean class directly
+ */
+ public Set<Method> getVirtualMethods()
+ {
+ // Initialize
+ Set<Method> virtualMethods = new HashSet<Method>();
+
+ // Obtain Metadata
+ JBossSessionBeanMetaData smd = this.getMetaData();
+
+ // Obtain CL
+ ClassLoader cl = this.getClassLoader();
+
+ /*
+ * Business Remotes
+ */
+
+ // Obtain all specified business remotes
+ BusinessRemotesMetaData businessRemotes = smd.getBusinessRemotes();
+ if (businessRemotes != null)
+ {
+ // For each business remote
+ for (String businessRemote : businessRemotes)
+ {
+ // Load the Class
+ Class<?> businessRemoteClass = null;
+ try
+ {
+ businessRemoteClass = Class.forName(businessRemote, true, cl);
+ }
+ catch (ClassNotFoundException e)
+ {
+ throw new RuntimeException("Could not find specified business remote class: " + businessRemote, e);
+ }
+
+ // Obtain all methods declared by the class
+ Method[] declaredMethods = businessRemoteClass.getMethods();
+
+ // Add each method
+ for (Method declaredMethod : declaredMethods)
+ {
+ virtualMethods.add(declaredMethod);
+ }
+ }
+ }
+
+ /*
+ * Business Locals
+ */
+
+ // Obtain all specified business locals
+ BusinessLocalsMetaData businessLocals = smd.getBusinessLocals();
+ if (businessLocals != null)
+ {
+ // For each business local
+ for (String businessLocal : businessLocals)
+ {
+ // Load the Class
+ Class<?> businessLocalClass = null;
+ try
+ {
+ businessLocalClass = Class.forName(businessLocal, true, cl);
+ }
+ catch (ClassNotFoundException e)
+ {
+ throw new RuntimeException("Could not find specified business local class: " + businessLocal, e);
+ }
+
+ // Obtain all methods declared by the class
+ Method[] declaredMethods = businessLocalClass.getMethods();
+
+ // Add each method
+ for (Method declaredMethod : declaredMethods)
+ {
+ virtualMethods.add(declaredMethod);
+ }
+ }
+ }
+
+ // Remote Home
+ String remoteHomeClassName = smd.getHome();
+ if (remoteHomeClassName != null)
+ {
+ Class<?> remoteHomeClass = null;
+ try
+ {
+ remoteHomeClass = Class.forName(remoteHomeClassName, true, cl);
+ }
+ catch (ClassNotFoundException e)
+ {
+ throw new RuntimeException("Could not find specified Remote Home Class: " + remoteHomeClassName, e);
+ }
+ if (remoteHomeClass != null)
+ {
+ Method[] declaredMethods = remoteHomeClass.getMethods();
+ for (Method declaredMethod : declaredMethods)
+ virtualMethods.add(declaredMethod);
+
+ declaredMethods = javax.ejb.EJBObject.class.getMethods();
+ for (Method declaredMethod : declaredMethods)
+ virtualMethods.add(declaredMethod);
+ }
+ }
+
+ // Local Home
+ String localHomeClassName = smd.getLocalHome();
+ if (localHomeClassName != null)
+ {
+ Class<?> localHomeClass = null;
+ try
+ {
+ localHomeClass = Class.forName(localHomeClassName, true, cl);
+ }
+ catch (ClassNotFoundException e)
+ {
+ throw new RuntimeException("Could not find specified Local Home Class: " + localHomeClass, e);
+ }
+ if (localHomeClass != null)
+ {
+ Method[] declaredMethods = localHomeClass.getMethods();
+ for (Method declaredMethod : declaredMethods)
+ virtualMethods.add(declaredMethod);
+
+ declaredMethods = javax.ejb.EJBLocalObject.class.getMethods();
+ for (Method declaredMethod : declaredMethods)
+ virtualMethods.add(declaredMethod);
+ }
+ }
+
+ return virtualMethods;
+ }
+
+ // --------------------------------------------------------------------------------||
+ // Accessors / Mutators -----------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ public String getName()
+ {
+ return name;
+ }
+
+ protected void setName(String name)
+ {
+ this.name = name;
+ }
+
+ public ClassLoader getClassLoader()
+ {
+ return classLoader;
+ }
+
+ private void setClassLoader(ClassLoader classLoader)
+ {
+ this.classLoader = classLoader;
+ }
+
+ public JBossSessionBeanMetaData getMetaData()
+ {
+ return metaData;
+ }
+
+ private void setMetaData(JBossSessionBeanMetaData metaData)
+ {
+ this.metaData = metaData;
+ }
+
+ public Class<?> getBeanClass()
+ {
+ return beanClass;
+ }
+
+ private void setBeanClass(Class<?> beanClass)
+ {
+ this.beanClass = beanClass;
+ }
+
+ public void setJndiRegistrar(JndiSessionRegistrarBase jndiRegistrar)
+ {
+ this.jndiRegistrar = jndiRegistrar;
+ }
+
+ protected Context getJndiContext()
+ {
+ if (this.jndiContext == null)
+ {
+ try
+ {
+ this.setJndiContext(new InitialContext());
+ }
+ catch (NamingException e)
+ {
+ throw new RuntimeException("Could not create new default JNDI Context for Container: " + this.getName(), e);
+ }
+ }
+ return jndiContext;
+ }
+
+ private void setJndiContext(Context jndiContext)
+ {
+ this.jndiContext = jndiContext;
+ }
+
+ public Advisor getAdvisor()
+ {
+ return advisor;
+ }
+
+ public void setAdvisor(Advisor advisor)
+ {
+ this.advisor = advisor;
+ }
+}
Property changes on: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/container/SessionContainer.java
___________________________________________________________________
Name: svn:mergeinfo
+
Copied: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/container/SessionSpecContainer.java (from rev 85752, projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/common/container/SessionSpecContainer.java)
===================================================================
--- projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/container/SessionSpecContainer.java (rev 0)
+++ projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/container/SessionSpecContainer.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -0,0 +1,51 @@
+/*
+ * 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.test.proxy.impl.common.container;
+
+import org.jboss.metadata.ejb.jboss.JBossSessionBeanMetaData;
+
+/**
+ * SessionSpecContainer
+ *
+ * A Mock Session Container adhering to the EJB 3.0 Specification
+ * for use in Proxy Testing
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+public abstract class SessionSpecContainer extends SessionContainer
+{
+ // --------------------------------------------------------------------------------||
+ // Constructor --------------------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ /**
+ * Constructor
+ *
+ * @param metadata
+ * @param classLoader
+ */
+ protected SessionSpecContainer(JBossSessionBeanMetaData metadata, ClassLoader classLoader)
+ {
+ super(metadata, classLoader);
+ }
+}
Property changes on: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/container/SessionSpecContainer.java
___________________________________________________________________
Name: svn:mergeinfo
+
Copied: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/container/StatefulContainer.java (from rev 85752, projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/common/container/StatefulContainer.java)
===================================================================
--- projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/container/StatefulContainer.java (rev 0)
+++ projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/container/StatefulContainer.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -0,0 +1,155 @@
+/*
+ * 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.test.proxy.impl.common.container;
+
+import java.io.Serializable;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.UUID;
+
+import org.jboss.ejb3.proxy.impl.objectstore.ObjectStoreBindings;
+import org.jboss.ejb3.proxy.spi.container.StatefulSessionFactory;
+import org.jboss.metadata.ejb.jboss.JBossSessionBeanMetaData;
+
+/**
+ * StatefulContainer
+ *
+ * A Mock SFSB Container for use in Testing
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+public class StatefulContainer extends SessionSpecContainer implements StatefulSessionFactory
+{
+
+ // --------------------------------------------------------------------------------||
+ // Instance Members ---------------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ /**
+ * Cache of SFSB instances in key = sessionId and value = instance
+ */
+ private Map<Object, Object> cache;
+
+ // --------------------------------------------------------------------------------||
+ // Constructor --------------------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ public StatefulContainer(JBossSessionBeanMetaData metaData, ClassLoader classLoader) throws ClassNotFoundException
+ {
+ // Call super
+ super(metaData, classLoader);
+
+ // Instanciate Cache
+ this.setCache(new HashMap<Object, Object>());
+
+ }
+
+ // --------------------------------------------------------------------------------||
+ // Required Implementations -------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ /**
+ * Creates a new user session and returns the unique Session ID
+ *
+ * @return
+ */
+ public Serializable createSession()
+ {
+ // Create a new Session ID
+ Serializable sessionId = UUID.randomUUID();
+
+ // Create a new Instance
+ Object instance = null;
+ try
+ {
+ instance = this.createInstance();
+ }
+ catch (Throwable t)
+ {
+ throw new RuntimeException("Error in creating new instance of " + this.getBeanClass(), t);
+ }
+
+ // Place in cache
+ this.getCache().put(sessionId, instance);
+
+ // Return
+ return sessionId;
+ }
+
+ /**
+ * Creates a unique name for this container
+ *
+ * @return
+ */
+ protected final String createContainerName()
+ {
+ return ObjectStoreBindings.OBJECTSTORE_NAMESPACE_EJBCONTAINER_STATEFUL + this.getMetaData().getEjbName() + "/"
+ + UUID.randomUUID();
+ }
+
+ /**
+ * Returns the name under which the JNDI Registrar for this container is bound
+ *
+ * @return
+ */
+ protected String getJndiRegistrarBindName()
+ {
+ return ObjectStoreBindings.OBJECTSTORE_BEAN_NAME_JNDI_REGISTRAR_SFSB;
+ }
+
+ /**
+ * Obtains the appropriate bean instance for invocation
+ * as called from the specified proxy
+ *
+ * @param sessionId
+ * @return
+ */
+ protected Object getBeanInstance(Serializable sessionId)
+ {
+ // Sanity Check
+ assert sessionId != null : "No Session ID specified, and this is required for SFSB Invocation";
+
+ // Get the corresponding instance from the cache
+ Object bean = this.getCache().get(sessionId);
+ assert bean != null : "Session ID of " + sessionId
+ + " declared, but no corresponding bean instance could be found";
+
+ // Return
+ return bean;
+ }
+
+ // --------------------------------------------------------------------------------||
+ // Accessors / Mutators -----------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ protected Map<Object, Object> getCache()
+ {
+ return cache;
+ }
+
+ protected void setCache(Map<Object, Object> cache)
+ {
+ this.cache = cache;
+ }
+
+}
Property changes on: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/container/StatefulContainer.java
___________________________________________________________________
Name: svn:mergeinfo
+
Copied: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/container/StatelessContainer.java (from rev 85752, projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/common/container/StatelessContainer.java)
===================================================================
--- projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/container/StatelessContainer.java (rev 0)
+++ projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/container/StatelessContainer.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -0,0 +1,85 @@
+/*
+ * 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.test.proxy.impl.common.container;
+
+import java.io.Serializable;
+import java.util.UUID;
+
+import org.jboss.ejb3.proxy.impl.objectstore.ObjectStoreBindings;
+import org.jboss.ejb3.proxy.spi.container.InvokableContext;
+import org.jboss.metadata.ejb.jboss.JBossSessionBeanMetaData;
+
+/**
+ * A simple stateless container that binds proxies and can be invoked.
+ *
+ * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
+ * @version $Revision: $
+ */
+public class StatelessContainer extends SessionSpecContainer implements InvokableContext
+{
+ public StatelessContainer(JBossSessionBeanMetaData metaData, ClassLoader classLoader) throws ClassNotFoundException
+ {
+ super(metaData, classLoader);
+ }
+
+ /**
+ * Creates a unique name for this container
+ *
+ * @return
+ */
+ protected final String createContainerName()
+ {
+ return ObjectStoreBindings.OBJECTSTORE_NAMESPACE_EJBCONTAINER_STATELESS + this.getMetaData().getEjbName() + "/"
+ + UUID.randomUUID();
+ }
+
+ /**
+ * Returns the name under which the JNDI Registrar for this container is bound
+ *
+ * @return
+ */
+ protected String getJndiRegistrarBindName()
+ {
+ return ObjectStoreBindings.OBJECTSTORE_BEAN_NAME_JNDI_REGISTRAR_SLSB;
+ }
+
+ /**
+ * Obtains the appropriate bean instance for invocation.
+ * Specified Session ID will be ignored
+ *
+ * @param sessionId
+ * @return
+ */
+ //FIXME: SLSBs have no Session ID
+ protected Object getBeanInstance(Serializable sessionId)
+ {
+ // Typically this would be obtained from a Pool
+ try
+ {
+ return this.createInstance();
+ }
+ catch (Throwable t)
+ {
+ throw new RuntimeException("Error in creating new SLSB Bean Instance", t);
+ }
+ }
+}
Property changes on: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/container/StatelessContainer.java
___________________________________________________________________
Name: svn:mergeinfo
+
Copied: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/container/unit (from rev 85752, projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/common/container/unit)
Property changes on: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/container/unit
___________________________________________________________________
Name: svn:mergeinfo
+
Modified: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/container/unit/SessionContainerTestCase.java
===================================================================
--- projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/common/container/unit/SessionContainerTestCase.java 2009-03-12 00:10:16 UTC (rev 85752)
+++ projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/container/unit/SessionContainerTestCase.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -19,7 +19,7 @@
* 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.test.proxy.common.container.unit;
+package org.jboss.ejb3.test.proxy.impl.common.container.unit;
import static org.junit.Assert.assertNotNull;
@@ -30,12 +30,12 @@
import org.jboss.ejb3.common.registrar.spi.Ejb3RegistrarLocator;
import org.jboss.ejb3.common.registrar.spi.NotBoundException;
import org.jboss.ejb3.test.mc.bootstrap.EmbeddedTestMcBootstrap;
-import org.jboss.ejb3.test.proxy.common.Utils;
-import org.jboss.ejb3.test.proxy.common.container.SessionContainer;
-import org.jboss.ejb3.test.proxy.common.container.StatefulContainer;
-import org.jboss.ejb3.test.proxy.common.container.StatelessContainer;
-import org.jboss.ejb3.test.proxy.common.ejb.slsb.SimpleSLSBLocal;
-import org.jboss.ejb3.test.proxy.common.ejb.slsb.SimpleSLSBean;
+import org.jboss.ejb3.test.proxy.impl.common.Utils;
+import org.jboss.ejb3.test.proxy.impl.common.container.SessionContainer;
+import org.jboss.ejb3.test.proxy.impl.common.container.StatefulContainer;
+import org.jboss.ejb3.test.proxy.impl.common.container.StatelessContainer;
+import org.jboss.ejb3.test.proxy.impl.common.ejb.slsb.SimpleSLSBLocal;
+import org.jboss.ejb3.test.proxy.impl.common.ejb.slsb.SimpleSLSBean;
import org.jboss.logging.Logger;
import org.junit.After;
import org.junit.AfterClass;
Copied: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/ejb/service (from rev 85752, projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/common/ejb/service)
Property changes on: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/ejb/service
___________________________________________________________________
Name: svn:mergeinfo
+
Modified: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/ejb/service/MyService.java
===================================================================
--- projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/common/ejb/service/MyService.java 2009-03-12 00:10:16 UTC (rev 85752)
+++ projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/ejb/service/MyService.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -19,7 +19,7 @@
* 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.test.proxy.common.ejb.service;
+package org.jboss.ejb3.test.proxy.impl.common.ejb.service;
import java.util.UUID;
Modified: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/ejb/service/MyServiceBean.java
===================================================================
--- projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/common/ejb/service/MyServiceBean.java 2009-03-12 00:10:16 UTC (rev 85752)
+++ projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/ejb/service/MyServiceBean.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -19,7 +19,7 @@
* 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.test.proxy.common.ejb.service;
+package org.jboss.ejb3.test.proxy.impl.common.ejb.service;
import javax.ejb.Local;
import javax.ejb.Remote;
Modified: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/ejb/service/MyServiceBeanBase.java
===================================================================
--- projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/common/ejb/service/MyServiceBeanBase.java 2009-03-12 00:10:16 UTC (rev 85752)
+++ projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/ejb/service/MyServiceBeanBase.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -19,7 +19,7 @@
* 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.test.proxy.common.ejb.service;
+package org.jboss.ejb3.test.proxy.impl.common.ejb.service;
import java.util.UUID;
Modified: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/ejb/service/MyServiceBeanWithExplicitJndiBindings.java
===================================================================
--- projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/common/ejb/service/MyServiceBeanWithExplicitJndiBindings.java 2009-03-12 00:10:16 UTC (rev 85752)
+++ projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/ejb/service/MyServiceBeanWithExplicitJndiBindings.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -19,7 +19,7 @@
* 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.test.proxy.common.ejb.service;
+package org.jboss.ejb3.test.proxy.impl.common.ejb.service;
import javax.ejb.Local;
import javax.ejb.Remote;
Modified: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/ejb/service/MyServiceLocalBusiness.java
===================================================================
--- projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/common/ejb/service/MyServiceLocalBusiness.java 2009-03-12 00:10:16 UTC (rev 85752)
+++ projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/ejb/service/MyServiceLocalBusiness.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -19,7 +19,7 @@
* 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.test.proxy.common.ejb.service;
+package org.jboss.ejb3.test.proxy.impl.common.ejb.service;
/**
* MyServiceLocalBusiness
Modified: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/ejb/service/MyServiceRemoteBusiness.java
===================================================================
--- projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/common/ejb/service/MyServiceRemoteBusiness.java 2009-03-12 00:10:16 UTC (rev 85752)
+++ projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/ejb/service/MyServiceRemoteBusiness.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -19,7 +19,7 @@
* 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.test.proxy.common.ejb.service;
+package org.jboss.ejb3.test.proxy.impl.common.ejb.service;
/**
* MyServiceRemoteBusiness
Copied: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/ejb/sfsb (from rev 85752, projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/common/ejb/sfsb)
Property changes on: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/ejb/sfsb
___________________________________________________________________
Name: svn:mergeinfo
+
Modified: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/ejb/sfsb/MyStateful.java
===================================================================
--- projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/common/ejb/sfsb/MyStateful.java 2009-03-12 00:10:16 UTC (rev 85752)
+++ projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/ejb/sfsb/MyStateful.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -19,7 +19,7 @@
* 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.test.proxy.common.ejb.sfsb;
+package org.jboss.ejb3.test.proxy.impl.common.ejb.sfsb;
/**
* MyStateful
Modified: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/ejb/sfsb/MyStateful21Local.java
===================================================================
--- projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/common/ejb/sfsb/MyStateful21Local.java 2009-03-12 00:10:16 UTC (rev 85752)
+++ projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/ejb/sfsb/MyStateful21Local.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -19,7 +19,7 @@
* 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.test.proxy.common.ejb.sfsb;
+package org.jboss.ejb3.test.proxy.impl.common.ejb.sfsb;
import javax.ejb.EJBLocalObject;
Modified: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/ejb/sfsb/MyStateful21Remote.java
===================================================================
--- projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/common/ejb/sfsb/MyStateful21Remote.java 2009-03-12 00:10:16 UTC (rev 85752)
+++ projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/ejb/sfsb/MyStateful21Remote.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -19,7 +19,7 @@
* 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.test.proxy.common.ejb.sfsb;
+package org.jboss.ejb3.test.proxy.impl.common.ejb.sfsb;
import javax.ejb.EJBObject;
Modified: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/ejb/sfsb/MyStateful2xOnlyBean.java
===================================================================
--- projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/common/ejb/sfsb/MyStateful2xOnlyBean.java 2009-03-12 00:10:16 UTC (rev 85752)
+++ projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/ejb/sfsb/MyStateful2xOnlyBean.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -19,7 +19,7 @@
* 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.test.proxy.common.ejb.sfsb;
+package org.jboss.ejb3.test.proxy.impl.common.ejb.sfsb;
import javax.ejb.LocalHome;
import javax.ejb.RemoteHome;
Modified: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/ejb/sfsb/MyStateful2xOnlyWithBindingsBean.java
===================================================================
--- projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/common/ejb/sfsb/MyStateful2xOnlyWithBindingsBean.java 2009-03-12 00:10:16 UTC (rev 85752)
+++ projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/ejb/sfsb/MyStateful2xOnlyWithBindingsBean.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -19,7 +19,7 @@
* 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.test.proxy.common.ejb.sfsb;
+package org.jboss.ejb3.test.proxy.impl.common.ejb.sfsb;
import javax.ejb.LocalHome;
import javax.ejb.RemoteHome;
Modified: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/ejb/sfsb/MyStateful30OnlyBean.java
===================================================================
--- projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/common/ejb/sfsb/MyStateful30OnlyBean.java 2009-03-12 00:10:16 UTC (rev 85752)
+++ projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/ejb/sfsb/MyStateful30OnlyBean.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -19,7 +19,7 @@
* 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.test.proxy.common.ejb.sfsb;
+package org.jboss.ejb3.test.proxy.impl.common.ejb.sfsb;
import javax.ejb.Local;
import javax.ejb.Remote;
Modified: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/ejb/sfsb/MyStatefulBean.java
===================================================================
--- projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/common/ejb/sfsb/MyStatefulBean.java 2009-03-12 00:10:16 UTC (rev 85752)
+++ projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/ejb/sfsb/MyStatefulBean.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -19,7 +19,7 @@
* 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.test.proxy.common.ejb.sfsb;
+package org.jboss.ejb3.test.proxy.impl.common.ejb.sfsb;
import javax.ejb.Local;
import javax.ejb.LocalHome;
Modified: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/ejb/sfsb/MyStatefulBeanBase.java
===================================================================
--- projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/common/ejb/sfsb/MyStatefulBeanBase.java 2009-03-12 00:10:16 UTC (rev 85752)
+++ projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/ejb/sfsb/MyStatefulBeanBase.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -19,7 +19,7 @@
* 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.test.proxy.common.ejb.sfsb;
+package org.jboss.ejb3.test.proxy.impl.common.ejb.sfsb;
/**
* MyStatefulBeanBase
Modified: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/ejb/sfsb/MyStatefulBeanWithBindings.java
===================================================================
--- projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/common/ejb/sfsb/MyStatefulBeanWithBindings.java 2009-03-12 00:10:16 UTC (rev 85752)
+++ projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/ejb/sfsb/MyStatefulBeanWithBindings.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -19,7 +19,7 @@
* 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.test.proxy.common.ejb.sfsb;
+package org.jboss.ejb3.test.proxy.impl.common.ejb.sfsb;
import javax.ejb.Local;
import javax.ejb.LocalHome;
Modified: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/ejb/sfsb/MyStatefulBeanWithHomesBoundWithBusiness.java
===================================================================
--- projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/common/ejb/sfsb/MyStatefulBeanWithHomesBoundWithBusiness.java 2009-03-12 00:10:16 UTC (rev 85752)
+++ projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/ejb/sfsb/MyStatefulBeanWithHomesBoundWithBusiness.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -19,7 +19,7 @@
* 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.test.proxy.common.ejb.sfsb;
+package org.jboss.ejb3.test.proxy.impl.common.ejb.sfsb;
import javax.ejb.Local;
import javax.ejb.LocalHome;
Modified: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/ejb/sfsb/MyStatefulLocalBusiness.java
===================================================================
--- projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/common/ejb/sfsb/MyStatefulLocalBusiness.java 2009-03-12 00:10:16 UTC (rev 85752)
+++ projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/ejb/sfsb/MyStatefulLocalBusiness.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -19,7 +19,7 @@
* 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.test.proxy.common.ejb.sfsb;
+package org.jboss.ejb3.test.proxy.impl.common.ejb.sfsb;
/**
* MyStatefulLocalBusiness
Modified: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/ejb/sfsb/MyStatefulLocalHome.java
===================================================================
--- projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/common/ejb/sfsb/MyStatefulLocalHome.java 2009-03-12 00:10:16 UTC (rev 85752)
+++ projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/ejb/sfsb/MyStatefulLocalHome.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -19,7 +19,7 @@
* 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.test.proxy.common.ejb.sfsb;
+package org.jboss.ejb3.test.proxy.impl.common.ejb.sfsb;
import javax.ejb.EJBLocalHome;
Modified: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/ejb/sfsb/MyStatefulLocalOnlyBean.java
===================================================================
--- projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/common/ejb/sfsb/MyStatefulLocalOnlyBean.java 2009-03-12 00:10:16 UTC (rev 85752)
+++ projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/ejb/sfsb/MyStatefulLocalOnlyBean.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -19,7 +19,7 @@
* 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.test.proxy.common.ejb.sfsb;
+package org.jboss.ejb3.test.proxy.impl.common.ejb.sfsb;
import javax.ejb.Local;
import javax.ejb.LocalHome;
Modified: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/ejb/sfsb/MyStatefulRemoteBusiness.java
===================================================================
--- projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/common/ejb/sfsb/MyStatefulRemoteBusiness.java 2009-03-12 00:10:16 UTC (rev 85752)
+++ projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/ejb/sfsb/MyStatefulRemoteBusiness.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -19,7 +19,7 @@
* 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.test.proxy.common.ejb.sfsb;
+package org.jboss.ejb3.test.proxy.impl.common.ejb.sfsb;
/**
* MyStatefulRemoteBusiness
Modified: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/ejb/sfsb/MyStatefulRemoteHome.java
===================================================================
--- projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/common/ejb/sfsb/MyStatefulRemoteHome.java 2009-03-12 00:10:16 UTC (rev 85752)
+++ projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/ejb/sfsb/MyStatefulRemoteHome.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -19,7 +19,7 @@
* 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.test.proxy.common.ejb.sfsb;
+package org.jboss.ejb3.test.proxy.impl.common.ejb.sfsb;
import javax.ejb.EJBHome;
Modified: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/ejb/sfsb/MyStatefulRemoteOnlyBean.java
===================================================================
--- projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/common/ejb/sfsb/MyStatefulRemoteOnlyBean.java 2009-03-12 00:10:16 UTC (rev 85752)
+++ projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/ejb/sfsb/MyStatefulRemoteOnlyBean.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -19,7 +19,7 @@
* 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.test.proxy.common.ejb.sfsb;
+package org.jboss.ejb3.test.proxy.impl.common.ejb.sfsb;
import javax.ejb.Remote;
import javax.ejb.RemoteHome;
Copied: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/ejb/slsb (from rev 85752, projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/common/ejb/slsb)
Property changes on: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/ejb/slsb
___________________________________________________________________
Name: svn:mergeinfo
+
Modified: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/ejb/slsb/MyStateless.java
===================================================================
--- projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/common/ejb/slsb/MyStateless.java 2009-03-12 00:10:16 UTC (rev 85752)
+++ projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/ejb/slsb/MyStateless.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -19,7 +19,7 @@
* 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.test.proxy.common.ejb.slsb;
+package org.jboss.ejb3.test.proxy.impl.common.ejb.slsb;
/**
* @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
Modified: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/ejb/slsb/MyStateless21Local.java
===================================================================
--- projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/common/ejb/slsb/MyStateless21Local.java 2009-03-12 00:10:16 UTC (rev 85752)
+++ projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/ejb/slsb/MyStateless21Local.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -19,7 +19,7 @@
* 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.test.proxy.common.ejb.slsb;
+package org.jboss.ejb3.test.proxy.impl.common.ejb.slsb;
import javax.ejb.EJBLocalObject;
Modified: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/ejb/slsb/MyStateless21Remote.java
===================================================================
--- projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/common/ejb/slsb/MyStateless21Remote.java 2009-03-12 00:10:16 UTC (rev 85752)
+++ projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/ejb/slsb/MyStateless21Remote.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -19,7 +19,7 @@
* 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.test.proxy.common.ejb.slsb;
+package org.jboss.ejb3.test.proxy.impl.common.ejb.slsb;
import javax.ejb.EJBObject;
Modified: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/ejb/slsb/MyStateless2xOnlyBean.java
===================================================================
--- projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/common/ejb/slsb/MyStateless2xOnlyBean.java 2009-03-12 00:10:16 UTC (rev 85752)
+++ projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/ejb/slsb/MyStateless2xOnlyBean.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -19,7 +19,7 @@
* 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.test.proxy.common.ejb.slsb;
+package org.jboss.ejb3.test.proxy.impl.common.ejb.slsb;
import javax.ejb.LocalHome;
import javax.ejb.RemoteHome;
Modified: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/ejb/slsb/MyStateless2xOnlyWithBindingsBean.java
===================================================================
--- projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/common/ejb/slsb/MyStateless2xOnlyWithBindingsBean.java 2009-03-12 00:10:16 UTC (rev 85752)
+++ projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/ejb/slsb/MyStateless2xOnlyWithBindingsBean.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -19,7 +19,7 @@
* 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.test.proxy.common.ejb.slsb;
+package org.jboss.ejb3.test.proxy.impl.common.ejb.slsb;
import javax.ejb.LocalHome;
import javax.ejb.RemoteHome;
Modified: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/ejb/slsb/MyStateless30OnlyBean.java
===================================================================
--- projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/common/ejb/slsb/MyStateless30OnlyBean.java 2009-03-12 00:10:16 UTC (rev 85752)
+++ projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/ejb/slsb/MyStateless30OnlyBean.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -19,7 +19,7 @@
* 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.test.proxy.common.ejb.slsb;
+package org.jboss.ejb3.test.proxy.impl.common.ejb.slsb;
import javax.ejb.Local;
import javax.ejb.Remote;
Modified: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/ejb/slsb/MyStatelessBean.java
===================================================================
--- projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/common/ejb/slsb/MyStatelessBean.java 2009-03-12 00:10:16 UTC (rev 85752)
+++ projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/ejb/slsb/MyStatelessBean.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -19,7 +19,7 @@
* 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.test.proxy.common.ejb.slsb;
+package org.jboss.ejb3.test.proxy.impl.common.ejb.slsb;
import javax.ejb.Local;
import javax.ejb.LocalHome;
Modified: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/ejb/slsb/MyStatelessBeanWithBindings.java
===================================================================
--- projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/common/ejb/slsb/MyStatelessBeanWithBindings.java 2009-03-12 00:10:16 UTC (rev 85752)
+++ projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/ejb/slsb/MyStatelessBeanWithBindings.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -19,7 +19,7 @@
* 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.test.proxy.common.ejb.slsb;
+package org.jboss.ejb3.test.proxy.impl.common.ejb.slsb;
import javax.ejb.Local;
import javax.ejb.LocalHome;
Modified: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/ejb/slsb/MyStatelessBeanWithHomesBoundWithBusiness.java
===================================================================
--- projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/common/ejb/slsb/MyStatelessBeanWithHomesBoundWithBusiness.java 2009-03-12 00:10:16 UTC (rev 85752)
+++ projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/ejb/slsb/MyStatelessBeanWithHomesBoundWithBusiness.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -19,7 +19,7 @@
* 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.test.proxy.common.ejb.slsb;
+package org.jboss.ejb3.test.proxy.impl.common.ejb.slsb;
import javax.ejb.Local;
import javax.ejb.LocalHome;
Modified: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/ejb/slsb/MyStatelessLocal.java
===================================================================
--- projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/common/ejb/slsb/MyStatelessLocal.java 2009-03-12 00:10:16 UTC (rev 85752)
+++ projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/ejb/slsb/MyStatelessLocal.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -19,7 +19,7 @@
* 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.test.proxy.common.ejb.slsb;
+package org.jboss.ejb3.test.proxy.impl.common.ejb.slsb;
/**
* @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
Modified: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/ejb/slsb/MyStatelessLocalHome.java
===================================================================
--- projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/common/ejb/slsb/MyStatelessLocalHome.java 2009-03-12 00:10:16 UTC (rev 85752)
+++ projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/ejb/slsb/MyStatelessLocalHome.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -19,7 +19,7 @@
* 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.test.proxy.common.ejb.slsb;
+package org.jboss.ejb3.test.proxy.impl.common.ejb.slsb;
import javax.ejb.EJBLocalHome;
Modified: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/ejb/slsb/MyStatelessLocalOnlyBean.java
===================================================================
--- projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/common/ejb/slsb/MyStatelessLocalOnlyBean.java 2009-03-12 00:10:16 UTC (rev 85752)
+++ projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/ejb/slsb/MyStatelessLocalOnlyBean.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -19,7 +19,7 @@
* 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.test.proxy.common.ejb.slsb;
+package org.jboss.ejb3.test.proxy.impl.common.ejb.slsb;
import javax.ejb.Local;
import javax.ejb.LocalHome;
Modified: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/ejb/slsb/MyStatelessRemote.java
===================================================================
--- projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/common/ejb/slsb/MyStatelessRemote.java 2009-03-12 00:10:16 UTC (rev 85752)
+++ projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/ejb/slsb/MyStatelessRemote.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -19,7 +19,7 @@
* 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.test.proxy.common.ejb.slsb;
+package org.jboss.ejb3.test.proxy.impl.common.ejb.slsb;
/**
* @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
Modified: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/ejb/slsb/MyStatelessRemoteHome.java
===================================================================
--- projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/common/ejb/slsb/MyStatelessRemoteHome.java 2009-03-12 00:10:16 UTC (rev 85752)
+++ projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/ejb/slsb/MyStatelessRemoteHome.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -19,7 +19,7 @@
* 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.test.proxy.common.ejb.slsb;
+package org.jboss.ejb3.test.proxy.impl.common.ejb.slsb;
import javax.ejb.EJBHome;
Modified: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/ejb/slsb/MyStatelessRemoteOnlyBean.java
===================================================================
--- projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/common/ejb/slsb/MyStatelessRemoteOnlyBean.java 2009-03-12 00:10:16 UTC (rev 85752)
+++ projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/ejb/slsb/MyStatelessRemoteOnlyBean.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -19,7 +19,7 @@
* 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.test.proxy.common.ejb.slsb;
+package org.jboss.ejb3.test.proxy.impl.common.ejb.slsb;
import javax.ejb.Remote;
import javax.ejb.RemoteHome;
Modified: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/ejb/slsb/SimpleSLSBLocal.java
===================================================================
--- projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/common/ejb/slsb/SimpleSLSBLocal.java 2009-03-12 00:10:16 UTC (rev 85752)
+++ projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/ejb/slsb/SimpleSLSBLocal.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -19,7 +19,7 @@
* 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.test.proxy.common.ejb.slsb;
+package org.jboss.ejb3.test.proxy.impl.common.ejb.slsb;
/**
*
Modified: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/ejb/slsb/SimpleSLSBean.java
===================================================================
--- projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/common/ejb/slsb/SimpleSLSBean.java 2009-03-12 00:10:16 UTC (rev 85752)
+++ projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/common/ejb/slsb/SimpleSLSBean.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -19,7 +19,7 @@
* 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.test.proxy.common.ejb.slsb;
+package org.jboss.ejb3.test.proxy.impl.common.ejb.slsb;
import javax.ejb.Local;
import javax.ejb.Stateless;
Copied: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/ejbthree1517/ReturnStaticValueInterceptor.java (from rev 85752, projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/ejbthree1517/ReturnStaticValueInterceptor.java)
===================================================================
--- projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/ejbthree1517/ReturnStaticValueInterceptor.java (rev 0)
+++ projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/ejbthree1517/ReturnStaticValueInterceptor.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -0,0 +1,70 @@
+/*
+ * 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.test.proxy.impl.ejbthree1517;
+
+import org.jboss.aop.advice.Interceptor;
+import org.jboss.aop.joinpoint.Invocation;
+import org.jboss.logging.Logger;
+
+/**
+ * ReturnStaticValueInterceptor
+ *
+ * A test interceptor which returns a static value
+ * upon every invocation
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+public class ReturnStaticValueInterceptor implements Interceptor
+{
+
+ // --------------------------------------------------------------------------------||
+ // Class Members ------------------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ private static final Logger log = Logger.getLogger(ReturnStaticValueInterceptor.class);
+
+ public static final String RETURN_VALUE = "ALR is better than Carlo.";
+
+ // --------------------------------------------------------------------------------||
+ // Required Implementations -------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ /* (non-Javadoc)
+ * @see org.jboss.aop.advice.Interceptor#getName()
+ */
+ public String getName()
+ {
+ return this.getClass().getName();
+ }
+
+ /* (non-Javadoc)
+ * @see org.jboss.aop.advice.Interceptor#invoke(org.jboss.aop.joinpoint.Invocation)
+ */
+ public Object invoke(Invocation invocation) throws Throwable
+ {
+ // No matter the invocation, return the set value
+ log.info("Going to return static value for invocation " + invocation);
+ return ReturnStaticValueInterceptor.RETURN_VALUE;
+ }
+
+}
Property changes on: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/ejbthree1517/ReturnStaticValueInterceptor.java
___________________________________________________________________
Name: svn:mergeinfo
+
Copied: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/ejbthree1517/TestClientInterceptorStack.java (from rev 85752, projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/ejbthree1517/TestClientInterceptorStack.java)
===================================================================
--- projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/ejbthree1517/TestClientInterceptorStack.java (rev 0)
+++ projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/ejbthree1517/TestClientInterceptorStack.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -0,0 +1,71 @@
+/*
+ * 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.test.proxy.impl.ejbthree1517;
+
+/**
+ * TestClientInterceptorStack
+ *
+ * A Remote Business interface to test the remote client
+ * interceptor stack explicitly defined by @RemoteBinding.interceptorStack
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+public interface TestClientInterceptorStack
+{
+ // --------------------------------------------------------------------------------||
+ // Class Members ------------------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ /*
+ * Default Return Value
+ */
+ String DEFAULT_RETURN_VALUE = "Standard Return Value from the Bean";
+
+ /*
+ * JNDI Bindings
+ */
+
+ String JNDI_BINDING_NORMAL_STACK_SFSB = "SFSB-Normal";
+
+ String JNDI_BINDING_OVERRIDDEN_STACK_SFSB = "SFSB-Overridden";
+
+ String JNDI_BINDING_NORMAL_STACK_SLSB = "SLSB-Normal";
+
+ String JNDI_BINDING_OVERRIDDEN_STACK_SLSB = "SLSB-Overridden";
+
+ /*
+ * Interceptor Stacks
+ */
+
+ String INTERCEPTOR_STACK_OVERRIDE = "OverrideInterceptors_EJBTHREE-1517";
+
+ // --------------------------------------------------------------------------------||
+ // Required Implementations -------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ /**
+ * Returns the value, which will either be TestClientInterceptorStack.DEFAULT_RETURN_VALUE
+ * or something defined by an interceptor in an overridden stack
+ */
+ String getValue();
+}
Property changes on: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/ejbthree1517/TestClientInterceptorStack.java
___________________________________________________________________
Name: svn:mergeinfo
+
Copied: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/ejbthree1517/TestClientInterceptorStackBeanBase.java (from rev 85752, projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/ejbthree1517/TestClientInterceptorStackBeanBase.java)
===================================================================
--- projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/ejbthree1517/TestClientInterceptorStackBeanBase.java (rev 0)
+++ projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/ejbthree1517/TestClientInterceptorStackBeanBase.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -0,0 +1,46 @@
+/*
+ * 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.test.proxy.impl.ejbthree1517;
+
+/**
+ * TestClientInterceptorStackBeanBase
+ *
+ * Base class for test EJBs
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+public class TestClientInterceptorStackBeanBase implements TestClientInterceptorStack
+{
+ // --------------------------------------------------------------------------------||
+ // Required Implementations -------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ /**
+ * Returns the value, which will either be TestClientInterceptorStack.DEFAULT_RETURN_VALUE
+ * or something defined by an interceptor in an overridden stack
+ */
+ public String getValue()
+ {
+ return TestClientInterceptorStack.DEFAULT_RETURN_VALUE;
+ }
+}
Property changes on: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/ejbthree1517/TestClientInterceptorStackBeanBase.java
___________________________________________________________________
Name: svn:mergeinfo
+
Copied: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/ejbthree1517/TestClientInterceptorStackStatefulBean.java (from rev 85752, projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/ejbthree1517/TestClientInterceptorStackStatefulBean.java)
===================================================================
--- projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/ejbthree1517/TestClientInterceptorStackStatefulBean.java (rev 0)
+++ projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/ejbthree1517/TestClientInterceptorStackStatefulBean.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -0,0 +1,50 @@
+/*
+ * 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.test.proxy.impl.ejbthree1517;
+
+import javax.ejb.Remote;
+import javax.ejb.Stateful;
+
+import org.jboss.ejb3.annotation.RemoteBinding;
+import org.jboss.ejb3.annotation.RemoteBindings;
+
+/**
+ * TestClientInterceptorStackStatefulBean
+ *
+ * A test SFSB with 2 bindings, one for the standard
+ * client interceptor stack and one for an overridden stack
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+ at Stateful
+ at Remote(TestClientInterceptorStack.class)
+ at RemoteBindings(
+{
+ @RemoteBinding(jndiBinding = TestClientInterceptorStack.JNDI_BINDING_NORMAL_STACK_SFSB),
+ @RemoteBinding(jndiBinding = TestClientInterceptorStack.JNDI_BINDING_OVERRIDDEN_STACK_SFSB, interceptorStack = TestClientInterceptorStack.INTERCEPTOR_STACK_OVERRIDE)})
+public class TestClientInterceptorStackStatefulBean extends TestClientInterceptorStackBeanBase
+ implements
+ TestClientInterceptorStack
+{
+
+}
Property changes on: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/ejbthree1517/TestClientInterceptorStackStatefulBean.java
___________________________________________________________________
Name: svn:mergeinfo
+
Copied: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/ejbthree1517/TestClientInterceptorStackStatelessBean.java (from rev 85752, projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/ejbthree1517/TestClientInterceptorStackStatelessBean.java)
===================================================================
--- projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/ejbthree1517/TestClientInterceptorStackStatelessBean.java (rev 0)
+++ projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/ejbthree1517/TestClientInterceptorStackStatelessBean.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -0,0 +1,50 @@
+/*
+ * 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.test.proxy.impl.ejbthree1517;
+
+import javax.ejb.Remote;
+import javax.ejb.Stateless;
+
+import org.jboss.ejb3.annotation.RemoteBinding;
+import org.jboss.ejb3.annotation.RemoteBindings;
+
+/**
+ * TestClientInterceptorStackStatelessBean
+ *
+ * A test SLSB with 2 bindings, one for the standard
+ * client interceptor stack and one for an overridden stack
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+ at Stateless
+ at Remote(TestClientInterceptorStack.class)
+ at RemoteBindings(
+{
+ @RemoteBinding(jndiBinding = TestClientInterceptorStack.JNDI_BINDING_NORMAL_STACK_SLSB),
+ @RemoteBinding(jndiBinding = TestClientInterceptorStack.JNDI_BINDING_OVERRIDDEN_STACK_SLSB, interceptorStack = TestClientInterceptorStack.INTERCEPTOR_STACK_OVERRIDE)})
+public class TestClientInterceptorStackStatelessBean extends TestClientInterceptorStackBeanBase
+ implements
+ TestClientInterceptorStack
+{
+
+}
Property changes on: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/ejbthree1517/TestClientInterceptorStackStatelessBean.java
___________________________________________________________________
Name: svn:mergeinfo
+
Copied: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/ejbthree1517/unit (from rev 85752, projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/ejbthree1517/unit)
Property changes on: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/ejbthree1517/unit
___________________________________________________________________
Name: svn:mergeinfo
+
Modified: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/ejbthree1517/unit/OverrideClientInterceptorStackUnitTestCase.java
===================================================================
--- projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/ejbthree1517/unit/OverrideClientInterceptorStackUnitTestCase.java 2009-03-12 00:10:16 UTC (rev 85752)
+++ projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/ejbthree1517/unit/OverrideClientInterceptorStackUnitTestCase.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -19,7 +19,7 @@
* 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.test.proxy.ejbthree1517.unit;
+package org.jboss.ejb3.test.proxy.impl.ejbthree1517.unit;
import java.net.URL;
import java.util.HashSet;
@@ -35,15 +35,15 @@
import org.jboss.ejb3.common.registrar.plugin.mc.Ejb3McRegistrar;
import org.jboss.ejb3.common.registrar.spi.Ejb3RegistrarLocator;
import org.jboss.ejb3.test.mc.bootstrap.EmbeddedTestMcBootstrap;
-import org.jboss.ejb3.test.proxy.common.SessionTestCaseBase;
-import org.jboss.ejb3.test.proxy.common.Utils;
-import org.jboss.ejb3.test.proxy.common.container.SessionContainer;
-import org.jboss.ejb3.test.proxy.common.container.StatefulContainer;
-import org.jboss.ejb3.test.proxy.common.container.StatelessContainer;
-import org.jboss.ejb3.test.proxy.ejbthree1517.ReturnStaticValueInterceptor;
-import org.jboss.ejb3.test.proxy.ejbthree1517.TestClientInterceptorStack;
-import org.jboss.ejb3.test.proxy.ejbthree1517.TestClientInterceptorStackStatefulBean;
-import org.jboss.ejb3.test.proxy.ejbthree1517.TestClientInterceptorStackStatelessBean;
+import org.jboss.ejb3.test.proxy.impl.common.SessionTestCaseBase;
+import org.jboss.ejb3.test.proxy.impl.common.Utils;
+import org.jboss.ejb3.test.proxy.impl.common.container.SessionContainer;
+import org.jboss.ejb3.test.proxy.impl.common.container.StatefulContainer;
+import org.jboss.ejb3.test.proxy.impl.common.container.StatelessContainer;
+import org.jboss.ejb3.test.proxy.impl.ejbthree1517.ReturnStaticValueInterceptor;
+import org.jboss.ejb3.test.proxy.impl.ejbthree1517.TestClientInterceptorStack;
+import org.jboss.ejb3.test.proxy.impl.ejbthree1517.TestClientInterceptorStackStatefulBean;
+import org.jboss.ejb3.test.proxy.impl.ejbthree1517.TestClientInterceptorStackStatelessBean;
import org.jboss.logging.Logger;
import org.junit.AfterClass;
import org.junit.BeforeClass;
@@ -71,7 +71,7 @@
protected static EmbeddedTestMcBootstrap bootstrap;
- protected static final String FILENAME_EJB3_INTERCEPTORS_AOP = "org/jboss/ejb3/test/proxy/ejbthree1517/unit/ejb3-interceptors-ejbthree1517-aop.xml";
+ protected static final String FILENAME_EJB3_INTERCEPTORS_AOP = "org/jboss/ejb3/test/proxy/impl/ejbthree1517/unit/ejb3-interceptors-ejbthree1517-aop.xml";
protected static Context context = null;
Copied: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/ejbthree1529/ExplicitInvokerNameBean.java (from rev 85752, projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/ejbthree1529/ExplicitInvokerNameBean.java)
===================================================================
--- projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/ejbthree1529/ExplicitInvokerNameBean.java (rev 0)
+++ projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/ejbthree1529/ExplicitInvokerNameBean.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -0,0 +1,55 @@
+/*
+ * 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.test.proxy.impl.ejbthree1529;
+
+import javax.ejb.Remote;
+import javax.ejb.Stateless;
+
+import org.jboss.ejb3.annotation.RemoteBinding;
+
+/**
+ * ExplicitInvokerNameBean
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+ at Stateless
+ at Remote(ExplicitInvokerNameRemoteBusiness.class)
+ at RemoteBinding(invokerName = ExplicitInvokerNameRemoteBusiness.MC_NAME_INVOKER, jndiBinding = ExplicitInvokerNameRemoteBusiness.JNDI_NAME_EXPLICIT_INVOKER_NAME)
+public class ExplicitInvokerNameBean implements ExplicitInvokerNameRemoteBusiness
+{
+
+ // --------------------------------------------------------------------------------||
+ // Required Implementations -------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ /**
+ * Returns the contracted RETURN_VALUE
+ *
+ * @return
+ */
+ public String invoke()
+ {
+ return ExplicitInvokerNameRemoteBusiness.RETURN_VALUE;
+ }
+
+}
Property changes on: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/ejbthree1529/ExplicitInvokerNameBean.java
___________________________________________________________________
Name: svn:mergeinfo
+
Copied: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/ejbthree1529/ExplicitInvokerNameRemoteBusiness.java (from rev 85752, projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/ejbthree1529/ExplicitInvokerNameRemoteBusiness.java)
===================================================================
--- projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/ejbthree1529/ExplicitInvokerNameRemoteBusiness.java (rev 0)
+++ projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/ejbthree1529/ExplicitInvokerNameRemoteBusiness.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -0,0 +1,55 @@
+/*
+ * 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.test.proxy.impl.ejbthree1529;
+
+/**
+ * ExplicitInvokerNameRemoteBusiness
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+public interface ExplicitInvokerNameRemoteBusiness
+{
+ // --------------------------------------------------------------------------------||
+ // Constants ----------------------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ String RETURN_VALUE = "Hip hip hurray!";
+
+ /**
+ * Name of the invoker in MC as defined by the MC *-jboss-beans.xml
+ */
+ String MC_NAME_INVOKER = "ejbthree1529.Connector";
+
+ String JNDI_NAME_EXPLICIT_INVOKER_NAME = "ExplicitInvokerName";
+
+ // --------------------------------------------------------------------------------||
+ // Contracts ----------------------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ /**
+ * Returns the contracted RETURN_VALUE
+ *
+ * @return
+ */
+ String invoke();
+}
Property changes on: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/ejbthree1529/ExplicitInvokerNameRemoteBusiness.java
___________________________________________________________________
Name: svn:mergeinfo
+
Copied: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/ejbthree1529/unit (from rev 85752, projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/ejbthree1529/unit)
Property changes on: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/ejbthree1529/unit
___________________________________________________________________
Name: svn:mergeinfo
+
Modified: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/ejbthree1529/unit/RemoteBindingInvokerNameTestCase.java
===================================================================
--- projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/ejbthree1529/unit/RemoteBindingInvokerNameTestCase.java 2009-03-12 00:10:16 UTC (rev 85752)
+++ projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/ejbthree1529/unit/RemoteBindingInvokerNameTestCase.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -19,7 +19,7 @@
* 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.test.proxy.ejbthree1529.unit;
+package org.jboss.ejb3.test.proxy.impl.ejbthree1529.unit;
import java.lang.reflect.Proxy;
@@ -29,13 +29,13 @@
import junit.framework.TestCase;
import org.jboss.ejb3.common.registrar.spi.Ejb3RegistrarLocator;
-import org.jboss.ejb3.proxy.handler.session.SessionRemoteProxyInvocationHandler;
-import org.jboss.ejb3.proxy.remoting.ProxyRemotingUtils;
-import org.jboss.ejb3.test.proxy.common.SessionTestCaseBase;
-import org.jboss.ejb3.test.proxy.common.Utils;
-import org.jboss.ejb3.test.proxy.common.container.SessionContainer;
-import org.jboss.ejb3.test.proxy.ejbthree1529.ExplicitInvokerNameBean;
-import org.jboss.ejb3.test.proxy.ejbthree1529.ExplicitInvokerNameRemoteBusiness;
+import org.jboss.ejb3.proxy.impl.handler.session.SessionRemoteProxyInvocationHandler;
+import org.jboss.ejb3.proxy.impl.remoting.ProxyRemotingUtils;
+import org.jboss.ejb3.test.proxy.impl.common.SessionTestCaseBase;
+import org.jboss.ejb3.test.proxy.impl.common.Utils;
+import org.jboss.ejb3.test.proxy.impl.common.container.SessionContainer;
+import org.jboss.ejb3.test.proxy.impl.ejbthree1529.ExplicitInvokerNameBean;
+import org.jboss.ejb3.test.proxy.impl.ejbthree1529.ExplicitInvokerNameRemoteBusiness;
import org.jboss.logging.Logger;
import org.junit.AfterClass;
import org.junit.BeforeClass;
Copied: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/jndiregistrar/BindingTest.java (from rev 85752, projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/jndiregistrar/BindingTest.java)
===================================================================
--- projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/jndiregistrar/BindingTest.java (rev 0)
+++ projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/jndiregistrar/BindingTest.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -0,0 +1,46 @@
+/*
+ * 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.test.proxy.impl.jndiregistrar;
+
+/**
+ * BindingTest
+ *
+ * Defines all functions required of
+ * the Remote Binding Test EJB
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+public interface BindingTest
+{
+
+ /*
+ * Common functions
+ */
+
+ /**
+ * Echos the specified parameter
+ *
+ * @param param
+ */
+ String echo(String param);
+}
Property changes on: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/jndiregistrar/BindingTest.java
___________________________________________________________________
Name: svn:mergeinfo
+
Copied: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/jndiregistrar/ClientBindUrlBindingTest.java (from rev 85752, projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/jndiregistrar/ClientBindUrlBindingTest.java)
===================================================================
--- projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/jndiregistrar/ClientBindUrlBindingTest.java (rev 0)
+++ projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/jndiregistrar/ClientBindUrlBindingTest.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -0,0 +1,50 @@
+/*
+ * 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.test.proxy.impl.jndiregistrar;
+
+/**
+ * ClientBindUrlBindingTest
+ *
+ * Remote Business Interface defining two client bind URLs
+ * to be used in the Remoting InvokerLocator
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+public interface ClientBindUrlBindingTest extends BindingTest
+{
+ /*
+ * Define some overridden clientBindUrls
+ */
+ String CLIENT_BIND_URL_1 = "socket://localhost:4873";
+
+ String CLIENT_BIND_URL_2 = "socket://127.0.0.1:4873";
+
+ /*
+ * Define the JNDI Bindings
+ */
+
+ String JNDI_BINDING_1 = "JndiBinding1";
+
+ String JNDI_BINDING_2 = "JndiBinding2";
+
+}
Property changes on: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/jndiregistrar/ClientBindUrlBindingTest.java
___________________________________________________________________
Name: svn:mergeinfo
+
Copied: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/jndiregistrar/ClientBindUrlTestBean.java (from rev 85752, projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/jndiregistrar/ClientBindUrlTestBean.java)
===================================================================
--- projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/jndiregistrar/ClientBindUrlTestBean.java (rev 0)
+++ projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/jndiregistrar/ClientBindUrlTestBean.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -0,0 +1,54 @@
+/*
+ * 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.test.proxy.impl.jndiregistrar;
+
+import javax.ejb.Local;
+import javax.ejb.Remote;
+import javax.ejb.Stateless;
+
+import org.jboss.ejb3.annotation.LocalBinding;
+import org.jboss.ejb3.annotation.RemoteBinding;
+import org.jboss.ejb3.annotation.RemoteBindings;
+
+/**
+ * ClientBindUrlTestBean
+ *
+ * Tests EJB for alternate clientBindUrls
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+ at Stateless
+ at Local(LocalJndiBindingTest.class)
+ at Remote(ClientBindUrlBindingTest.class)
+ at RemoteBindings(
+{
+ @RemoteBinding(jndiBinding = ClientBindUrlBindingTest.JNDI_BINDING_1, clientBindUrl = ClientBindUrlBindingTest.CLIENT_BIND_URL_1),
+ @RemoteBinding(jndiBinding = ClientBindUrlBindingTest.JNDI_BINDING_2, clientBindUrl = ClientBindUrlBindingTest.CLIENT_BIND_URL_2)})
+ at LocalBinding(jndiBinding = LocalJndiBindingTest.JNDI_BINDING)
+public class ClientBindUrlTestBean extends JndiBindingTestBeanBase
+ implements
+ ClientBindUrlBindingTest,
+ LocalJndiBindingTest
+{
+
+}
Property changes on: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/jndiregistrar/ClientBindUrlTestBean.java
___________________________________________________________________
Name: svn:mergeinfo
+
Copied: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/jndiregistrar/JndiBindingTestBean.java (from rev 85752, projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/jndiregistrar/JndiBindingTestBean.java)
===================================================================
--- projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/jndiregistrar/JndiBindingTestBean.java (rev 0)
+++ projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/jndiregistrar/JndiBindingTestBean.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -0,0 +1,50 @@
+/*
+ * 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.test.proxy.impl.jndiregistrar;
+
+import javax.ejb.Local;
+import javax.ejb.Remote;
+import javax.ejb.Stateless;
+
+import org.jboss.ejb3.annotation.LocalBinding;
+import org.jboss.ejb3.annotation.RemoteBinding;
+import org.jboss.ejb3.annotation.RemoteBindings;
+
+/**
+ * JndiBindingTestBean
+ *
+ * Tests EJB for explicit JNDI Bindings
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+ at Stateless
+ at Remote(RemoteJndiBindingTest.class)
+ at Local(LocalJndiBindingTest.class)
+ at RemoteBindings(
+{@RemoteBinding(jndiBinding = RemoteJndiBindingTest.JNDI_BINDING_1),
+ @RemoteBinding(jndiBinding = RemoteJndiBindingTest.JNDI_BINDING_2)})
+ at LocalBinding(jndiBinding = LocalJndiBindingTest.JNDI_BINDING)
+public class JndiBindingTestBean extends JndiBindingTestBeanBase implements RemoteJndiBindingTest, LocalJndiBindingTest
+{
+
+}
Property changes on: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/jndiregistrar/JndiBindingTestBean.java
___________________________________________________________________
Name: svn:mergeinfo
+
Copied: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/jndiregistrar/JndiBindingTestBeanBase.java (from rev 85752, projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/jndiregistrar/JndiBindingTestBeanBase.java)
===================================================================
--- projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/jndiregistrar/JndiBindingTestBeanBase.java (rev 0)
+++ projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/jndiregistrar/JndiBindingTestBeanBase.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -0,0 +1,43 @@
+/*
+ * 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.test.proxy.impl.jndiregistrar;
+
+/**
+ * JndiBindingTestBeanBase
+ *
+ * Common base for @RemoteBinding test EJBs
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+public class JndiBindingTestBeanBase implements BindingTest
+{
+
+ /* (non-Javadoc)
+ * @see org.jboss.ejb3.test.proxy.binding.BindingTest#echo(java.lang.String)
+ */
+ public String echo(String param)
+ {
+ return param;
+ }
+
+}
Property changes on: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/jndiregistrar/JndiBindingTestBeanBase.java
___________________________________________________________________
Name: svn:mergeinfo
+
Copied: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/jndiregistrar/LocalJndiBindingTest.java (from rev 85752, projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/jndiregistrar/LocalJndiBindingTest.java)
===================================================================
--- projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/jndiregistrar/LocalJndiBindingTest.java (rev 0)
+++ projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/jndiregistrar/LocalJndiBindingTest.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -0,0 +1,39 @@
+/*
+ * 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.test.proxy.impl.jndiregistrar;
+
+/**
+ * LocalJndiBindingTest
+ *
+ * Local Business Interface defining an overridden
+ * JNDI Binding
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+public interface LocalJndiBindingTest extends BindingTest
+{
+ /*
+ * Define an overridden JNDI Binding
+ */
+ String JNDI_BINDING = "MyOverriddenBinding/local";
+}
Property changes on: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/jndiregistrar/LocalJndiBindingTest.java
___________________________________________________________________
Name: svn:mergeinfo
+
Copied: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/jndiregistrar/RemoteBindingNoJndiBindingTestBean.java (from rev 85752, projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/jndiregistrar/RemoteBindingNoJndiBindingTestBean.java)
===================================================================
--- projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/jndiregistrar/RemoteBindingNoJndiBindingTestBean.java (rev 0)
+++ projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/jndiregistrar/RemoteBindingNoJndiBindingTestBean.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -0,0 +1,47 @@
+/*
+ * 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.test.proxy.impl.jndiregistrar;
+
+import javax.ejb.Remote;
+import javax.ejb.Stateless;
+
+import org.jboss.ejb3.annotation.RemoteBinding;
+
+/**
+ * RemoteBindingNoJndiBindingTestBean
+ *
+ * Tests that an EJB with @RemoteBinding but no JNDI Binding
+ * defined is bound to the correct location (as obtained from
+ * JBossSessionBeanMetaData.getJndiName())
+ *
+ * EJBTHREE-1525
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+ at Stateless
+ at Remote(RemoteJndiBindingTest.class)
+ at RemoteBinding(factory = "SomethingFake")
+public class RemoteBindingNoJndiBindingTestBean extends JndiBindingTestBeanBase implements RemoteJndiBindingTest
+{
+
+}
Property changes on: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/jndiregistrar/RemoteBindingNoJndiBindingTestBean.java
___________________________________________________________________
Name: svn:mergeinfo
+
Copied: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/jndiregistrar/RemoteJndiBindingTest.java (from rev 85752, projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/jndiregistrar/RemoteJndiBindingTest.java)
===================================================================
--- projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/jndiregistrar/RemoteJndiBindingTest.java (rev 0)
+++ projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/jndiregistrar/RemoteJndiBindingTest.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -0,0 +1,49 @@
+/*
+ * 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.test.proxy.impl.jndiregistrar;
+
+import org.jboss.ejb3.annotation.RemoteBinding;
+
+/**
+ * RemoteJndiBindingTest
+ *
+ * Remote Business Interface defining three overridden
+ * JNDI Bindings, as well as access to test a local binding
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+ at RemoteBinding(jndiBinding = RemoteJndiBindingTest.JNDI_BINDING_DECLARED_BY_BUSINESS_INTERFACE)
+public interface RemoteJndiBindingTest extends BindingTest
+{
+ /*
+ * Define some overridden JNDI Bindings to be declared by the EJB Impl Class
+ */
+ String JNDI_BINDING_1 = "MyOverriddenBinding1/remote";
+
+ String JNDI_BINDING_2 = "MyOverriddenBinding2/remote";
+
+ /**
+ * A JNDI Binding to be declared here on the business interface
+ */
+ String JNDI_BINDING_DECLARED_BY_BUSINESS_INTERFACE = "MyOverriddenBindingDeclaredByBusinessInterface/remote";
+}
Property changes on: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/jndiregistrar/RemoteJndiBindingTest.java
___________________________________________________________________
Name: svn:mergeinfo
+
Copied: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/jndiregistrar/unit (from rev 85752, projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/jndiregistrar/unit)
Property changes on: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/jndiregistrar/unit
___________________________________________________________________
Name: svn:mergeinfo
+
Modified: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/jndiregistrar/unit/JNDIBindingTestCase.java
===================================================================
--- projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/jndiregistrar/unit/JNDIBindingTestCase.java 2009-03-12 00:10:16 UTC (rev 85752)
+++ projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/jndiregistrar/unit/JNDIBindingTestCase.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -19,7 +19,7 @@
* 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.test.proxy.jndiregistrar.unit;
+package org.jboss.ejb3.test.proxy.impl.jndiregistrar.unit;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
@@ -48,37 +48,37 @@
import org.jboss.ejb3.common.registrar.plugin.mc.Ejb3McRegistrar;
import org.jboss.ejb3.common.registrar.spi.Ejb3RegistrarLocator;
import org.jboss.ejb3.common.registrar.spi.NotBoundException;
-import org.jboss.ejb3.proxy.handler.session.SessionRemoteProxyInvocationHandler;
-import org.jboss.ejb3.proxy.jndiregistrar.JndiSessionRegistrarBase;
-import org.jboss.ejb3.proxy.jndiregistrar.JndiStatelessSessionRegistrar;
+import org.jboss.ejb3.proxy.impl.handler.session.SessionRemoteProxyInvocationHandler;
+import org.jboss.ejb3.proxy.impl.jndiregistrar.JndiSessionRegistrarBase;
+import org.jboss.ejb3.proxy.impl.jndiregistrar.JndiStatelessSessionRegistrar;
import org.jboss.ejb3.test.mc.bootstrap.EmbeddedTestMcBootstrap;
-import org.jboss.ejb3.test.proxy.common.Utils;
-import org.jboss.ejb3.test.proxy.common.container.SessionContainer;
-import org.jboss.ejb3.test.proxy.common.container.StatefulContainer;
-import org.jboss.ejb3.test.proxy.common.container.StatelessContainer;
-import org.jboss.ejb3.test.proxy.common.ejb.sfsb.MyStateful2xOnlyBean;
-import org.jboss.ejb3.test.proxy.common.ejb.sfsb.MyStateful30OnlyBean;
-import org.jboss.ejb3.test.proxy.common.ejb.sfsb.MyStatefulBean;
-import org.jboss.ejb3.test.proxy.common.ejb.sfsb.MyStatefulBeanWithBindings;
-import org.jboss.ejb3.test.proxy.common.ejb.sfsb.MyStatefulLocalBusiness;
-import org.jboss.ejb3.test.proxy.common.ejb.sfsb.MyStatefulLocalHome;
-import org.jboss.ejb3.test.proxy.common.ejb.sfsb.MyStatefulRemoteBusiness;
-import org.jboss.ejb3.test.proxy.common.ejb.sfsb.MyStatefulRemoteHome;
-import org.jboss.ejb3.test.proxy.common.ejb.slsb.MyStateless2xOnlyBean;
-import org.jboss.ejb3.test.proxy.common.ejb.slsb.MyStateless30OnlyBean;
-import org.jboss.ejb3.test.proxy.common.ejb.slsb.MyStatelessBean;
-import org.jboss.ejb3.test.proxy.common.ejb.slsb.MyStatelessBeanWithBindings;
-import org.jboss.ejb3.test.proxy.common.ejb.slsb.MyStatelessLocal;
-import org.jboss.ejb3.test.proxy.common.ejb.slsb.MyStatelessLocalHome;
-import org.jboss.ejb3.test.proxy.common.ejb.slsb.MyStatelessRemote;
-import org.jboss.ejb3.test.proxy.common.ejb.slsb.MyStatelessRemoteHome;
-import org.jboss.ejb3.test.proxy.jndiregistrar.BindingTest;
-import org.jboss.ejb3.test.proxy.jndiregistrar.ClientBindUrlBindingTest;
-import org.jboss.ejb3.test.proxy.jndiregistrar.ClientBindUrlTestBean;
-import org.jboss.ejb3.test.proxy.jndiregistrar.JndiBindingTestBean;
-import org.jboss.ejb3.test.proxy.jndiregistrar.LocalJndiBindingTest;
-import org.jboss.ejb3.test.proxy.jndiregistrar.RemoteBindingNoJndiBindingTestBean;
-import org.jboss.ejb3.test.proxy.jndiregistrar.RemoteJndiBindingTest;
+import org.jboss.ejb3.test.proxy.impl.common.Utils;
+import org.jboss.ejb3.test.proxy.impl.common.container.SessionContainer;
+import org.jboss.ejb3.test.proxy.impl.common.container.StatefulContainer;
+import org.jboss.ejb3.test.proxy.impl.common.container.StatelessContainer;
+import org.jboss.ejb3.test.proxy.impl.common.ejb.sfsb.MyStateful2xOnlyBean;
+import org.jboss.ejb3.test.proxy.impl.common.ejb.sfsb.MyStateful30OnlyBean;
+import org.jboss.ejb3.test.proxy.impl.common.ejb.sfsb.MyStatefulBean;
+import org.jboss.ejb3.test.proxy.impl.common.ejb.sfsb.MyStatefulBeanWithBindings;
+import org.jboss.ejb3.test.proxy.impl.common.ejb.sfsb.MyStatefulLocalBusiness;
+import org.jboss.ejb3.test.proxy.impl.common.ejb.sfsb.MyStatefulLocalHome;
+import org.jboss.ejb3.test.proxy.impl.common.ejb.sfsb.MyStatefulRemoteBusiness;
+import org.jboss.ejb3.test.proxy.impl.common.ejb.sfsb.MyStatefulRemoteHome;
+import org.jboss.ejb3.test.proxy.impl.common.ejb.slsb.MyStateless2xOnlyBean;
+import org.jboss.ejb3.test.proxy.impl.common.ejb.slsb.MyStateless30OnlyBean;
+import org.jboss.ejb3.test.proxy.impl.common.ejb.slsb.MyStatelessBean;
+import org.jboss.ejb3.test.proxy.impl.common.ejb.slsb.MyStatelessBeanWithBindings;
+import org.jboss.ejb3.test.proxy.impl.common.ejb.slsb.MyStatelessLocal;
+import org.jboss.ejb3.test.proxy.impl.common.ejb.slsb.MyStatelessLocalHome;
+import org.jboss.ejb3.test.proxy.impl.common.ejb.slsb.MyStatelessRemote;
+import org.jboss.ejb3.test.proxy.impl.common.ejb.slsb.MyStatelessRemoteHome;
+import org.jboss.ejb3.test.proxy.impl.jndiregistrar.BindingTest;
+import org.jboss.ejb3.test.proxy.impl.jndiregistrar.ClientBindUrlBindingTest;
+import org.jboss.ejb3.test.proxy.impl.jndiregistrar.ClientBindUrlTestBean;
+import org.jboss.ejb3.test.proxy.impl.jndiregistrar.JndiBindingTestBean;
+import org.jboss.ejb3.test.proxy.impl.jndiregistrar.LocalJndiBindingTest;
+import org.jboss.ejb3.test.proxy.impl.jndiregistrar.RemoteBindingNoJndiBindingTestBean;
+import org.jboss.ejb3.test.proxy.impl.jndiregistrar.RemoteJndiBindingTest;
import org.jboss.logging.Logger;
import org.jboss.metadata.ejb.jboss.JBossSessionBeanMetaData;
import org.jboss.metadata.ejb.jboss.RemoteBindingMetaData;
Copied: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/remoteaccess/unit (from rev 85752, projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/remoteaccess/unit)
Property changes on: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/remoteaccess/unit
___________________________________________________________________
Name: svn:mergeinfo
+
Modified: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/remoteaccess/unit/ProxyMockServer.java
===================================================================
--- projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/remoteaccess/unit/ProxyMockServer.java 2009-03-12 00:10:16 UTC (rev 85752)
+++ projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/remoteaccess/unit/ProxyMockServer.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -19,13 +19,13 @@
* 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.test.proxy.remoteaccess.unit;
+package org.jboss.ejb3.test.proxy.impl.remoteaccess.unit;
-import org.jboss.ejb3.test.proxy.common.Utils;
-import org.jboss.ejb3.test.proxy.common.container.StatefulContainer;
-import org.jboss.ejb3.test.proxy.common.container.StatelessContainer;
-import org.jboss.ejb3.test.proxy.common.ejb.sfsb.MyStatefulBean;
-import org.jboss.ejb3.test.proxy.common.ejb.slsb.MyStatelessBean;
+import org.jboss.ejb3.test.proxy.impl.common.Utils;
+import org.jboss.ejb3.test.proxy.impl.common.container.StatefulContainer;
+import org.jboss.ejb3.test.proxy.impl.common.container.StatelessContainer;
+import org.jboss.ejb3.test.proxy.impl.common.ejb.sfsb.MyStatefulBean;
+import org.jboss.ejb3.test.proxy.impl.common.ejb.slsb.MyStatelessBean;
import org.jboss.ejb3.testremote.server.MockServer;
import org.jboss.logging.Logger;
Modified: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/remoteaccess/unit/RemoteAccessTestCase.java
===================================================================
--- projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/remoteaccess/unit/RemoteAccessTestCase.java 2009-03-12 00:10:16 UTC (rev 85752)
+++ projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/remoteaccess/unit/RemoteAccessTestCase.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -19,7 +19,7 @@
* 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.test.proxy.remoteaccess.unit;
+package org.jboss.ejb3.test.proxy.impl.remoteaccess.unit;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
@@ -30,8 +30,8 @@
import javax.naming.Context;
import javax.naming.InitialContext;
-import org.jboss.ejb3.test.proxy.common.ejb.sfsb.MyStatefulRemoteBusiness;
-import org.jboss.ejb3.test.proxy.common.ejb.slsb.MyStatelessRemote;
+import org.jboss.ejb3.test.proxy.impl.common.ejb.sfsb.MyStatefulRemoteBusiness;
+import org.jboss.ejb3.test.proxy.impl.common.ejb.slsb.MyStatelessRemote;
import org.jboss.ejb3.testremote.server.MockServerController;
import org.jboss.logging.Logger;
import org.junit.AfterClass;
Copied: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/session/unit (from rev 85752, projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/session/unit)
Property changes on: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/session/unit
___________________________________________________________________
Name: svn:mergeinfo
+
Modified: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/session/unit/ProxyServiceTestCase.java
===================================================================
--- projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/session/unit/ProxyServiceTestCase.java 2009-03-12 00:10:16 UTC (rev 85752)
+++ projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/session/unit/ProxyServiceTestCase.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -19,7 +19,7 @@
* 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.test.proxy.session.unit;
+package org.jboss.ejb3.test.proxy.impl.session.unit;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotSame;
@@ -28,13 +28,13 @@
import javax.naming.InitialContext;
import org.jboss.ejb3.common.registrar.spi.Ejb3RegistrarLocator;
-import org.jboss.ejb3.test.proxy.common.SessionTestCaseBase;
-import org.jboss.ejb3.test.proxy.common.Utils;
-import org.jboss.ejb3.test.proxy.common.container.ServiceContainer;
-import org.jboss.ejb3.test.proxy.common.ejb.service.MyServiceBean;
-import org.jboss.ejb3.test.proxy.common.ejb.service.MyServiceBeanWithExplicitJndiBindings;
-import org.jboss.ejb3.test.proxy.common.ejb.service.MyServiceLocalBusiness;
-import org.jboss.ejb3.test.proxy.common.ejb.service.MyServiceRemoteBusiness;
+import org.jboss.ejb3.test.proxy.impl.common.SessionTestCaseBase;
+import org.jboss.ejb3.test.proxy.impl.common.Utils;
+import org.jboss.ejb3.test.proxy.impl.common.container.ServiceContainer;
+import org.jboss.ejb3.test.proxy.impl.common.ejb.service.MyServiceBean;
+import org.jboss.ejb3.test.proxy.impl.common.ejb.service.MyServiceBeanWithExplicitJndiBindings;
+import org.jboss.ejb3.test.proxy.impl.common.ejb.service.MyServiceLocalBusiness;
+import org.jboss.ejb3.test.proxy.impl.common.ejb.service.MyServiceRemoteBusiness;
import org.jboss.logging.Logger;
import org.junit.AfterClass;
import org.junit.BeforeClass;
Modified: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/session/unit/ProxyStatefulSession2xOnlyTestCase.java
===================================================================
--- projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/session/unit/ProxyStatefulSession2xOnlyTestCase.java 2009-03-12 00:10:16 UTC (rev 85752)
+++ projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/session/unit/ProxyStatefulSession2xOnlyTestCase.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -19,7 +19,7 @@
* 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.test.proxy.session.unit;
+package org.jboss.ejb3.test.proxy.impl.session.unit;
import static org.junit.Assert.assertTrue;
@@ -27,12 +27,12 @@
import javax.naming.InitialContext;
import org.jboss.ejb3.common.registrar.spi.Ejb3RegistrarLocator;
-import org.jboss.ejb3.test.proxy.common.SessionTestCaseBase;
-import org.jboss.ejb3.test.proxy.common.Utils;
-import org.jboss.ejb3.test.proxy.common.container.StatefulContainer;
-import org.jboss.ejb3.test.proxy.common.ejb.sfsb.MyStateful2xOnlyBean;
-import org.jboss.ejb3.test.proxy.common.ejb.sfsb.MyStatefulLocalHome;
-import org.jboss.ejb3.test.proxy.common.ejb.sfsb.MyStatefulRemoteHome;
+import org.jboss.ejb3.test.proxy.impl.common.SessionTestCaseBase;
+import org.jboss.ejb3.test.proxy.impl.common.Utils;
+import org.jboss.ejb3.test.proxy.impl.common.container.StatefulContainer;
+import org.jboss.ejb3.test.proxy.impl.common.ejb.sfsb.MyStateful2xOnlyBean;
+import org.jboss.ejb3.test.proxy.impl.common.ejb.sfsb.MyStatefulLocalHome;
+import org.jboss.ejb3.test.proxy.impl.common.ejb.sfsb.MyStatefulRemoteHome;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;
Modified: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/session/unit/ProxyStatefulSession2xOnlyWithBindingsTestCase.java
===================================================================
--- projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/session/unit/ProxyStatefulSession2xOnlyWithBindingsTestCase.java 2009-03-12 00:10:16 UTC (rev 85752)
+++ projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/session/unit/ProxyStatefulSession2xOnlyWithBindingsTestCase.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -19,7 +19,7 @@
* 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.test.proxy.session.unit;
+package org.jboss.ejb3.test.proxy.impl.session.unit;
import static org.junit.Assert.assertTrue;
@@ -27,12 +27,12 @@
import javax.naming.InitialContext;
import org.jboss.ejb3.common.registrar.spi.Ejb3RegistrarLocator;
-import org.jboss.ejb3.test.proxy.common.SessionTestCaseBase;
-import org.jboss.ejb3.test.proxy.common.Utils;
-import org.jboss.ejb3.test.proxy.common.container.StatefulContainer;
-import org.jboss.ejb3.test.proxy.common.ejb.sfsb.MyStateful2xOnlyWithBindingsBean;
-import org.jboss.ejb3.test.proxy.common.ejb.sfsb.MyStatefulLocalHome;
-import org.jboss.ejb3.test.proxy.common.ejb.sfsb.MyStatefulRemoteHome;
+import org.jboss.ejb3.test.proxy.impl.common.SessionTestCaseBase;
+import org.jboss.ejb3.test.proxy.impl.common.Utils;
+import org.jboss.ejb3.test.proxy.impl.common.container.StatefulContainer;
+import org.jboss.ejb3.test.proxy.impl.common.ejb.sfsb.MyStateful2xOnlyWithBindingsBean;
+import org.jboss.ejb3.test.proxy.impl.common.ejb.sfsb.MyStatefulLocalHome;
+import org.jboss.ejb3.test.proxy.impl.common.ejb.sfsb.MyStatefulRemoteHome;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;
Modified: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/session/unit/ProxyStatefulSession30OnlyTestCase.java
===================================================================
--- projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/session/unit/ProxyStatefulSession30OnlyTestCase.java 2009-03-12 00:10:16 UTC (rev 85752)
+++ projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/session/unit/ProxyStatefulSession30OnlyTestCase.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -19,7 +19,7 @@
* 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.test.proxy.session.unit;
+package org.jboss.ejb3.test.proxy.impl.session.unit;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
@@ -30,12 +30,12 @@
import junit.framework.TestCase;
import org.jboss.ejb3.common.registrar.spi.Ejb3RegistrarLocator;
-import org.jboss.ejb3.test.proxy.common.SessionTestCaseBase;
-import org.jboss.ejb3.test.proxy.common.Utils;
-import org.jboss.ejb3.test.proxy.common.container.StatefulContainer;
-import org.jboss.ejb3.test.proxy.common.ejb.sfsb.MyStateful30OnlyBean;
-import org.jboss.ejb3.test.proxy.common.ejb.sfsb.MyStatefulLocalBusiness;
-import org.jboss.ejb3.test.proxy.common.ejb.sfsb.MyStatefulRemoteBusiness;
+import org.jboss.ejb3.test.proxy.impl.common.SessionTestCaseBase;
+import org.jboss.ejb3.test.proxy.impl.common.Utils;
+import org.jboss.ejb3.test.proxy.impl.common.container.StatefulContainer;
+import org.jboss.ejb3.test.proxy.impl.common.ejb.sfsb.MyStateful30OnlyBean;
+import org.jboss.ejb3.test.proxy.impl.common.ejb.sfsb.MyStatefulLocalBusiness;
+import org.jboss.ejb3.test.proxy.impl.common.ejb.sfsb.MyStatefulRemoteBusiness;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;
Modified: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/session/unit/ProxyStatefulSessionHomeBusinessBoundTogetherTestCase.java
===================================================================
--- projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/session/unit/ProxyStatefulSessionHomeBusinessBoundTogetherTestCase.java 2009-03-12 00:10:16 UTC (rev 85752)
+++ projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/session/unit/ProxyStatefulSessionHomeBusinessBoundTogetherTestCase.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -19,20 +19,20 @@
* 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.test.proxy.session.unit;
+package org.jboss.ejb3.test.proxy.impl.session.unit;
import javax.naming.Context;
import javax.naming.InitialContext;
import org.jboss.ejb3.common.registrar.spi.Ejb3RegistrarLocator;
-import org.jboss.ejb3.test.proxy.common.SessionTestCaseBase;
-import org.jboss.ejb3.test.proxy.common.Utils;
-import org.jboss.ejb3.test.proxy.common.container.StatefulContainer;
-import org.jboss.ejb3.test.proxy.common.ejb.sfsb.MyStatefulBeanWithHomesBoundWithBusiness;
-import org.jboss.ejb3.test.proxy.common.ejb.sfsb.MyStatefulLocalBusiness;
-import org.jboss.ejb3.test.proxy.common.ejb.sfsb.MyStatefulLocalHome;
-import org.jboss.ejb3.test.proxy.common.ejb.sfsb.MyStatefulRemoteBusiness;
-import org.jboss.ejb3.test.proxy.common.ejb.sfsb.MyStatefulRemoteHome;
+import org.jboss.ejb3.test.proxy.impl.common.SessionTestCaseBase;
+import org.jboss.ejb3.test.proxy.impl.common.Utils;
+import org.jboss.ejb3.test.proxy.impl.common.container.StatefulContainer;
+import org.jboss.ejb3.test.proxy.impl.common.ejb.sfsb.MyStatefulBeanWithHomesBoundWithBusiness;
+import org.jboss.ejb3.test.proxy.impl.common.ejb.sfsb.MyStatefulLocalBusiness;
+import org.jboss.ejb3.test.proxy.impl.common.ejb.sfsb.MyStatefulLocalHome;
+import org.jboss.ejb3.test.proxy.impl.common.ejb.sfsb.MyStatefulRemoteBusiness;
+import org.jboss.ejb3.test.proxy.impl.common.ejb.sfsb.MyStatefulRemoteHome;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;
Modified: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/session/unit/ProxyStatefulSessionLocalOnlyTestCase.java
===================================================================
--- projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/session/unit/ProxyStatefulSessionLocalOnlyTestCase.java 2009-03-12 00:10:16 UTC (rev 85752)
+++ projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/session/unit/ProxyStatefulSessionLocalOnlyTestCase.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -19,7 +19,7 @@
* 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.test.proxy.session.unit;
+package org.jboss.ejb3.test.proxy.impl.session.unit;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
@@ -28,12 +28,12 @@
import javax.naming.InitialContext;
import org.jboss.ejb3.common.registrar.spi.Ejb3RegistrarLocator;
-import org.jboss.ejb3.test.proxy.common.SessionTestCaseBase;
-import org.jboss.ejb3.test.proxy.common.Utils;
-import org.jboss.ejb3.test.proxy.common.container.StatefulContainer;
-import org.jboss.ejb3.test.proxy.common.ejb.sfsb.MyStatefulLocalBusiness;
-import org.jboss.ejb3.test.proxy.common.ejb.sfsb.MyStatefulLocalHome;
-import org.jboss.ejb3.test.proxy.common.ejb.sfsb.MyStatefulLocalOnlyBean;
+import org.jboss.ejb3.test.proxy.impl.common.SessionTestCaseBase;
+import org.jboss.ejb3.test.proxy.impl.common.Utils;
+import org.jboss.ejb3.test.proxy.impl.common.container.StatefulContainer;
+import org.jboss.ejb3.test.proxy.impl.common.ejb.sfsb.MyStatefulLocalBusiness;
+import org.jboss.ejb3.test.proxy.impl.common.ejb.sfsb.MyStatefulLocalHome;
+import org.jboss.ejb3.test.proxy.impl.common.ejb.sfsb.MyStatefulLocalOnlyBean;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;
Modified: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/session/unit/ProxyStatefulSessionRemoteOnlyTestCase.java
===================================================================
--- projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/session/unit/ProxyStatefulSessionRemoteOnlyTestCase.java 2009-03-12 00:10:16 UTC (rev 85752)
+++ projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/session/unit/ProxyStatefulSessionRemoteOnlyTestCase.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -19,7 +19,7 @@
* 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.test.proxy.session.unit;
+package org.jboss.ejb3.test.proxy.impl.session.unit;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
@@ -28,12 +28,12 @@
import javax.naming.InitialContext;
import org.jboss.ejb3.common.registrar.spi.Ejb3RegistrarLocator;
-import org.jboss.ejb3.test.proxy.common.SessionTestCaseBase;
-import org.jboss.ejb3.test.proxy.common.Utils;
-import org.jboss.ejb3.test.proxy.common.container.StatefulContainer;
-import org.jboss.ejb3.test.proxy.common.ejb.sfsb.MyStatefulRemoteBusiness;
-import org.jboss.ejb3.test.proxy.common.ejb.sfsb.MyStatefulRemoteHome;
-import org.jboss.ejb3.test.proxy.common.ejb.sfsb.MyStatefulRemoteOnlyBean;
+import org.jboss.ejb3.test.proxy.impl.common.SessionTestCaseBase;
+import org.jboss.ejb3.test.proxy.impl.common.Utils;
+import org.jboss.ejb3.test.proxy.impl.common.container.StatefulContainer;
+import org.jboss.ejb3.test.proxy.impl.common.ejb.sfsb.MyStatefulRemoteBusiness;
+import org.jboss.ejb3.test.proxy.impl.common.ejb.sfsb.MyStatefulRemoteHome;
+import org.jboss.ejb3.test.proxy.impl.common.ejb.sfsb.MyStatefulRemoteOnlyBean;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;
Modified: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/session/unit/ProxyStatefulSessionTestCase.java
===================================================================
--- projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/session/unit/ProxyStatefulSessionTestCase.java 2009-03-12 00:10:16 UTC (rev 85752)
+++ projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/session/unit/ProxyStatefulSessionTestCase.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -19,7 +19,7 @@
* 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.test.proxy.session.unit;
+package org.jboss.ejb3.test.proxy.impl.session.unit;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
@@ -30,14 +30,14 @@
import junit.framework.TestCase;
import org.jboss.ejb3.common.registrar.spi.Ejb3RegistrarLocator;
-import org.jboss.ejb3.test.proxy.common.SessionTestCaseBase;
-import org.jboss.ejb3.test.proxy.common.Utils;
-import org.jboss.ejb3.test.proxy.common.container.StatefulContainer;
-import org.jboss.ejb3.test.proxy.common.ejb.sfsb.MyStatefulBean;
-import org.jboss.ejb3.test.proxy.common.ejb.sfsb.MyStatefulLocalBusiness;
-import org.jboss.ejb3.test.proxy.common.ejb.sfsb.MyStatefulLocalHome;
-import org.jboss.ejb3.test.proxy.common.ejb.sfsb.MyStatefulRemoteBusiness;
-import org.jboss.ejb3.test.proxy.common.ejb.sfsb.MyStatefulRemoteHome;
+import org.jboss.ejb3.test.proxy.impl.common.SessionTestCaseBase;
+import org.jboss.ejb3.test.proxy.impl.common.Utils;
+import org.jboss.ejb3.test.proxy.impl.common.container.StatefulContainer;
+import org.jboss.ejb3.test.proxy.impl.common.ejb.sfsb.MyStatefulBean;
+import org.jboss.ejb3.test.proxy.impl.common.ejb.sfsb.MyStatefulLocalBusiness;
+import org.jboss.ejb3.test.proxy.impl.common.ejb.sfsb.MyStatefulLocalHome;
+import org.jboss.ejb3.test.proxy.impl.common.ejb.sfsb.MyStatefulRemoteBusiness;
+import org.jboss.ejb3.test.proxy.impl.common.ejb.sfsb.MyStatefulRemoteHome;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;
Modified: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/session/unit/ProxyStatelessSession2xOnlyExplicitJndiNameTestCase.java
===================================================================
--- projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/session/unit/ProxyStatelessSession2xOnlyExplicitJndiNameTestCase.java 2009-03-12 00:10:16 UTC (rev 85752)
+++ projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/session/unit/ProxyStatelessSession2xOnlyExplicitJndiNameTestCase.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -19,7 +19,7 @@
* 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.test.proxy.session.unit;
+package org.jboss.ejb3.test.proxy.impl.session.unit;
import static org.junit.Assert.assertTrue;
@@ -30,12 +30,12 @@
import junit.framework.TestCase;
import org.jboss.ejb3.common.registrar.spi.Ejb3RegistrarLocator;
-import org.jboss.ejb3.test.proxy.common.SessionTestCaseBase;
-import org.jboss.ejb3.test.proxy.common.Utils;
-import org.jboss.ejb3.test.proxy.common.container.StatelessContainer;
-import org.jboss.ejb3.test.proxy.common.ejb.slsb.MyStateless2xOnlyBean;
-import org.jboss.ejb3.test.proxy.common.ejb.slsb.MyStatelessLocalHome;
-import org.jboss.ejb3.test.proxy.common.ejb.slsb.MyStatelessRemoteHome;
+import org.jboss.ejb3.test.proxy.impl.common.SessionTestCaseBase;
+import org.jboss.ejb3.test.proxy.impl.common.Utils;
+import org.jboss.ejb3.test.proxy.impl.common.container.StatelessContainer;
+import org.jboss.ejb3.test.proxy.impl.common.ejb.slsb.MyStateless2xOnlyBean;
+import org.jboss.ejb3.test.proxy.impl.common.ejb.slsb.MyStatelessLocalHome;
+import org.jboss.ejb3.test.proxy.impl.common.ejb.slsb.MyStatelessRemoteHome;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;
Modified: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/session/unit/ProxyStatelessSession2xOnlyTestCase.java
===================================================================
--- projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/session/unit/ProxyStatelessSession2xOnlyTestCase.java 2009-03-12 00:10:16 UTC (rev 85752)
+++ projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/session/unit/ProxyStatelessSession2xOnlyTestCase.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -19,7 +19,7 @@
* 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.test.proxy.session.unit;
+package org.jboss.ejb3.test.proxy.impl.session.unit;
import static org.junit.Assert.assertTrue;
@@ -27,12 +27,12 @@
import javax.naming.InitialContext;
import org.jboss.ejb3.common.registrar.spi.Ejb3RegistrarLocator;
-import org.jboss.ejb3.test.proxy.common.SessionTestCaseBase;
-import org.jboss.ejb3.test.proxy.common.Utils;
-import org.jboss.ejb3.test.proxy.common.container.StatelessContainer;
-import org.jboss.ejb3.test.proxy.common.ejb.slsb.MyStateless2xOnlyBean;
-import org.jboss.ejb3.test.proxy.common.ejb.slsb.MyStatelessLocalHome;
-import org.jboss.ejb3.test.proxy.common.ejb.slsb.MyStatelessRemoteHome;
+import org.jboss.ejb3.test.proxy.impl.common.SessionTestCaseBase;
+import org.jboss.ejb3.test.proxy.impl.common.Utils;
+import org.jboss.ejb3.test.proxy.impl.common.container.StatelessContainer;
+import org.jboss.ejb3.test.proxy.impl.common.ejb.slsb.MyStateless2xOnlyBean;
+import org.jboss.ejb3.test.proxy.impl.common.ejb.slsb.MyStatelessLocalHome;
+import org.jboss.ejb3.test.proxy.impl.common.ejb.slsb.MyStatelessRemoteHome;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;
Modified: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/session/unit/ProxyStatelessSession2xOnlyWithBindingsTestCase.java
===================================================================
--- projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/session/unit/ProxyStatelessSession2xOnlyWithBindingsTestCase.java 2009-03-12 00:10:16 UTC (rev 85752)
+++ projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/session/unit/ProxyStatelessSession2xOnlyWithBindingsTestCase.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -19,7 +19,7 @@
* 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.test.proxy.session.unit;
+package org.jboss.ejb3.test.proxy.impl.session.unit;
import static org.junit.Assert.assertTrue;
@@ -27,12 +27,12 @@
import javax.naming.InitialContext;
import org.jboss.ejb3.common.registrar.spi.Ejb3RegistrarLocator;
-import org.jboss.ejb3.test.proxy.common.SessionTestCaseBase;
-import org.jboss.ejb3.test.proxy.common.Utils;
-import org.jboss.ejb3.test.proxy.common.container.StatelessContainer;
-import org.jboss.ejb3.test.proxy.common.ejb.slsb.MyStateless2xOnlyWithBindingsBean;
-import org.jboss.ejb3.test.proxy.common.ejb.slsb.MyStatelessLocalHome;
-import org.jboss.ejb3.test.proxy.common.ejb.slsb.MyStatelessRemoteHome;
+import org.jboss.ejb3.test.proxy.impl.common.SessionTestCaseBase;
+import org.jboss.ejb3.test.proxy.impl.common.Utils;
+import org.jboss.ejb3.test.proxy.impl.common.container.StatelessContainer;
+import org.jboss.ejb3.test.proxy.impl.common.ejb.slsb.MyStateless2xOnlyWithBindingsBean;
+import org.jboss.ejb3.test.proxy.impl.common.ejb.slsb.MyStatelessLocalHome;
+import org.jboss.ejb3.test.proxy.impl.common.ejb.slsb.MyStatelessRemoteHome;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;
Modified: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/session/unit/ProxyStatelessSession30OnlyTestCase.java
===================================================================
--- projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/session/unit/ProxyStatelessSession30OnlyTestCase.java 2009-03-12 00:10:16 UTC (rev 85752)
+++ projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/session/unit/ProxyStatelessSession30OnlyTestCase.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -19,7 +19,7 @@
* 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.test.proxy.session.unit;
+package org.jboss.ejb3.test.proxy.impl.session.unit;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
@@ -27,12 +27,12 @@
import javax.naming.InitialContext;
import org.jboss.ejb3.common.registrar.spi.Ejb3RegistrarLocator;
-import org.jboss.ejb3.test.proxy.common.SessionTestCaseBase;
-import org.jboss.ejb3.test.proxy.common.Utils;
-import org.jboss.ejb3.test.proxy.common.container.StatelessContainer;
-import org.jboss.ejb3.test.proxy.common.ejb.slsb.MyStateless30OnlyBean;
-import org.jboss.ejb3.test.proxy.common.ejb.slsb.MyStatelessLocal;
-import org.jboss.ejb3.test.proxy.common.ejb.slsb.MyStatelessRemote;
+import org.jboss.ejb3.test.proxy.impl.common.SessionTestCaseBase;
+import org.jboss.ejb3.test.proxy.impl.common.Utils;
+import org.jboss.ejb3.test.proxy.impl.common.container.StatelessContainer;
+import org.jboss.ejb3.test.proxy.impl.common.ejb.slsb.MyStateless30OnlyBean;
+import org.jboss.ejb3.test.proxy.impl.common.ejb.slsb.MyStatelessLocal;
+import org.jboss.ejb3.test.proxy.impl.common.ejb.slsb.MyStatelessRemote;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;
Modified: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/session/unit/ProxyStatelessSessionHomeBusinessBoundTogetherTestCase.java
===================================================================
--- projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/session/unit/ProxyStatelessSessionHomeBusinessBoundTogetherTestCase.java 2009-03-12 00:10:16 UTC (rev 85752)
+++ projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/session/unit/ProxyStatelessSessionHomeBusinessBoundTogetherTestCase.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -19,20 +19,20 @@
* 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.test.proxy.session.unit;
+package org.jboss.ejb3.test.proxy.impl.session.unit;
import javax.naming.Context;
import javax.naming.InitialContext;
import org.jboss.ejb3.common.registrar.spi.Ejb3RegistrarLocator;
-import org.jboss.ejb3.test.proxy.common.SessionTestCaseBase;
-import org.jboss.ejb3.test.proxy.common.Utils;
-import org.jboss.ejb3.test.proxy.common.container.StatelessContainer;
-import org.jboss.ejb3.test.proxy.common.ejb.slsb.MyStatelessBeanWithHomesBoundWithBusiness;
-import org.jboss.ejb3.test.proxy.common.ejb.slsb.MyStatelessLocal;
-import org.jboss.ejb3.test.proxy.common.ejb.slsb.MyStatelessLocalHome;
-import org.jboss.ejb3.test.proxy.common.ejb.slsb.MyStatelessRemote;
-import org.jboss.ejb3.test.proxy.common.ejb.slsb.MyStatelessRemoteHome;
+import org.jboss.ejb3.test.proxy.impl.common.SessionTestCaseBase;
+import org.jboss.ejb3.test.proxy.impl.common.Utils;
+import org.jboss.ejb3.test.proxy.impl.common.container.StatelessContainer;
+import org.jboss.ejb3.test.proxy.impl.common.ejb.slsb.MyStatelessBeanWithHomesBoundWithBusiness;
+import org.jboss.ejb3.test.proxy.impl.common.ejb.slsb.MyStatelessLocal;
+import org.jboss.ejb3.test.proxy.impl.common.ejb.slsb.MyStatelessLocalHome;
+import org.jboss.ejb3.test.proxy.impl.common.ejb.slsb.MyStatelessRemote;
+import org.jboss.ejb3.test.proxy.impl.common.ejb.slsb.MyStatelessRemoteHome;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;
Modified: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/session/unit/ProxyStatelessSessionLocalOnlyTestCase.java
===================================================================
--- projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/session/unit/ProxyStatelessSessionLocalOnlyTestCase.java 2009-03-12 00:10:16 UTC (rev 85752)
+++ projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/session/unit/ProxyStatelessSessionLocalOnlyTestCase.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -19,7 +19,7 @@
* 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.test.proxy.session.unit;
+package org.jboss.ejb3.test.proxy.impl.session.unit;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
@@ -27,12 +27,12 @@
import javax.naming.InitialContext;
import org.jboss.ejb3.common.registrar.spi.Ejb3RegistrarLocator;
-import org.jboss.ejb3.test.proxy.common.SessionTestCaseBase;
-import org.jboss.ejb3.test.proxy.common.Utils;
-import org.jboss.ejb3.test.proxy.common.container.StatelessContainer;
-import org.jboss.ejb3.test.proxy.common.ejb.slsb.MyStatelessLocal;
-import org.jboss.ejb3.test.proxy.common.ejb.slsb.MyStatelessLocalHome;
-import org.jboss.ejb3.test.proxy.common.ejb.slsb.MyStatelessLocalOnlyBean;
+import org.jboss.ejb3.test.proxy.impl.common.SessionTestCaseBase;
+import org.jboss.ejb3.test.proxy.impl.common.Utils;
+import org.jboss.ejb3.test.proxy.impl.common.container.StatelessContainer;
+import org.jboss.ejb3.test.proxy.impl.common.ejb.slsb.MyStatelessLocal;
+import org.jboss.ejb3.test.proxy.impl.common.ejb.slsb.MyStatelessLocalHome;
+import org.jboss.ejb3.test.proxy.impl.common.ejb.slsb.MyStatelessLocalOnlyBean;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;
Modified: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/session/unit/ProxyStatelessSessionRemoteOnlyTestCase.java
===================================================================
--- projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/session/unit/ProxyStatelessSessionRemoteOnlyTestCase.java 2009-03-12 00:10:16 UTC (rev 85752)
+++ projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/session/unit/ProxyStatelessSessionRemoteOnlyTestCase.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -19,7 +19,7 @@
* 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.test.proxy.session.unit;
+package org.jboss.ejb3.test.proxy.impl.session.unit;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
@@ -27,12 +27,12 @@
import javax.naming.InitialContext;
import org.jboss.ejb3.common.registrar.spi.Ejb3RegistrarLocator;
-import org.jboss.ejb3.test.proxy.common.SessionTestCaseBase;
-import org.jboss.ejb3.test.proxy.common.Utils;
-import org.jboss.ejb3.test.proxy.common.container.StatelessContainer;
-import org.jboss.ejb3.test.proxy.common.ejb.slsb.MyStatelessRemote;
-import org.jboss.ejb3.test.proxy.common.ejb.slsb.MyStatelessRemoteHome;
-import org.jboss.ejb3.test.proxy.common.ejb.slsb.MyStatelessRemoteOnlyBean;
+import org.jboss.ejb3.test.proxy.impl.common.SessionTestCaseBase;
+import org.jboss.ejb3.test.proxy.impl.common.Utils;
+import org.jboss.ejb3.test.proxy.impl.common.container.StatelessContainer;
+import org.jboss.ejb3.test.proxy.impl.common.ejb.slsb.MyStatelessRemote;
+import org.jboss.ejb3.test.proxy.impl.common.ejb.slsb.MyStatelessRemoteHome;
+import org.jboss.ejb3.test.proxy.impl.common.ejb.slsb.MyStatelessRemoteOnlyBean;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;
Modified: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/session/unit/ProxyStatelessSessionTestCase.java
===================================================================
--- projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/session/unit/ProxyStatelessSessionTestCase.java 2009-03-12 00:10:16 UTC (rev 85752)
+++ projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/session/unit/ProxyStatelessSessionTestCase.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -19,7 +19,7 @@
* 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.test.proxy.session.unit;
+package org.jboss.ejb3.test.proxy.impl.session.unit;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
@@ -27,14 +27,14 @@
import javax.naming.InitialContext;
import org.jboss.ejb3.common.registrar.spi.Ejb3RegistrarLocator;
-import org.jboss.ejb3.test.proxy.common.SessionTestCaseBase;
-import org.jboss.ejb3.test.proxy.common.Utils;
-import org.jboss.ejb3.test.proxy.common.container.StatelessContainer;
-import org.jboss.ejb3.test.proxy.common.ejb.slsb.MyStatelessBean;
-import org.jboss.ejb3.test.proxy.common.ejb.slsb.MyStatelessLocal;
-import org.jboss.ejb3.test.proxy.common.ejb.slsb.MyStatelessLocalHome;
-import org.jboss.ejb3.test.proxy.common.ejb.slsb.MyStatelessRemote;
-import org.jboss.ejb3.test.proxy.common.ejb.slsb.MyStatelessRemoteHome;
+import org.jboss.ejb3.test.proxy.impl.common.SessionTestCaseBase;
+import org.jboss.ejb3.test.proxy.impl.common.Utils;
+import org.jboss.ejb3.test.proxy.impl.common.container.StatelessContainer;
+import org.jboss.ejb3.test.proxy.impl.common.ejb.slsb.MyStatelessBean;
+import org.jboss.ejb3.test.proxy.impl.common.ejb.slsb.MyStatelessLocal;
+import org.jboss.ejb3.test.proxy.impl.common.ejb.slsb.MyStatelessLocalHome;
+import org.jboss.ejb3.test.proxy.impl.common.ejb.slsb.MyStatelessRemote;
+import org.jboss.ejb3.test.proxy.impl.common.ejb.slsb.MyStatelessRemoteHome;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;
Modified: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/session/unit/SessionTestCaseSupport.java
===================================================================
--- projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/session/unit/SessionTestCaseSupport.java 2009-03-12 00:10:16 UTC (rev 85752)
+++ projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/session/unit/SessionTestCaseSupport.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -19,7 +19,7 @@
* 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.test.proxy.session.unit;
+package org.jboss.ejb3.test.proxy.impl.session.unit;
import static org.junit.Assert.fail;
@@ -30,7 +30,7 @@
import junit.framework.TestCase;
-import org.jboss.ejb3.test.proxy.common.SessionTestCaseBase;
+import org.jboss.ejb3.test.proxy.impl.common.SessionTestCaseBase;
import org.jboss.logging.Logger;
/**
Copied: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/spec_3_4_5/ProxyEqualityTestCaseBase.java (from rev 85752, projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/spec_3_4_5/ProxyEqualityTestCaseBase.java)
===================================================================
--- projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/spec_3_4_5/ProxyEqualityTestCaseBase.java (rev 0)
+++ projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/spec_3_4_5/ProxyEqualityTestCaseBase.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -0,0 +1,220 @@
+/*
+ * 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.test.proxy.impl.spec_3_4_5;
+
+import java.net.URL;
+
+import junit.framework.TestCase;
+
+import org.jboss.aop.Advisor;
+import org.jboss.aop.AspectManager;
+import org.jboss.aop.AspectXmlLoader;
+import org.jboss.aop.ClassAdvisor;
+import org.jboss.ejb3.common.registrar.plugin.mc.Ejb3McRegistrar;
+import org.jboss.ejb3.common.registrar.spi.Ejb3RegistrarLocator;
+import org.jboss.ejb3.proxy.impl.factory.session.SessionProxyFactory;
+import org.jboss.ejb3.test.mc.bootstrap.EmbeddedTestMcBootstrap;
+import org.jboss.ejb3.test.proxy.impl.common.container.SessionContainer;
+import org.jboss.logging.Logger;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * ProxyEqualityTestCaseBase
+ *
+ * Support for Proxy Equality Test Cases as
+ * defined by:
+ *
+ * EJB 3.0 Core Specification 3.4.5
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+public abstract class ProxyEqualityTestCaseBase
+{
+ // --------------------------------------------------------------------------------||
+ // Class Members ------------------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ private static final Logger log = Logger.getLogger(ProxyEqualityTestCaseBase.class);
+
+ private static EmbeddedTestMcBootstrap bootstrap;
+
+ private static final String FILENAME_EJB3_INTERCEPTORS_AOP = "ejb3-interceptors-aop.xml";
+
+ /**
+ * Name of the SLSB Container for these tests
+ */
+ private static String containerName;
+
+ /**
+ * The Advisor for these tests
+ */
+ protected static Advisor advisor = null;
+
+ // --------------------------------------------------------------------------------||
+ // Tests --------------------------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ /**
+ * EJB 3.0 Core Specification 3.4.5
+ *
+ * Tests that a local proxy to a Session Bean is equal by value to itself
+ */
+ @Test
+ public void testSameLocalProxyEqual() throws Throwable
+ {
+ // Make a Local Proxy Factory
+ SessionProxyFactory factory = this.createSessionLocalProxyFactory();
+
+ // Create Proxy
+ Object proxy = this.createProxyDefault(factory);
+
+ // Ensure equal to itself by value
+ TestCase
+ .assertTrue(
+ "EJB 3.0 Core Specification 3.4.5 Violation: Local proxy to Session Bean should be equal by value to itself",
+ proxy.equals(proxy));
+ }
+
+ /**
+ * EJB 3.0 Core Specification 3.4.5
+ *
+ * Tests that a remote proxy to a Session Bean is equal by value to itself
+ */
+ @Test
+ public void testSameRemoteProxyEqual() throws Throwable
+ {
+ // Make a Local Proxy Factory
+ SessionProxyFactory factory = this.createSessionLocalProxyFactory();
+
+ // Create Proxy
+ Object proxy = this.createProxyDefault(factory);
+
+ // Ensure equal to itself by value
+ TestCase
+ .assertTrue(
+ "EJB 3.0 Core Specification 3.4.5 Violation: Remote proxy to Session Bean should be equal by value to itself",
+ proxy.equals(proxy));
+ }
+
+ // --------------------------------------------------------------------------------||
+ // Lifecycle Methods --------------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ @BeforeClass
+ public static void beforeClass() throws Throwable
+ {
+ // Create and set a new MC Bootstrap
+ ProxyEqualityTestCaseBase.setBootstrap(EmbeddedTestMcBootstrap.createEmbeddedMcBootstrap());
+
+ // Bind the Ejb3Registrar
+ Ejb3RegistrarLocator.bindRegistrar(new Ejb3McRegistrar(bootstrap.getKernel()));
+
+ // Load ejb3-interceptors-aop.xml into AspectManager
+ ClassLoader cl = Thread.currentThread().getContextClassLoader();
+ URL url = cl.getResource(FILENAME_EJB3_INTERCEPTORS_AOP);
+ if (url == null)
+ {
+ throw new RuntimeException("Could not load " + AspectManager.class.getSimpleName()
+ + " with definitions from XML as file " + FILENAME_EJB3_INTERCEPTORS_AOP + " could not be found");
+ }
+ AspectXmlLoader.deployXML(url);
+ AspectManager manager = AspectManager.instance();
+ Advisor advisor = new ClassAdvisor(ProxyEqualityTestCaseBase.class, manager);
+ ProxyEqualityTestCaseBase.advisor = advisor;
+ }
+
+ @AfterClass
+ public static void afterClass() throws Throwable
+ {
+ // Shutdown MC
+ ProxyEqualityTestCaseBase.getBootstrap().shutdown();
+
+ // Set Bootstrap to null
+ ProxyEqualityTestCaseBase.setBootstrap(null);
+ }
+
+ // --------------------------------------------------------------------------------||
+ // Helper Methods -----------------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ /**
+ * Creates a default proxy for the specified Session ProxyFactory
+ */
+ protected Object createProxyDefault(SessionProxyFactory factory)
+ {
+ return factory.createProxyDefault();
+ }
+
+ // --------------------------------------------------------------------------------||
+ // Specifications -----------------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ /**
+ * Obtains the Container for use in this TestCase
+ *
+ * @return
+ */
+ protected abstract SessionContainer getContainer();
+
+ /**
+ * Creates a Proxy Factory for local Proxies
+ *
+ * @return
+ * @throws Throwable
+ */
+ protected abstract SessionProxyFactory createSessionLocalProxyFactory() throws Throwable;
+
+ /**
+ * Creates a Proxy Factory for remote Proxies
+ *
+ * @return
+ * @throws Throwable
+ */
+ protected abstract SessionProxyFactory createSessionRemoteProxyFactory() throws Throwable;
+
+ // --------------------------------------------------------------------------------||
+ // Accessors / Mutators -----------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ protected static EmbeddedTestMcBootstrap getBootstrap()
+ {
+ return ProxyEqualityTestCaseBase.bootstrap;
+ }
+
+ protected static void setBootstrap(EmbeddedTestMcBootstrap bootstrap)
+ {
+ ProxyEqualityTestCaseBase.bootstrap = bootstrap;
+ }
+
+ protected static String getContainerName()
+ {
+ return containerName;
+ }
+
+ protected static void setContainerName(String containerName)
+ {
+ ProxyEqualityTestCaseBase.containerName = containerName;
+ }
+}
Property changes on: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/spec_3_4_5/ProxyEqualityTestCaseBase.java
___________________________________________________________________
Name: svn:mergeinfo
+
Copied: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/spec_3_4_5/unit (from rev 85752, projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/spec_3_4_5/unit)
Property changes on: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/spec_3_4_5/unit
___________________________________________________________________
Name: svn:mergeinfo
+
Modified: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/spec_3_4_5/unit/SfsbProxyEqualityTestCase.java
===================================================================
--- projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/spec_3_4_5/unit/SfsbProxyEqualityTestCase.java 2009-03-12 00:10:16 UTC (rev 85752)
+++ projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/spec_3_4_5/unit/SfsbProxyEqualityTestCase.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -19,7 +19,7 @@
* 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.test.proxy.spec_3_4_5.unit;
+package org.jboss.ejb3.test.proxy.impl.spec_3_4_5.unit;
import java.io.Serializable;
import java.util.UUID;
@@ -27,14 +27,14 @@
import junit.framework.TestCase;
import org.jboss.aop.Dispatcher;
-import org.jboss.ejb3.proxy.factory.session.SessionProxyFactory;
-import org.jboss.ejb3.proxy.factory.session.stateful.StatefulSessionLocalProxyFactory;
-import org.jboss.ejb3.proxy.factory.session.stateful.StatefulSessionRemoteProxyFactory;
+import org.jboss.ejb3.proxy.impl.factory.session.SessionProxyFactory;
+import org.jboss.ejb3.proxy.impl.factory.session.stateful.StatefulSessionLocalProxyFactory;
+import org.jboss.ejb3.proxy.impl.factory.session.stateful.StatefulSessionRemoteProxyFactory;
import org.jboss.ejb3.proxy.spi.intf.StatefulSessionProxy;
-import org.jboss.ejb3.test.proxy.common.Utils;
-import org.jboss.ejb3.test.proxy.common.container.StatefulContainer;
-import org.jboss.ejb3.test.proxy.common.ejb.sfsb.MyStatefulBean;
-import org.jboss.ejb3.test.proxy.spec_3_4_5.ProxyEqualityTestCaseBase;
+import org.jboss.ejb3.test.proxy.impl.common.Utils;
+import org.jboss.ejb3.test.proxy.impl.common.container.StatefulContainer;
+import org.jboss.ejb3.test.proxy.impl.common.ejb.sfsb.MyStatefulBean;
+import org.jboss.ejb3.test.proxy.impl.spec_3_4_5.ProxyEqualityTestCaseBase;
import org.jboss.logging.Logger;
import org.junit.BeforeClass;
import org.junit.Test;
Modified: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/spec_3_4_5/unit/SlsbProxyEqualityTestCase.java
===================================================================
--- projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/spec_3_4_5/unit/SlsbProxyEqualityTestCase.java 2009-03-12 00:10:16 UTC (rev 85752)
+++ projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/impl/spec_3_4_5/unit/SlsbProxyEqualityTestCase.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -19,17 +19,17 @@
* 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.test.proxy.spec_3_4_5.unit;
+package org.jboss.ejb3.test.proxy.impl.spec_3_4_5.unit;
import junit.framework.TestCase;
-import org.jboss.ejb3.proxy.factory.session.stateless.StatelessSessionLocalProxyFactory;
-import org.jboss.ejb3.proxy.factory.session.stateless.StatelessSessionRemoteProxyFactory;
-import org.jboss.ejb3.test.proxy.common.Utils;
-import org.jboss.ejb3.test.proxy.common.container.SessionContainer;
-import org.jboss.ejb3.test.proxy.common.container.StatelessContainer;
-import org.jboss.ejb3.test.proxy.common.ejb.slsb.MyStatelessBean;
-import org.jboss.ejb3.test.proxy.spec_3_4_5.ProxyEqualityTestCaseBase;
+import org.jboss.ejb3.proxy.impl.factory.session.stateless.StatelessSessionLocalProxyFactory;
+import org.jboss.ejb3.proxy.impl.factory.session.stateless.StatelessSessionRemoteProxyFactory;
+import org.jboss.ejb3.test.proxy.impl.common.Utils;
+import org.jboss.ejb3.test.proxy.impl.common.container.SessionContainer;
+import org.jboss.ejb3.test.proxy.impl.common.container.StatelessContainer;
+import org.jboss.ejb3.test.proxy.impl.common.ejb.slsb.MyStatelessBean;
+import org.jboss.ejb3.test.proxy.impl.spec_3_4_5.ProxyEqualityTestCaseBase;
import org.jboss.logging.Logger;
import org.junit.BeforeClass;
import org.junit.Test;
Deleted: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/jndiregistrar/BindingTest.java
===================================================================
--- projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/jndiregistrar/BindingTest.java 2009-03-12 05:07:26 UTC (rev 85762)
+++ projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/jndiregistrar/BindingTest.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -1,46 +0,0 @@
-/*
- * 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.test.proxy.jndiregistrar;
-
-/**
- * BindingTest
- *
- * Defines all functions required of
- * the Remote Binding Test EJB
- *
- * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
- * @version $Revision: $
- */
-public interface BindingTest
-{
-
- /*
- * Common functions
- */
-
- /**
- * Echos the specified parameter
- *
- * @param param
- */
- String echo(String param);
-}
Deleted: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/jndiregistrar/ClientBindUrlBindingTest.java
===================================================================
--- projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/jndiregistrar/ClientBindUrlBindingTest.java 2009-03-12 05:07:26 UTC (rev 85762)
+++ projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/jndiregistrar/ClientBindUrlBindingTest.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -1,50 +0,0 @@
-/*
- * 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.test.proxy.jndiregistrar;
-
-/**
- * ClientBindUrlBindingTest
- *
- * Remote Business Interface defining two client bind URLs
- * to be used in the Remoting InvokerLocator
- *
- * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
- * @version $Revision: $
- */
-public interface ClientBindUrlBindingTest extends BindingTest
-{
- /*
- * Define some overridden clientBindUrls
- */
- String CLIENT_BIND_URL_1 = "socket://localhost:4873";
-
- String CLIENT_BIND_URL_2 = "socket://127.0.0.1:4873";
-
- /*
- * Define the JNDI Bindings
- */
-
- String JNDI_BINDING_1 = "JndiBinding1";
-
- String JNDI_BINDING_2 = "JndiBinding2";
-
-}
Deleted: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/jndiregistrar/ClientBindUrlTestBean.java
===================================================================
--- projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/jndiregistrar/ClientBindUrlTestBean.java 2009-03-12 05:07:26 UTC (rev 85762)
+++ projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/jndiregistrar/ClientBindUrlTestBean.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -1,54 +0,0 @@
-/*
- * 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.test.proxy.jndiregistrar;
-
-import javax.ejb.Local;
-import javax.ejb.Remote;
-import javax.ejb.Stateless;
-
-import org.jboss.ejb3.annotation.LocalBinding;
-import org.jboss.ejb3.annotation.RemoteBinding;
-import org.jboss.ejb3.annotation.RemoteBindings;
-
-/**
- * ClientBindUrlTestBean
- *
- * Tests EJB for alternate clientBindUrls
- *
- * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
- * @version $Revision: $
- */
- at Stateless
- at Local(LocalJndiBindingTest.class)
- at Remote(ClientBindUrlBindingTest.class)
- at RemoteBindings(
-{
- @RemoteBinding(jndiBinding = ClientBindUrlBindingTest.JNDI_BINDING_1, clientBindUrl = ClientBindUrlBindingTest.CLIENT_BIND_URL_1),
- @RemoteBinding(jndiBinding = ClientBindUrlBindingTest.JNDI_BINDING_2, clientBindUrl = ClientBindUrlBindingTest.CLIENT_BIND_URL_2)})
- at LocalBinding(jndiBinding = LocalJndiBindingTest.JNDI_BINDING)
-public class ClientBindUrlTestBean extends JndiBindingTestBeanBase
- implements
- ClientBindUrlBindingTest,
- LocalJndiBindingTest
-{
-
-}
Deleted: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/jndiregistrar/JndiBindingTestBean.java
===================================================================
--- projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/jndiregistrar/JndiBindingTestBean.java 2009-03-12 05:07:26 UTC (rev 85762)
+++ projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/jndiregistrar/JndiBindingTestBean.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -1,50 +0,0 @@
-/*
- * 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.test.proxy.jndiregistrar;
-
-import javax.ejb.Local;
-import javax.ejb.Remote;
-import javax.ejb.Stateless;
-
-import org.jboss.ejb3.annotation.LocalBinding;
-import org.jboss.ejb3.annotation.RemoteBinding;
-import org.jboss.ejb3.annotation.RemoteBindings;
-
-/**
- * JndiBindingTestBean
- *
- * Tests EJB for explicit JNDI Bindings
- *
- * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
- * @version $Revision: $
- */
- at Stateless
- at Remote(RemoteJndiBindingTest.class)
- at Local(LocalJndiBindingTest.class)
- at RemoteBindings(
-{@RemoteBinding(jndiBinding = RemoteJndiBindingTest.JNDI_BINDING_1),
- @RemoteBinding(jndiBinding = RemoteJndiBindingTest.JNDI_BINDING_2)})
- at LocalBinding(jndiBinding = LocalJndiBindingTest.JNDI_BINDING)
-public class JndiBindingTestBean extends JndiBindingTestBeanBase implements RemoteJndiBindingTest, LocalJndiBindingTest
-{
-
-}
Deleted: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/jndiregistrar/JndiBindingTestBeanBase.java
===================================================================
--- projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/jndiregistrar/JndiBindingTestBeanBase.java 2009-03-12 05:07:26 UTC (rev 85762)
+++ projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/jndiregistrar/JndiBindingTestBeanBase.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -1,43 +0,0 @@
-/*
- * 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.test.proxy.jndiregistrar;
-
-/**
- * JndiBindingTestBeanBase
- *
- * Common base for @RemoteBinding test EJBs
- *
- * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
- * @version $Revision: $
- */
-public class JndiBindingTestBeanBase implements BindingTest
-{
-
- /* (non-Javadoc)
- * @see org.jboss.ejb3.test.proxy.binding.BindingTest#echo(java.lang.String)
- */
- public String echo(String param)
- {
- return param;
- }
-
-}
Deleted: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/jndiregistrar/LocalJndiBindingTest.java
===================================================================
--- projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/jndiregistrar/LocalJndiBindingTest.java 2009-03-12 05:07:26 UTC (rev 85762)
+++ projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/jndiregistrar/LocalJndiBindingTest.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -1,39 +0,0 @@
-/*
- * 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.test.proxy.jndiregistrar;
-
-/**
- * LocalJndiBindingTest
- *
- * Local Business Interface defining an overridden
- * JNDI Binding
- *
- * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
- * @version $Revision: $
- */
-public interface LocalJndiBindingTest extends BindingTest
-{
- /*
- * Define an overridden JNDI Binding
- */
- String JNDI_BINDING = "MyOverriddenBinding/local";
-}
Deleted: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/jndiregistrar/RemoteBindingNoJndiBindingTestBean.java
===================================================================
--- projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/jndiregistrar/RemoteBindingNoJndiBindingTestBean.java 2009-03-12 05:07:26 UTC (rev 85762)
+++ projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/jndiregistrar/RemoteBindingNoJndiBindingTestBean.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -1,47 +0,0 @@
-/*
- * 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.test.proxy.jndiregistrar;
-
-import javax.ejb.Remote;
-import javax.ejb.Stateless;
-
-import org.jboss.ejb3.annotation.RemoteBinding;
-
-/**
- * RemoteBindingNoJndiBindingTestBean
- *
- * Tests that an EJB with @RemoteBinding but no JNDI Binding
- * defined is bound to the correct location (as obtained from
- * JBossSessionBeanMetaData.getJndiName())
- *
- * EJBTHREE-1525
- *
- * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
- * @version $Revision: $
- */
- at Stateless
- at Remote(RemoteJndiBindingTest.class)
- at RemoteBinding(factory = "SomethingFake")
-public class RemoteBindingNoJndiBindingTestBean extends JndiBindingTestBeanBase implements RemoteJndiBindingTest
-{
-
-}
Deleted: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/jndiregistrar/RemoteJndiBindingTest.java
===================================================================
--- projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/jndiregistrar/RemoteJndiBindingTest.java 2009-03-12 05:07:26 UTC (rev 85762)
+++ projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/jndiregistrar/RemoteJndiBindingTest.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -1,49 +0,0 @@
-/*
- * 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.test.proxy.jndiregistrar;
-
-import org.jboss.ejb3.annotation.RemoteBinding;
-
-/**
- * RemoteJndiBindingTest
- *
- * Remote Business Interface defining three overridden
- * JNDI Bindings, as well as access to test a local binding
- *
- * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
- * @version $Revision: $
- */
- at RemoteBinding(jndiBinding = RemoteJndiBindingTest.JNDI_BINDING_DECLARED_BY_BUSINESS_INTERFACE)
-public interface RemoteJndiBindingTest extends BindingTest
-{
- /*
- * Define some overridden JNDI Bindings to be declared by the EJB Impl Class
- */
- String JNDI_BINDING_1 = "MyOverriddenBinding1/remote";
-
- String JNDI_BINDING_2 = "MyOverriddenBinding2/remote";
-
- /**
- * A JNDI Binding to be declared here on the business interface
- */
- String JNDI_BINDING_DECLARED_BY_BUSINESS_INTERFACE = "MyOverriddenBindingDeclaredByBusinessInterface/remote";
-}
Deleted: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/spec_3_4_5/ProxyEqualityTestCaseBase.java
===================================================================
--- projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/spec_3_4_5/ProxyEqualityTestCaseBase.java 2009-03-12 05:07:26 UTC (rev 85762)
+++ projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/spec_3_4_5/ProxyEqualityTestCaseBase.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -1,220 +0,0 @@
-/*
- * 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.test.proxy.spec_3_4_5;
-
-import java.net.URL;
-
-import junit.framework.TestCase;
-
-import org.jboss.aop.Advisor;
-import org.jboss.aop.AspectManager;
-import org.jboss.aop.AspectXmlLoader;
-import org.jboss.aop.ClassAdvisor;
-import org.jboss.ejb3.common.registrar.plugin.mc.Ejb3McRegistrar;
-import org.jboss.ejb3.common.registrar.spi.Ejb3RegistrarLocator;
-import org.jboss.ejb3.proxy.factory.session.SessionProxyFactory;
-import org.jboss.ejb3.test.mc.bootstrap.EmbeddedTestMcBootstrap;
-import org.jboss.ejb3.test.proxy.common.container.SessionContainer;
-import org.jboss.logging.Logger;
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
-import org.junit.Test;
-
-/**
- * ProxyEqualityTestCaseBase
- *
- * Support for Proxy Equality Test Cases as
- * defined by:
- *
- * EJB 3.0 Core Specification 3.4.5
- *
- * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
- * @version $Revision: $
- */
-public abstract class ProxyEqualityTestCaseBase
-{
- // --------------------------------------------------------------------------------||
- // Class Members ------------------------------------------------------------------||
- // --------------------------------------------------------------------------------||
-
- private static final Logger log = Logger.getLogger(ProxyEqualityTestCaseBase.class);
-
- private static EmbeddedTestMcBootstrap bootstrap;
-
- private static final String FILENAME_EJB3_INTERCEPTORS_AOP = "ejb3-interceptors-aop.xml";
-
- /**
- * Name of the SLSB Container for these tests
- */
- private static String containerName;
-
- /**
- * The Advisor for these tests
- */
- protected static Advisor advisor = null;
-
- // --------------------------------------------------------------------------------||
- // Tests --------------------------------------------------------------------------||
- // --------------------------------------------------------------------------------||
-
- /**
- * EJB 3.0 Core Specification 3.4.5
- *
- * Tests that a local proxy to a Session Bean is equal by value to itself
- */
- @Test
- public void testSameLocalProxyEqual() throws Throwable
- {
- // Make a Local Proxy Factory
- SessionProxyFactory factory = this.createSessionLocalProxyFactory();
-
- // Create Proxy
- Object proxy = this.createProxyDefault(factory);
-
- // Ensure equal to itself by value
- TestCase
- .assertTrue(
- "EJB 3.0 Core Specification 3.4.5 Violation: Local proxy to Session Bean should be equal by value to itself",
- proxy.equals(proxy));
- }
-
- /**
- * EJB 3.0 Core Specification 3.4.5
- *
- * Tests that a remote proxy to a Session Bean is equal by value to itself
- */
- @Test
- public void testSameRemoteProxyEqual() throws Throwable
- {
- // Make a Local Proxy Factory
- SessionProxyFactory factory = this.createSessionLocalProxyFactory();
-
- // Create Proxy
- Object proxy = this.createProxyDefault(factory);
-
- // Ensure equal to itself by value
- TestCase
- .assertTrue(
- "EJB 3.0 Core Specification 3.4.5 Violation: Remote proxy to Session Bean should be equal by value to itself",
- proxy.equals(proxy));
- }
-
- // --------------------------------------------------------------------------------||
- // Lifecycle Methods --------------------------------------------------------------||
- // --------------------------------------------------------------------------------||
-
- @BeforeClass
- public static void beforeClass() throws Throwable
- {
- // Create and set a new MC Bootstrap
- ProxyEqualityTestCaseBase.setBootstrap(EmbeddedTestMcBootstrap.createEmbeddedMcBootstrap());
-
- // Bind the Ejb3Registrar
- Ejb3RegistrarLocator.bindRegistrar(new Ejb3McRegistrar(bootstrap.getKernel()));
-
- // Load ejb3-interceptors-aop.xml into AspectManager
- ClassLoader cl = Thread.currentThread().getContextClassLoader();
- URL url = cl.getResource(FILENAME_EJB3_INTERCEPTORS_AOP);
- if (url == null)
- {
- throw new RuntimeException("Could not load " + AspectManager.class.getSimpleName()
- + " with definitions from XML as file " + FILENAME_EJB3_INTERCEPTORS_AOP + " could not be found");
- }
- AspectXmlLoader.deployXML(url);
- AspectManager manager = AspectManager.instance();
- Advisor advisor = new ClassAdvisor(ProxyEqualityTestCaseBase.class, manager);
- ProxyEqualityTestCaseBase.advisor = advisor;
- }
-
- @AfterClass
- public static void afterClass() throws Throwable
- {
- // Shutdown MC
- ProxyEqualityTestCaseBase.getBootstrap().shutdown();
-
- // Set Bootstrap to null
- ProxyEqualityTestCaseBase.setBootstrap(null);
- }
-
- // --------------------------------------------------------------------------------||
- // Helper Methods -----------------------------------------------------------------||
- // --------------------------------------------------------------------------------||
-
- /**
- * Creates a default proxy for the specified Session ProxyFactory
- */
- protected Object createProxyDefault(SessionProxyFactory factory)
- {
- return factory.createProxyDefault();
- }
-
- // --------------------------------------------------------------------------------||
- // Specifications -----------------------------------------------------------------||
- // --------------------------------------------------------------------------------||
-
- /**
- * Obtains the Container for use in this TestCase
- *
- * @return
- */
- protected abstract SessionContainer getContainer();
-
- /**
- * Creates a Proxy Factory for local Proxies
- *
- * @return
- * @throws Throwable
- */
- protected abstract SessionProxyFactory createSessionLocalProxyFactory() throws Throwable;
-
- /**
- * Creates a Proxy Factory for remote Proxies
- *
- * @return
- * @throws Throwable
- */
- protected abstract SessionProxyFactory createSessionRemoteProxyFactory() throws Throwable;
-
- // --------------------------------------------------------------------------------||
- // Accessors / Mutators -----------------------------------------------------------||
- // --------------------------------------------------------------------------------||
-
- protected static EmbeddedTestMcBootstrap getBootstrap()
- {
- return ProxyEqualityTestCaseBase.bootstrap;
- }
-
- protected static void setBootstrap(EmbeddedTestMcBootstrap bootstrap)
- {
- ProxyEqualityTestCaseBase.bootstrap = bootstrap;
- }
-
- protected static String getContainerName()
- {
- return containerName;
- }
-
- protected static void setContainerName(String containerName)
- {
- ProxyEqualityTestCaseBase.containerName = containerName;
- }
-}
Deleted: projects/ejb3/trunk/proxy/src/test/resources/org/jboss/ejb3/test/proxy/common/SessionTestCaseBase-jboss-beans.xml
===================================================================
--- projects/ejb3/trunk/proxy/src/test/resources/org/jboss/ejb3/test/proxy/common/SessionTestCaseBase-jboss-beans.xml 2009-03-12 05:07:26 UTC (rev 85762)
+++ projects/ejb3/trunk/proxy/src/test/resources/org/jboss/ejb3/test/proxy/common/SessionTestCaseBase-jboss-beans.xml 2009-03-12 05:14:38 UTC (rev 85763)
@@ -1,83 +0,0 @@
-<deployment xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="urn:jboss:bean-deployer:2.0 bean-deployer_2_0.xsd"
- xmlns="urn:jboss:bean-deployer:2.0">
-
- <!--
-
- JNDI
-
- The requisite Naming Server
-
- -->
- <bean name="NameServer" class="org.jnp.server.SingletonNamingServer" />
-
- <!--
-
- JNDI Registrars
-
- -->
-
- <!-- SLSB JNDI Registrar -->
- <bean name="org.jboss.ejb3.JndiRegistrar.Session.SLSBJndiRegistrar"
- class="org.jboss.ejb3.proxy.jndiregistrar.JndiStatelessSessionRegistrar">
- <constructor>
- <parameter>
- org.jboss.ejb3.proxy.objectfactory.session.stateless.StatelessSessionProxyObjectFactory
- </parameter>
- </constructor>
- <depends>NameServer</depends>
- </bean>
-
- <!-- SFSB JNDI Registrar -->
- <bean name="org.jboss.ejb3.JndiRegistrar.Session.SFSBJndiRegistrar"
- class="org.jboss.ejb3.proxy.jndiregistrar.JndiStatefulSessionRegistrar">
- <constructor>
- <parameter>
- org.jboss.ejb3.proxy.objectfactory.session.stateful.StatefulSessionProxyObjectFactory
- </parameter>
- </constructor>
- <depends>NameServer</depends>
- </bean>
-
- <!-- @Service JNDI Registrar -->
- <bean name="org.jboss.ejb3.JndiRegistrar.Session.ServiceJndiRegistrar"
- class="org.jboss.ejb3.proxy.jndiregistrar.JndiServiceRegistrar">
- <constructor>
- <parameter>
- org.jboss.ejb3.proxy.objectfactory.session.service.ServiceProxyObjectFactory
- </parameter>
- </constructor>
- <depends>NameServer</depends>
- </bean>
-
- <!--
-
- Remoting
-
- -->
-
- <!-- Remoting Configuration -->
- <bean name="ServerConfiguration"
- class="org.jboss.remoting.ServerConfiguration">
- <property name="invocationHandlers">
- <map keyClass="java.lang.String" valueClass="java.lang.String">
- <entry>
- <key>AOP</key>
- <value>
- org.jboss.aspects.remoting.AOPRemotingInvocationHandler
- </value>
- </entry>
- </map>
- </property>
- </bean>
-
- <!-- Remoting Connector -->
- <bean name="org.jboss.ejb3.RemotingConnector"
- class="org.jboss.remoting.transport.Connector">
- <property name="invokerLocator">socket://0.0.0.0:4873</property>
- <property name="serverConfiguration">
- <inject bean="ServerConfiguration" />
- </property>
- </bean>
-
-</deployment>
Copied: projects/ejb3/trunk/proxy/src/test/resources/org/jboss/ejb3/test/proxy/impl/common/SessionTestCaseBase-jboss-beans.xml (from rev 85752, projects/ejb3/trunk/proxy/src/test/resources/org/jboss/ejb3/test/proxy/common/SessionTestCaseBase-jboss-beans.xml)
===================================================================
--- projects/ejb3/trunk/proxy/src/test/resources/org/jboss/ejb3/test/proxy/impl/common/SessionTestCaseBase-jboss-beans.xml (rev 0)
+++ projects/ejb3/trunk/proxy/src/test/resources/org/jboss/ejb3/test/proxy/impl/common/SessionTestCaseBase-jboss-beans.xml 2009-03-12 05:14:38 UTC (rev 85763)
@@ -0,0 +1,83 @@
+<deployment xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="urn:jboss:bean-deployer:2.0 bean-deployer_2_0.xsd"
+ xmlns="urn:jboss:bean-deployer:2.0">
+
+ <!--
+
+ JNDI
+
+ The requisite Naming Server
+
+ -->
+ <bean name="NameServer" class="org.jnp.server.SingletonNamingServer" />
+
+ <!--
+
+ JNDI Registrars
+
+ -->
+
+ <!-- SLSB JNDI Registrar -->
+ <bean name="org.jboss.ejb3.JndiRegistrar.Session.SLSBJndiRegistrar"
+ class="org.jboss.ejb3.proxy.impl.jndiregistrar.JndiStatelessSessionRegistrar">
+ <constructor>
+ <parameter>
+ org.jboss.ejb3.proxy.impl.objectfactory.session.stateless.StatelessSessionProxyObjectFactory
+ </parameter>
+ </constructor>
+ <depends>NameServer</depends>
+ </bean>
+
+ <!-- SFSB JNDI Registrar -->
+ <bean name="org.jboss.ejb3.JndiRegistrar.Session.SFSBJndiRegistrar"
+ class="org.jboss.ejb3.proxy.impl.jndiregistrar.JndiStatefulSessionRegistrar">
+ <constructor>
+ <parameter>
+ org.jboss.ejb3.proxy.impl.objectfactory.session.stateful.StatefulSessionProxyObjectFactory
+ </parameter>
+ </constructor>
+ <depends>NameServer</depends>
+ </bean>
+
+ <!-- @Service JNDI Registrar -->
+ <bean name="org.jboss.ejb3.JndiRegistrar.Session.ServiceJndiRegistrar"
+ class="org.jboss.ejb3.proxy.impl.jndiregistrar.JndiServiceRegistrar">
+ <constructor>
+ <parameter>
+ org.jboss.ejb3.proxy.impl.objectfactory.session.service.ServiceProxyObjectFactory
+ </parameter>
+ </constructor>
+ <depends>NameServer</depends>
+ </bean>
+
+ <!--
+
+ Remoting
+
+ -->
+
+ <!-- Remoting Configuration -->
+ <bean name="ServerConfiguration"
+ class="org.jboss.remoting.ServerConfiguration">
+ <property name="invocationHandlers">
+ <map keyClass="java.lang.String" valueClass="java.lang.String">
+ <entry>
+ <key>AOP</key>
+ <value>
+ org.jboss.aspects.remoting.AOPRemotingInvocationHandler
+ </value>
+ </entry>
+ </map>
+ </property>
+ </bean>
+
+ <!-- Remoting Connector -->
+ <bean name="org.jboss.ejb3.RemotingConnector"
+ class="org.jboss.remoting.transport.Connector">
+ <property name="invokerLocator">socket://0.0.0.0:4873</property>
+ <property name="serverConfiguration">
+ <inject bean="ServerConfiguration" />
+ </property>
+ </bean>
+
+</deployment>
Property changes on: projects/ejb3/trunk/proxy/src/test/resources/org/jboss/ejb3/test/proxy/impl/common/SessionTestCaseBase-jboss-beans.xml
___________________________________________________________________
Name: svn:mergeinfo
+
Copied: projects/ejb3/trunk/proxy/src/test/resources/org/jboss/ejb3/test/proxy/impl/common/container/unit (from rev 85752, projects/ejb3/trunk/proxy/src/test/resources/org/jboss/ejb3/test/proxy/common/container/unit)
Property changes on: projects/ejb3/trunk/proxy/src/test/resources/org/jboss/ejb3/test/proxy/impl/common/container/unit
___________________________________________________________________
Name: svn:mergeinfo
+
Modified: projects/ejb3/trunk/proxy/src/test/resources/org/jboss/ejb3/test/proxy/impl/common/container/unit/SessionContainerTestCase-jboss-beans.xml
===================================================================
--- projects/ejb3/trunk/proxy/src/test/resources/org/jboss/ejb3/test/proxy/common/container/unit/SessionContainerTestCase-jboss-beans.xml 2009-03-12 00:10:16 UTC (rev 85752)
+++ projects/ejb3/trunk/proxy/src/test/resources/org/jboss/ejb3/test/proxy/impl/common/container/unit/SessionContainerTestCase-jboss-beans.xml 2009-03-12 05:14:38 UTC (rev 85763)
@@ -19,10 +19,10 @@
<!-- SLSB JNDI Registrar -->
<bean name="org.jboss.ejb3.JndiRegistrar.Session.SLSBJndiRegistrar"
- class="org.jboss.ejb3.proxy.jndiregistrar.JndiStatelessSessionRegistrar">
+ class="org.jboss.ejb3.proxy.impl.jndiregistrar.JndiStatelessSessionRegistrar">
<constructor>
<parameter>
- org.jboss.ejb3.proxy.objectfactory.session.stateless.StatelessSessionProxyObjectFactory
+ org.jboss.ejb3.proxy.impl.objectfactory.session.stateless.StatelessSessionProxyObjectFactory
</parameter>
</constructor>
<depends>NameServer</depends>
@@ -30,10 +30,10 @@
<!-- SFSB JNDI Registrar -->
<bean name="org.jboss.ejb3.JndiRegistrar.Session.SFSBJndiRegistrar"
- class="org.jboss.ejb3.proxy.jndiregistrar.JndiStatefulSessionRegistrar">
+ class="org.jboss.ejb3.proxy.impl.jndiregistrar.JndiStatefulSessionRegistrar">
<constructor>
<parameter>
- org.jboss.ejb3.proxy.objectfactory.session.stateful.StatefulSessionProxyObjectFactory
+ org.jboss.ejb3.proxy.impl.objectfactory.session.stateful.StatefulSessionProxyObjectFactory
</parameter>
</constructor>
<depends>NameServer</depends>
Copied: projects/ejb3/trunk/proxy/src/test/resources/org/jboss/ejb3/test/proxy/impl/ejbthree1517/unit (from rev 85752, projects/ejb3/trunk/proxy/src/test/resources/org/jboss/ejb3/test/proxy/ejbthree1517/unit)
Property changes on: projects/ejb3/trunk/proxy/src/test/resources/org/jboss/ejb3/test/proxy/impl/ejbthree1517/unit
___________________________________________________________________
Name: svn:mergeinfo
+
Modified: projects/ejb3/trunk/proxy/src/test/resources/org/jboss/ejb3/test/proxy/impl/ejbthree1517/unit/ejb3-interceptors-ejbthree1517-aop.xml
===================================================================
--- projects/ejb3/trunk/proxy/src/test/resources/org/jboss/ejb3/test/proxy/ejbthree1517/unit/ejb3-interceptors-ejbthree1517-aop.xml 2009-03-12 00:10:16 UTC (rev 85752)
+++ projects/ejb3/trunk/proxy/src/test/resources/org/jboss/ejb3/test/proxy/impl/ejbthree1517/unit/ejb3-interceptors-ejbthree1517-aop.xml 2009-03-12 05:14:38 UTC (rev 85763)
@@ -17,7 +17,7 @@
class="org.jboss.aspects.remoting.InvokeRemoteInterceptor"
scope="PER_VM" />
<interceptor
- class="org.jboss.ejb3.test.proxy.ejbthree1517.ReturnStaticValueInterceptor"
+ class="org.jboss.ejb3.test.proxy.impl.ejbthree1517.ReturnStaticValueInterceptor"
scope="PER_VM" />
<!--
@@ -44,7 +44,7 @@
<stack name="OverrideInterceptors_EJBTHREE-1517">
<interceptor-ref
- name="org.jboss.ejb3.test.proxy.ejbthree1517.ReturnStaticValueInterceptor" />
+ name="org.jboss.ejb3.test.proxy.impl.ejbthree1517.ReturnStaticValueInterceptor" />
</stack>
</aop>
\ No newline at end of file
Copied: projects/ejb3/trunk/proxy/src/test/resources/org/jboss/ejb3/test/proxy/impl/ejbthree1529/unit (from rev 85752, projects/ejb3/trunk/proxy/src/test/resources/org/jboss/ejb3/test/proxy/ejbthree1529/unit)
Property changes on: projects/ejb3/trunk/proxy/src/test/resources/org/jboss/ejb3/test/proxy/impl/ejbthree1529/unit
___________________________________________________________________
Name: svn:mergeinfo
+
Copied: projects/ejb3/trunk/proxy/src/test/resources/org/jboss/ejb3/test/proxy/impl/jndiregistrar/unit (from rev 85752, projects/ejb3/trunk/proxy/src/test/resources/org/jboss/ejb3/test/proxy/jndiregistrar/unit)
Property changes on: projects/ejb3/trunk/proxy/src/test/resources/org/jboss/ejb3/test/proxy/impl/jndiregistrar/unit
___________________________________________________________________
Name: svn:mergeinfo
+
Modified: projects/ejb3/trunk/proxy/src/test/resources/org/jboss/ejb3/test/proxy/impl/jndiregistrar/unit/JNDIBindingTestCase-jboss-beans.xml
===================================================================
--- projects/ejb3/trunk/proxy/src/test/resources/org/jboss/ejb3/test/proxy/jndiregistrar/unit/JNDIBindingTestCase-jboss-beans.xml 2009-03-12 00:10:16 UTC (rev 85752)
+++ projects/ejb3/trunk/proxy/src/test/resources/org/jboss/ejb3/test/proxy/impl/jndiregistrar/unit/JNDIBindingTestCase-jboss-beans.xml 2009-03-12 05:14:38 UTC (rev 85763)
@@ -19,10 +19,10 @@
<!-- SLSB JNDI Registrar -->
<bean name="org.jboss.ejb3.JndiRegistrar.Session.SLSBJndiRegistrar"
- class="org.jboss.ejb3.proxy.jndiregistrar.JndiStatelessSessionRegistrar">
+ class="org.jboss.ejb3.proxy.impl.jndiregistrar.JndiStatelessSessionRegistrar">
<constructor>
<parameter>
- org.jboss.ejb3.proxy.objectfactory.session.stateless.StatelessSessionProxyObjectFactory
+ org.jboss.ejb3.proxy.impl.objectfactory.session.stateless.StatelessSessionProxyObjectFactory
</parameter>
</constructor>
<depends>NameServer</depends>
@@ -30,10 +30,10 @@
<!-- SFSB JNDI Registrar -->
<bean name="org.jboss.ejb3.JndiRegistrar.Session.SFSBJndiRegistrar"
- class="org.jboss.ejb3.proxy.jndiregistrar.JndiStatefulSessionRegistrar">
+ class="org.jboss.ejb3.proxy.impl.jndiregistrar.JndiStatefulSessionRegistrar">
<constructor>
<parameter>
- org.jboss.ejb3.proxy.objectfactory.session.stateful.StatefulSessionProxyObjectFactory
+ org.jboss.ejb3.proxy.impl.objectfactory.session.stateful.StatefulSessionProxyObjectFactory
</parameter>
</constructor>
<depends>NameServer</depends>
Copied: projects/ejb3/trunk/proxy/src/test/resources/org/jboss/ejb3/test/proxy/impl/remoteaccess/unit (from rev 85752, projects/ejb3/trunk/proxy/src/test/resources/org/jboss/ejb3/test/proxy/remoteaccess/unit)
Property changes on: projects/ejb3/trunk/proxy/src/test/resources/org/jboss/ejb3/test/proxy/impl/remoteaccess/unit
___________________________________________________________________
Name: svn:mergeinfo
+
Modified: projects/ejb3/trunk/proxy/src/test/resources/org/jboss/ejb3/test/proxy/impl/remoteaccess/unit/RemoteAccessTestCase-jboss-beans.xml
===================================================================
--- projects/ejb3/trunk/proxy/src/test/resources/org/jboss/ejb3/test/proxy/remoteaccess/unit/RemoteAccessTestCase-jboss-beans.xml 2009-03-12 00:10:16 UTC (rev 85752)
+++ projects/ejb3/trunk/proxy/src/test/resources/org/jboss/ejb3/test/proxy/impl/remoteaccess/unit/RemoteAccessTestCase-jboss-beans.xml 2009-03-12 05:14:38 UTC (rev 85763)
@@ -37,10 +37,10 @@
<!-- SLSB JNDI Registrar -->
<bean name="org.jboss.ejb3.JndiRegistrar.Session.SLSBJndiRegistrar"
- class="org.jboss.ejb3.proxy.jndiregistrar.JndiStatelessSessionRegistrar">
+ class="org.jboss.ejb3.proxy.impl.jndiregistrar.JndiStatelessSessionRegistrar">
<constructor>
<parameter>
- org.jboss.ejb3.proxy.objectfactory.session.stateless.StatelessSessionProxyObjectFactory
+ org.jboss.ejb3.proxy.impl.objectfactory.session.stateless.StatelessSessionProxyObjectFactory
</parameter>
</constructor>
<depends>NameServer</depends>
@@ -48,10 +48,10 @@
<!-- SFSB JNDI Registrar -->
<bean name="org.jboss.ejb3.JndiRegistrar.Session.SFSBJndiRegistrar"
- class="org.jboss.ejb3.proxy.jndiregistrar.JndiStatefulSessionRegistrar">
+ class="org.jboss.ejb3.proxy.impl.jndiregistrar.JndiStatefulSessionRegistrar">
<constructor>
<parameter>
- org.jboss.ejb3.proxy.objectfactory.session.stateful.StatefulSessionProxyObjectFactory
+ org.jboss.ejb3.proxy.impl.objectfactory.session.stateful.StatefulSessionProxyObjectFactory
</parameter>
</constructor>
<depends>NameServer</depends>
Copied: projects/ejb3/trunk/proxy/src/test/resources/org/jboss/ejb3/test/proxy/impl/session/unit (from rev 85752, projects/ejb3/trunk/proxy/src/test/resources/org/jboss/ejb3/test/proxy/session/unit)
Property changes on: projects/ejb3/trunk/proxy/src/test/resources/org/jboss/ejb3/test/proxy/impl/session/unit
___________________________________________________________________
Name: svn:mergeinfo
+
Modified: projects/ejb3/trunk/proxy/src/test/resources/org/jboss/ejb3/test/proxy/impl/session/unit/ProxyStatefulSessionTestCase-jboss-beans.xml
===================================================================
--- projects/ejb3/trunk/proxy/src/test/resources/org/jboss/ejb3/test/proxy/session/unit/ProxyStatefulSessionTestCase-jboss-beans.xml 2009-03-12 00:10:16 UTC (rev 85752)
+++ projects/ejb3/trunk/proxy/src/test/resources/org/jboss/ejb3/test/proxy/impl/session/unit/ProxyStatefulSessionTestCase-jboss-beans.xml 2009-03-12 05:14:38 UTC (rev 85763)
@@ -28,10 +28,10 @@
<!-- SFSB JNDI Registrar -->
<bean name="org.jboss.ejb3.JndiRegistrar.Session.SFSBJndiRegistrar"
- class="org.jboss.ejb3.proxy.jndiregistrar.JndiStatefulSessionRegistrar">
+ class="org.jboss.ejb3.proxy.impl.jndiregistrar.JndiStatefulSessionRegistrar">
<constructor>
<parameter>
- org.jboss.ejb3.proxy.objectfactory.session.stateful.StatefulSessionProxyObjectFactory
+ org.jboss.ejb3.proxy.impl.objectfactory.session.stateful.StatefulSessionProxyObjectFactory
</parameter>
</constructor>
<depends>NameServer</depends>
Modified: projects/ejb3/trunk/proxy/src/test/resources/org/jboss/ejb3/test/proxy/impl/session/unit/ProxyStatelessSessionTestCase-jboss-beans.xml
===================================================================
--- projects/ejb3/trunk/proxy/src/test/resources/org/jboss/ejb3/test/proxy/session/unit/ProxyStatelessSessionTestCase-jboss-beans.xml 2009-03-12 00:10:16 UTC (rev 85752)
+++ projects/ejb3/trunk/proxy/src/test/resources/org/jboss/ejb3/test/proxy/impl/session/unit/ProxyStatelessSessionTestCase-jboss-beans.xml 2009-03-12 05:14:38 UTC (rev 85763)
@@ -28,10 +28,10 @@
<!-- SLSB JNDI Registrar -->
<bean name="org.jboss.ejb3.JndiRegistrar.Session.SLSBJndiRegistrar"
- class="org.jboss.ejb3.proxy.jndiregistrar.JndiStatelessSessionRegistrar">
+ class="org.jboss.ejb3.proxy.impl.jndiregistrar.JndiStatelessSessionRegistrar">
<constructor>
<parameter>
- org.jboss.ejb3.proxy.objectfactory.session.stateless.StatelessSessionProxyObjectFactory
+ org.jboss.ejb3.proxy.impl.objectfactory.session.stateless.StatelessSessionProxyObjectFactory
</parameter>
</constructor>
<depends>NameServer</depends>
Copied: projects/ejb3/trunk/proxy/src/test/resources/org/jboss/ejb3/test/proxy/impl/spec_3_4_5/unit (from rev 85752, projects/ejb3/trunk/proxy/src/test/resources/org/jboss/ejb3/test/proxy/spec_3_4_5/unit)
Property changes on: projects/ejb3/trunk/proxy/src/test/resources/org/jboss/ejb3/test/proxy/impl/spec_3_4_5/unit
___________________________________________________________________
Name: svn:mergeinfo
+
Modified: projects/ejb3/trunk/proxy-clustered/pom.xml
===================================================================
--- projects/ejb3/trunk/proxy-clustered/pom.xml 2009-03-12 05:07:26 UTC (rev 85762)
+++ projects/ejb3/trunk/proxy-clustered/pom.xml 2009-03-12 05:14:38 UTC (rev 85763)
@@ -4,7 +4,7 @@
<parent>
<groupId>org.jboss.ejb3</groupId>
<artifactId>jboss-ejb3-build</artifactId>
- <version>1.0.0</version>
+ <version>1.0.3-SNAPSHOT</version>
</parent>
<!-- Model Version -->
@@ -89,11 +89,17 @@
<!-- We pull in most things via the proxy component we are extending -->
<dependency>
<groupId>org.jboss.ejb3</groupId>
- <artifactId>jboss-ejb3-proxy</artifactId>
- <version>1.0.0</version>
+ <artifactId>jboss-ejb3-proxy-impl</artifactId>
+ <version>1.0.1-SNAPSHOT</version>
</dependency>
<dependency>
+ <groupId>org.jboss.ejb3</groupId>
+ <artifactId>jboss-ejb3-proxy-spi</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ </dependency>
+
+ <dependency>
<groupId>org.jboss.cluster</groupId>
<artifactId>jboss-ha-client</artifactId>
<version>1.1.0.CR4</version>
Modified: projects/ejb3/trunk/proxy-clustered/src/main/java/org/jboss/ejb3/proxy/clustered/factory/session/stateful/StatefulSessionClusteredProxyFactory.java
===================================================================
--- projects/ejb3/trunk/proxy-clustered/src/main/java/org/jboss/ejb3/proxy/clustered/factory/session/stateful/StatefulSessionClusteredProxyFactory.java 2009-03-12 05:07:26 UTC (rev 85762)
+++ projects/ejb3/trunk/proxy-clustered/src/main/java/org/jboss/ejb3/proxy/clustered/factory/session/stateful/StatefulSessionClusteredProxyFactory.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -28,8 +28,8 @@
import org.jboss.ejb3.proxy.clustered.handler.session.stateful.StatefulClusteredProxyInvocationHandler;
import org.jboss.ejb3.proxy.clustered.registry.ProxyClusteringInfo;
import org.jboss.ejb3.proxy.clustered.registry.ProxyClusteringRegistry;
-import org.jboss.ejb3.proxy.factory.session.stateful.StatefulSessionRemoteProxyFactory;
-import org.jboss.ejb3.proxy.handler.session.SessionProxyInvocationHandler;
+import org.jboss.ejb3.proxy.impl.factory.session.stateful.StatefulSessionRemoteProxyFactory;
+import org.jboss.ejb3.proxy.impl.handler.session.SessionProxyInvocationHandler;
import org.jboss.ha.client.loadbalance.LoadBalancePolicy;
import org.jboss.logging.Logger;
import org.jboss.metadata.ejb.jboss.JBossSessionBeanMetaData;
Modified: projects/ejb3/trunk/proxy-clustered/src/main/java/org/jboss/ejb3/proxy/clustered/factory/session/stateless/StatelessSessionClusteredProxyFactory.java
===================================================================
--- projects/ejb3/trunk/proxy-clustered/src/main/java/org/jboss/ejb3/proxy/clustered/factory/session/stateless/StatelessSessionClusteredProxyFactory.java 2009-03-12 05:07:26 UTC (rev 85762)
+++ projects/ejb3/trunk/proxy-clustered/src/main/java/org/jboss/ejb3/proxy/clustered/factory/session/stateless/StatelessSessionClusteredProxyFactory.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -27,8 +27,8 @@
import org.jboss.ejb3.proxy.clustered.handler.session.stateless.StatelessClusteredProxyInvocationHandler;
import org.jboss.ejb3.proxy.clustered.registry.ProxyClusteringInfo;
import org.jboss.ejb3.proxy.clustered.registry.ProxyClusteringRegistry;
-import org.jboss.ejb3.proxy.factory.session.stateless.StatelessSessionRemoteProxyFactory;
-import org.jboss.ejb3.proxy.handler.session.SessionProxyInvocationHandler;
+import org.jboss.ejb3.proxy.impl.factory.session.stateless.StatelessSessionRemoteProxyFactory;
+import org.jboss.ejb3.proxy.impl.handler.session.SessionProxyInvocationHandler;
import org.jboss.ha.client.loadbalance.LoadBalancePolicy;
import org.jboss.logging.Logger;
import org.jboss.metadata.ejb.jboss.JBossSessionBeanMetaData;
Modified: projects/ejb3/trunk/proxy-clustered/src/main/java/org/jboss/ejb3/proxy/clustered/handler/session/stateful/StatefulClusteredProxyInvocationHandler.java
===================================================================
--- projects/ejb3/trunk/proxy-clustered/src/main/java/org/jboss/ejb3/proxy/clustered/handler/session/stateful/StatefulClusteredProxyInvocationHandler.java 2009-03-12 05:07:26 UTC (rev 85762)
+++ projects/ejb3/trunk/proxy-clustered/src/main/java/org/jboss/ejb3/proxy/clustered/handler/session/stateful/StatefulClusteredProxyInvocationHandler.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -22,6 +22,7 @@
package org.jboss.ejb3.proxy.clustered.handler.session.stateful;
+import java.io.Serializable;
import java.lang.reflect.Proxy;
import java.net.MalformedURLException;
@@ -29,8 +30,8 @@
import org.jboss.aspects.remoting.FamilyWrapper;
import org.jboss.aspects.remoting.PojiProxy;
import org.jboss.ejb3.proxy.clustered.invocation.InvokableContextClusteredProxyInvocationHandler;
-import org.jboss.ejb3.proxy.container.InvokableContext;
-import org.jboss.ejb3.proxy.handler.session.stateful.StatefulRemoteProxyInvocationHandler;
+import org.jboss.ejb3.proxy.impl.handler.session.SessionRemoteProxyInvocationHandler;
+import org.jboss.ejb3.proxy.spi.container.InvokableContext;
import org.jboss.ha.client.loadbalance.LoadBalancePolicy;
import org.jboss.remoting.InvokerLocator;
@@ -40,7 +41,7 @@
* @author Brian Stansberry
*
*/
-public class StatefulClusteredProxyInvocationHandler extends StatefulRemoteProxyInvocationHandler
+public class StatefulClusteredProxyInvocationHandler extends SessionRemoteProxyInvocationHandler
{
// --------------------------------------------------------------------------------||
@@ -117,9 +118,9 @@
// Create a POJI Proxy to the Container
String containerName = this.getContainerName();
assert containerName != null && containerName.trim().length() > 0 : "Container Name must be set";
- PojiProxy handler = new InvokableContextClusteredProxyInvocationHandler(this.getContainerName(),
- this.getContainerGuid(), locator, interceptors, this.getSessionId(),
- this.getFamilyWrapper(), this.getLoadBalancePolicy(), this.getPartitionName(), true);
+ PojiProxy handler = new InvokableContextClusteredProxyInvocationHandler(this.getContainerName(), this
+ .getContainerGuid(), locator, interceptors, (Serializable) this.getTarget(), this.getFamilyWrapper(), this
+ .getLoadBalancePolicy(), this.getPartitionName(), true);
Class<?>[] interfaces = new Class<?>[]
{InvokableContext.class};
InvokableContext container = (InvokableContext) Proxy.newProxyInstance(InvokableContext.class.getClassLoader(),
Modified: projects/ejb3/trunk/proxy-clustered/src/main/java/org/jboss/ejb3/proxy/clustered/handler/session/stateless/StatelessClusteredProxyInvocationHandler.java
===================================================================
--- projects/ejb3/trunk/proxy-clustered/src/main/java/org/jboss/ejb3/proxy/clustered/handler/session/stateless/StatelessClusteredProxyInvocationHandler.java 2009-03-12 05:07:26 UTC (rev 85762)
+++ projects/ejb3/trunk/proxy-clustered/src/main/java/org/jboss/ejb3/proxy/clustered/handler/session/stateless/StatelessClusteredProxyInvocationHandler.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -28,8 +28,8 @@
import org.jboss.aspects.remoting.FamilyWrapper;
import org.jboss.aspects.remoting.PojiProxy;
import org.jboss.ejb3.proxy.clustered.invocation.InvokableContextClusteredProxyInvocationHandler;
-import org.jboss.ejb3.proxy.container.InvokableContext;
-import org.jboss.ejb3.proxy.handler.session.stateless.StatelessRemoteProxyInvocationHandler;
+import org.jboss.ejb3.proxy.impl.handler.session.SessionRemoteProxyInvocationHandler;
+import org.jboss.ejb3.proxy.spi.container.InvokableContext;
import org.jboss.ha.client.loadbalance.LoadBalancePolicy;
import org.jboss.remoting.InvokerLocator;
@@ -39,7 +39,7 @@
* @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
* @version $Revision: $
*/
-public class StatelessClusteredProxyInvocationHandler extends StatelessRemoteProxyInvocationHandler
+public class StatelessClusteredProxyInvocationHandler extends SessionRemoteProxyInvocationHandler
{
// --------------------------------------------------------------------------------||
// Class Members ------------------------------------------------------------------||
Modified: projects/ejb3/trunk/proxy-clustered/src/main/java/org/jboss/ejb3/proxy/clustered/invocation/InvokableContextClusteredProxyInvocationHandler.java
===================================================================
--- projects/ejb3/trunk/proxy-clustered/src/main/java/org/jboss/ejb3/proxy/clustered/invocation/InvokableContextClusteredProxyInvocationHandler.java 2009-03-12 05:07:26 UTC (rev 85762)
+++ projects/ejb3/trunk/proxy-clustered/src/main/java/org/jboss/ejb3/proxy/clustered/invocation/InvokableContextClusteredProxyInvocationHandler.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -30,7 +30,7 @@
import org.jboss.aop.util.PayloadKey;
import org.jboss.aspects.remoting.ClusterConstants;
import org.jboss.aspects.remoting.FamilyWrapper;
-import org.jboss.ejb3.proxy.invocation.InvokableContextStatefulRemoteProxyInvocationHack;
+import org.jboss.ejb3.proxy.impl.invocation.InvokableContextStatefulRemoteProxyInvocationHack;
import org.jboss.ha.client.loadbalance.LoadBalancePolicy;
import org.jboss.remoting.InvokerLocator;
Modified: projects/ejb3/trunk/proxy-clustered/src/main/java/org/jboss/ejb3/proxy/clustered/jndiregistrar/JndiClusteredSessionRegistrarBase.java
===================================================================
--- projects/ejb3/trunk/proxy-clustered/src/main/java/org/jboss/ejb3/proxy/clustered/jndiregistrar/JndiClusteredSessionRegistrarBase.java 2009-03-12 05:07:26 UTC (rev 85762)
+++ projects/ejb3/trunk/proxy-clustered/src/main/java/org/jboss/ejb3/proxy/clustered/jndiregistrar/JndiClusteredSessionRegistrarBase.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -38,10 +38,10 @@
import org.jboss.ejb3.proxy.clustered.registry.ProxyClusteringInfo;
import org.jboss.ejb3.proxy.clustered.registry.ProxyClusteringRegistry;
import org.jboss.ejb3.proxy.clustered.registry.ProxyClusteringRegistryListener;
-import org.jboss.ejb3.proxy.jndiregistrar.JndiReferenceBinding;
-import org.jboss.ejb3.proxy.jndiregistrar.JndiReferenceBindingSet;
-import org.jboss.ejb3.proxy.jndiregistrar.JndiSessionRegistrarBase;
-import org.jboss.ejb3.proxy.objectfactory.ProxyFactoryReferenceAddressTypes;
+import org.jboss.ejb3.proxy.impl.jndiregistrar.JndiReferenceBinding;
+import org.jboss.ejb3.proxy.impl.jndiregistrar.JndiReferenceBindingSet;
+import org.jboss.ejb3.proxy.impl.jndiregistrar.JndiSessionRegistrarBase;
+import org.jboss.ejb3.proxy.impl.objectfactory.ProxyFactoryReferenceAddressTypes;
import org.jboss.ha.framework.interfaces.FamilyClusterInfo;
import org.jboss.logging.Logger;
import org.jboss.metadata.ejb.jboss.ClusterConfigMetaData;
Modified: projects/ejb3/trunk/proxy-clustered/src/main/java/org/jboss/ejb3/proxy/clustered/jndiregistrar/JndiClusteredStatefulSessionRegistrar.java
===================================================================
--- projects/ejb3/trunk/proxy-clustered/src/main/java/org/jboss/ejb3/proxy/clustered/jndiregistrar/JndiClusteredStatefulSessionRegistrar.java 2009-03-12 05:07:26 UTC (rev 85762)
+++ projects/ejb3/trunk/proxy-clustered/src/main/java/org/jboss/ejb3/proxy/clustered/jndiregistrar/JndiClusteredStatefulSessionRegistrar.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -25,8 +25,8 @@
import org.jboss.aop.Dispatcher;
import org.jboss.ejb3.proxy.clustered.factory.session.stateful.StatefulSessionClusteredProxyFactory;
import org.jboss.ejb3.proxy.clustered.registry.ProxyClusteringRegistry;
-import org.jboss.ejb3.proxy.factory.session.SessionProxyFactory;
-import org.jboss.ejb3.proxy.factory.session.stateful.StatefulSessionLocalProxyFactory;
+import org.jboss.ejb3.proxy.impl.factory.session.SessionProxyFactory;
+import org.jboss.ejb3.proxy.impl.factory.session.stateful.StatefulSessionLocalProxyFactory;
import org.jboss.logging.Logger;
import org.jboss.metadata.ejb.jboss.JBossSessionBeanMetaData;
Modified: projects/ejb3/trunk/proxy-clustered/src/main/java/org/jboss/ejb3/proxy/clustered/jndiregistrar/JndiClusteredStatelessSessionRegistrar.java
===================================================================
--- projects/ejb3/trunk/proxy-clustered/src/main/java/org/jboss/ejb3/proxy/clustered/jndiregistrar/JndiClusteredStatelessSessionRegistrar.java 2009-03-12 05:07:26 UTC (rev 85762)
+++ projects/ejb3/trunk/proxy-clustered/src/main/java/org/jboss/ejb3/proxy/clustered/jndiregistrar/JndiClusteredStatelessSessionRegistrar.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -25,8 +25,8 @@
import org.jboss.aop.Dispatcher;
import org.jboss.ejb3.proxy.clustered.factory.session.stateless.StatelessSessionClusteredProxyFactory;
import org.jboss.ejb3.proxy.clustered.registry.ProxyClusteringRegistry;
-import org.jboss.ejb3.proxy.factory.session.SessionProxyFactory;
-import org.jboss.ejb3.proxy.factory.session.stateless.StatelessSessionLocalProxyFactory;
+import org.jboss.ejb3.proxy.impl.factory.session.SessionProxyFactory;
+import org.jboss.ejb3.proxy.impl.factory.session.stateless.StatelessSessionLocalProxyFactory;
import org.jboss.logging.Logger;
import org.jboss.metadata.ejb.jboss.JBossSessionBeanMetaData;
Modified: projects/ejb3/trunk/proxy-clustered/src/main/java/org/jboss/ejb3/proxy/clustered/objectfactory/session/SessionClusteredProxyObjectFactory.java
===================================================================
--- projects/ejb3/trunk/proxy-clustered/src/main/java/org/jboss/ejb3/proxy/clustered/objectfactory/session/SessionClusteredProxyObjectFactory.java 2009-03-12 05:07:26 UTC (rev 85762)
+++ projects/ejb3/trunk/proxy-clustered/src/main/java/org/jboss/ejb3/proxy/clustered/objectfactory/session/SessionClusteredProxyObjectFactory.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -36,10 +36,10 @@
import org.jboss.aspects.remoting.FamilyWrapper;
import org.jboss.aspects.remoting.InvokeRemoteInterceptor;
import org.jboss.ejb3.proxy.clustered.objectfactory.ClusteredProxyFactoryReferenceAddressTypes;
-import org.jboss.ejb3.proxy.factory.ProxyFactory;
-import org.jboss.ejb3.proxy.objectfactory.ProxyFactoryReferenceAddressTypes;
-import org.jboss.ejb3.proxy.objectfactory.session.SessionProxyObjectFactory;
-import org.jboss.ejb3.proxy.remoting.IsLocalProxyFactoryInterceptor;
+import org.jboss.ejb3.proxy.impl.factory.ProxyFactory;
+import org.jboss.ejb3.proxy.impl.objectfactory.ProxyFactoryReferenceAddressTypes;
+import org.jboss.ejb3.proxy.impl.objectfactory.session.SessionProxyObjectFactory;
+import org.jboss.ejb3.proxy.impl.remoting.IsLocalProxyFactoryInterceptor;
import org.jboss.ha.client.loadbalance.LoadBalancePolicy;
import org.jboss.logging.Logger;
import org.jboss.remoting.InvokerLocator;
Modified: projects/ejb3/trunk/proxy-clustered/src/main/java/org/jboss/ejb3/proxy/clustered/objectfactory/session/stateful/StatefulSessionClusteredProxyObjectFactory.java
===================================================================
--- projects/ejb3/trunk/proxy-clustered/src/main/java/org/jboss/ejb3/proxy/clustered/objectfactory/session/stateful/StatefulSessionClusteredProxyObjectFactory.java 2009-03-12 05:07:26 UTC (rev 85762)
+++ projects/ejb3/trunk/proxy-clustered/src/main/java/org/jboss/ejb3/proxy/clustered/objectfactory/session/stateful/StatefulSessionClusteredProxyObjectFactory.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -27,8 +27,7 @@
import javax.naming.Name;
import org.jboss.ejb3.proxy.clustered.objectfactory.session.SessionClusteredProxyObjectFactory;
-import org.jboss.ejb3.proxy.factory.ProxyFactory;
-import org.jboss.ejb3.proxy.objectfactory.session.stateful.StatefulSessionProxyObjectFactory;
+import org.jboss.ejb3.proxy.impl.factory.ProxyFactory;
/**
Modified: projects/ejb3/trunk/proxy-clustered/src/main/java/org/jboss/ejb3/proxy/clustered/objectstore/ClusteredObjectStoreBindings.java
===================================================================
--- projects/ejb3/trunk/proxy-clustered/src/main/java/org/jboss/ejb3/proxy/clustered/objectstore/ClusteredObjectStoreBindings.java 2009-03-12 05:07:26 UTC (rev 85762)
+++ projects/ejb3/trunk/proxy-clustered/src/main/java/org/jboss/ejb3/proxy/clustered/objectstore/ClusteredObjectStoreBindings.java 2009-03-12 05:14:38 UTC (rev 85763)
@@ -21,7 +21,7 @@
*/
package org.jboss.ejb3.proxy.clustered.objectstore;
-import org.jboss.ejb3.proxy.objectstore.ObjectStoreBindings;
+import org.jboss.ejb3.proxy.impl.objectstore.ObjectStoreBindings;
/**
* Defines constants used in binding POJOs to the Object Store.
Added: projects/ejb3/trunk/proxy-spi/jboss-ejb3-proxy-spi-client.xml
===================================================================
--- projects/ejb3/trunk/proxy-spi/jboss-ejb3-proxy-spi-client.xml (rev 0)
+++ projects/ejb3/trunk/proxy-spi/jboss-ejb3-proxy-spi-client.xml 2009-03-12 05:14:38 UTC (rev 85763)
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ vi:ts=2:sw=2:expandtab:
+-->
+<assembly xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/assembly-1.0.0.xsd"
+>
+ <id>client</id>
+ <formats>
+ <format>jar</format>
+ </formats>
+ <includeBaseDirectory>false</includeBaseDirectory>
+ <fileSets>
+ <fileSet>
+ <directory>target/classes</directory>
+ <outputDirectory></outputDirectory>
+
+ <!--
+
+ Most of the classes in the Proxy Component are
+ required on the Client CP, so we'll stick with
+ exclude patterns to hide internals
+
+ -->
+
+ <excludes>
+ <exclude>org/jboss/ejb3/proxy/spi/container/**</exclude>
+ </excludes>
+
+ </fileSet>
+
+ </fileSets>
+</assembly>
Modified: projects/ejb3/trunk/proxy-spi/pom.xml
===================================================================
--- projects/ejb3/trunk/proxy-spi/pom.xml 2009-03-12 05:07:26 UTC (rev 85762)
+++ projects/ejb3/trunk/proxy-spi/pom.xml 2009-03-12 05:14:38 UTC (rev 85763)
@@ -27,7 +27,32 @@
<!-- Build Configuration -->
<build>
+ <plugins>
+
+ <!-- Assembly Plugin (Proxy SPI Client) -->
+ <plugin>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <version>2.2-beta-1</version>
+ <executions>
+ <execution>
+ <id>make-assembly</id>
+ <phase>package</phase>
+ <goals>
+ <goal>attached</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <descriptors>
+ <descriptor>jboss-ejb3-proxy-spi-client.xml</descriptor>
+ </descriptors>
+ <attach>true</attach>
+ </configuration>
+ <inherited>false</inherited>
+ </plugin>
+ </plugins>
+
</build>
<properties>
More information about the jboss-cvs-commits
mailing list