[jboss-cvs] JBossAS SVN: r61219 - in trunk/ejb3: docs/tutorial/ejb21_client_adaptors/src/org/jboss/tutorial/ejb21_client_adaptors/client and 21 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Wed Mar 7 23:10:03 EST 2007
Author: bdecoste
Date: 2007-03-07 23:10:02 -0500 (Wed, 07 Mar 2007)
New Revision: 61219
Added:
trunk/ejb3/src/main/org/jboss/annotation/ejb/LocalHomeBinding.java
trunk/ejb3/src/main/org/jboss/annotation/ejb/LocalHomeBindingImpl.java
trunk/ejb3/src/main/org/jboss/annotation/ejb/RemoteHomeBinding.java
trunk/ejb3/src/main/org/jboss/annotation/ejb/RemoteHomeBindingImpl.java
trunk/ejb3/src/resources/test/homeinterface/
trunk/ejb3/src/resources/test/homeinterface/META-INF/
trunk/ejb3/src/resources/test/homeinterface/META-INF/jboss.xml
trunk/ejb3/src/test/org/jboss/ejb3/test/homeinterface/
trunk/ejb3/src/test/org/jboss/ejb3/test/homeinterface/DefaultStatefulBean.java
trunk/ejb3/src/test/org/jboss/ejb3/test/homeinterface/DefaultStatelessBean.java
trunk/ejb3/src/test/org/jboss/ejb3/test/homeinterface/DescriptorStatefulBean.java
trunk/ejb3/src/test/org/jboss/ejb3/test/homeinterface/DescriptorStatelessBean.java
trunk/ejb3/src/test/org/jboss/ejb3/test/homeinterface/ExplicitStatefulBean.java
trunk/ejb3/src/test/org/jboss/ejb3/test/homeinterface/ExplicitStatelessBean.java
trunk/ejb3/src/test/org/jboss/ejb3/test/homeinterface/Home.java
trunk/ejb3/src/test/org/jboss/ejb3/test/homeinterface/LocalHome.java
trunk/ejb3/src/test/org/jboss/ejb3/test/homeinterface/LocalInterface.java
trunk/ejb3/src/test/org/jboss/ejb3/test/homeinterface/RemoteInterface.java
trunk/ejb3/src/test/org/jboss/ejb3/test/homeinterface/Test.java
trunk/ejb3/src/test/org/jboss/ejb3/test/homeinterface/TestBean.java
trunk/ejb3/src/test/org/jboss/ejb3/test/homeinterface/unit/
trunk/ejb3/src/test/org/jboss/ejb3/test/homeinterface/unit/HomeTestCase.java
Modified:
trunk/ejb3/build-test.xml
trunk/ejb3/docs/tutorial/ejb21_client_adaptors/src/org/jboss/tutorial/ejb21_client_adaptors/client/Client.java
trunk/ejb3/src/main/org/jboss/ejb3/Ejb3DescriptorHandler.java
trunk/ejb3/src/main/org/jboss/ejb3/ProxyFactoryHelper.java
trunk/ejb3/src/main/org/jboss/ejb3/iiop/IORFactory.java
trunk/ejb3/src/main/org/jboss/ejb3/metamodel/EnterpriseBean.java
trunk/ejb3/src/main/org/jboss/ejb3/metamodel/EnterpriseBeans.java
trunk/ejb3/src/main/org/jboss/ejb3/session/BaseSessionProxyFactory.java
trunk/ejb3/src/main/org/jboss/ejb3/stateful/StatefulContainer.java
trunk/ejb3/src/main/org/jboss/ejb3/stateful/StatefulLocalProxyFactory.java
trunk/ejb3/src/main/org/jboss/ejb3/stateful/StatefulRemoteProxyFactory.java
trunk/ejb3/src/main/org/jboss/ejb3/stateless/StatelessContainer.java
trunk/ejb3/src/main/org/jboss/ejb3/stateless/StatelessLocalProxyFactory.java
trunk/ejb3/src/main/org/jboss/ejb3/stateless/StatelessRemoteProxyFactory.java
trunk/ejb3/src/resources/schema/jboss_5_0.xsd
trunk/ejb3/src/test/org/jboss/ejb3/test/iiop/unit/IiopRemoteUnitTestCase.java
trunk/ejb3/src/test/org/jboss/ejb3/test/reference21_30/GlobalSession30Bean.java
trunk/ejb3/src/test/org/jboss/ejb3/test/reference21_30/HomedStatefulSession30Bean.java
trunk/ejb3/src/test/org/jboss/ejb3/test/reference21_30/Session21Bean.java
trunk/ejb3/src/test/org/jboss/ejb3/test/reference21_30/Session30Bean.java
trunk/ejb3/src/test/org/jboss/ejb3/test/reference21_30/StatefulSession30Bean.java
trunk/ejb3/src/test/org/jboss/ejb3/test/reference21_30/Test3Bean.java
trunk/ejb3/src/test/org/jboss/ejb3/test/reference21_30/unit/EarTestCase.java
trunk/ejb3/src/test/org/jboss/ejb3/test/reference21_30/unit/GlobalReferenceTestCase.java
trunk/ejb3/src/test/org/jboss/ejb3/test/reference21_30/unit/MultiDeployTestCase.java
trunk/ejb3/src/test/org/jboss/ejb3/test/reference21_30/unit/ReferenceTestCase.java
trunk/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree653/unit/PoolingSLBSTestCase.java
trunk/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree670/unit/PreDestroyCallsTestCase.java
trunk/ejb3/src/test/org/jboss/ejb3/test/servlet/servlets/EJBServlet.java
trunk/ejb3/src/test/org/jboss/ejb3/test/stateful/unit/RemoteUnitTestCase.java
Log:
[JBCTS-540] merge from 4.2 of [EJBTHREE-824] - new home interface annotations, descriptor elements, defaults
Modified: trunk/ejb3/build-test.xml
===================================================================
--- trunk/ejb3/build-test.xml 2007-03-08 01:47:18 UTC (rev 61218)
+++ trunk/ejb3/build-test.xml 2007-03-08 04:10:02 UTC (rev 61219)
@@ -2653,7 +2653,52 @@
</classes>
</war>
</target>
+
+ <target name="homeinterface"
+ description="Builds all jar files."
+ depends="compile-classes">
+ <mkdir dir="${build.lib}"/>
+
+ <jar jarfile="${build.lib}/homeinterface-test.jar">
+ <fileset dir="${build.classes}">
+ <include name="org/jboss/ejb3/test/homeinterface/*.class"/>
+ </fileset>
+ <fileset dir="${resources}/test/homeinterface">
+ <include name="META-INF/jboss.xml"/>
+ </fileset>
+ </jar>
+ </target>
+
+ <target name="libdeployment"
+ description="Builds all jar files."
+ depends="compile-classes">
+
+ <mkdir dir="${build.lib}"/>
+
+ <jar jarfile="${build.lib}/libdeployment-test.jar">
+ <fileset dir="${build.classes}">
+ <include name="org/jboss/ejb3/test/libdeployment/*.class"/>
+ </fileset>
+ <fileset dir="${resources}/test/libdeployment">
+ <include name="META-INF/*.xml"/>
+ </fileset>
+ </jar>
+
+ <jar jarfile="${build.lib}/libdeployment.jar">
+ <fileset dir="${build.classes}">
+ <include name="org/jboss/ejb3/test/libdeployment/Stateful*.class"/>
+ </fileset>
+ </jar>
+
+ <copy todir="${resources}/test-configs/libdeployment/lib">
+ <fileset dir="${build.lib}">
+ <include name="libdeployment.jar"/>
+ </fileset>
+ </copy>
+ </target>
+
+
<target name="stateless"
description="Builds all jar files."
depends="compile-classes">
@@ -3039,7 +3084,7 @@
</jar>
</target>
- <target name="jars" depends="timestampentity, arjuna, mdbtransactions, unauthenticatedprincipal, clusteredservice, invoker, classloader,
+ <target name="jars" depends="libdeployment, homeinterface, timestampentity, arjuna, mdbtransactions, unauthenticatedprincipal, clusteredservice, invoker, classloader,
circulardependency, jsp, timerdependency, servicedependency, servlet, stateless14, webservices, ear, ejbthree440,
ejbthree454, ejbthree653, ejbthree670, ejbthree712, ejbthree751, aspectdomain, ejbcontext, schema, mail, scopedclassloader, dependency,
securitydomain, enventry,
@@ -3768,6 +3813,12 @@
<param name="test" value="stateless"/>
</antcall>
<antcall target="test" inheritRefs="true">
+ <param name="test" value="homeinterface"/>
+ </antcall>
+ <antcall target="test" inheritRefs="true">
+ <param name="test" value="deployer"/>
+ </antcall>
+ <antcall target="test" inheritRefs="true">
<param name="test" value="container"/>
</antcall>
<antcall target="test" inheritRefs="true">
Modified: trunk/ejb3/docs/tutorial/ejb21_client_adaptors/src/org/jboss/tutorial/ejb21_client_adaptors/client/Client.java
===================================================================
--- trunk/ejb3/docs/tutorial/ejb21_client_adaptors/src/org/jboss/tutorial/ejb21_client_adaptors/client/Client.java 2007-03-08 01:47:18 UTC (rev 61218)
+++ trunk/ejb3/docs/tutorial/ejb21_client_adaptors/src/org/jboss/tutorial/ejb21_client_adaptors/client/Client.java 2007-03-08 04:10:02 UTC (rev 61219)
@@ -38,7 +38,7 @@
public static void accessHomes() throws Exception
{
InitialContext jndiContext = new InitialContext();
- Session1RemoteHome home = (Session1RemoteHome)jndiContext.lookup("Session1RemoteHome");
+ Session1RemoteHome home = (Session1RemoteHome)jndiContext.lookup("Session1/home");
Session1Remote session1 = home.create();
String initValue1 = session1.getInitValue();
System.out.println("Session1 init value is " + initValue1);
@@ -50,7 +50,7 @@
public static void accessDeploymentDescriptorHomes() throws Exception
{
InitialContext jndiContext = new InitialContext();
- Session1RemoteHome home = (Session1RemoteHome)jndiContext.lookup("DeploymentDescriptorSession1RemoteHome");
+ Session1RemoteHome home = (Session1RemoteHome)jndiContext.lookup("DeploymentDescriptorSession1/home");
Session1Remote session1 = home.create();
String initValue1 = session1.getInitValue();
System.out.println("DeploymentDescriptor Session1 init value is " + initValue1);
Added: trunk/ejb3/src/main/org/jboss/annotation/ejb/LocalHomeBinding.java
===================================================================
--- trunk/ejb3/src/main/org/jboss/annotation/ejb/LocalHomeBinding.java (rev 0)
+++ trunk/ejb3/src/main/org/jboss/annotation/ejb/LocalHomeBinding.java 2007-03-08 04:10:02 UTC (rev 61219)
@@ -0,0 +1,38 @@
+/*
+ * 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.annotation.ejb;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Annotation for specifying the local home jndi binding for an EJB local interface
+ *
+ * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
+ */
+ at Target(ElementType.TYPE) @Retention(RetentionPolicy.RUNTIME)
+public @interface LocalHomeBinding
+{
+ String jndiBinding();
+}
Added: trunk/ejb3/src/main/org/jboss/annotation/ejb/LocalHomeBindingImpl.java
===================================================================
--- trunk/ejb3/src/main/org/jboss/annotation/ejb/LocalHomeBindingImpl.java (rev 0)
+++ trunk/ejb3/src/main/org/jboss/annotation/ejb/LocalHomeBindingImpl.java 2007-03-08 04:10:02 UTC (rev 61219)
@@ -0,0 +1,49 @@
+/*
+ * 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.annotation.ejb;
+
+import java.lang.annotation.Annotation;
+
+/**
+ * Comment
+ *
+ * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
+ */
+public class LocalHomeBindingImpl implements LocalHomeBinding
+{
+ private String jndi;
+
+ public LocalHomeBindingImpl(String jndi)
+ {
+ this.jndi = jndi;
+ }
+
+ public String jndiBinding()
+ {
+ return jndi;
+ }
+
+ public Class<? extends Annotation> annotationType()
+ {
+ return null;
+ }
+}
Added: trunk/ejb3/src/main/org/jboss/annotation/ejb/RemoteHomeBinding.java
===================================================================
--- trunk/ejb3/src/main/org/jboss/annotation/ejb/RemoteHomeBinding.java (rev 0)
+++ trunk/ejb3/src/main/org/jboss/annotation/ejb/RemoteHomeBinding.java 2007-03-08 04:10:02 UTC (rev 61219)
@@ -0,0 +1,39 @@
+/*
+ * 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.annotation.ejb;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Annotation for specifying the remote home jndi binding for a bean
+ *
+ * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
+ */
+ at Target({ElementType.TYPE, ElementType.ANNOTATION_TYPE})
+ at Retention(RetentionPolicy.RUNTIME)
+public @interface RemoteHomeBinding
+{
+ String jndiBinding() default "";
+}
Added: trunk/ejb3/src/main/org/jboss/annotation/ejb/RemoteHomeBindingImpl.java
===================================================================
--- trunk/ejb3/src/main/org/jboss/annotation/ejb/RemoteHomeBindingImpl.java (rev 0)
+++ trunk/ejb3/src/main/org/jboss/annotation/ejb/RemoteHomeBindingImpl.java 2007-03-08 04:10:02 UTC (rev 61219)
@@ -0,0 +1,74 @@
+/*
+ * 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.annotation.ejb;
+
+import java.lang.annotation.Annotation;
+import java.util.ArrayList;
+
+import javax.ejb.ActivationConfigProperty;
+import javax.ejb.MessageDriven;
+
+import org.jboss.annotation.ejb.RemoteBinding;
+
+/**
+ * Comment
+ *
+ * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
+ */
+public class RemoteHomeBindingImpl implements RemoteHomeBinding
+{
+ private String jndi;
+
+ public RemoteHomeBindingImpl()
+ {
+ jndi = "";
+ }
+
+ public RemoteHomeBindingImpl(String jndi)
+ {
+ this.jndi = jndi;
+ }
+
+ public void setJndiBinding(String jndi)
+ {
+ this.jndi = jndi;
+ }
+
+ public String jndiBinding()
+ {
+ return jndi;
+ }
+
+ public Class<? extends Annotation> annotationType()
+ {
+ return null;
+ }
+
+ public String toString()
+ {
+ StringBuffer sb = new StringBuffer(100);
+ sb.append("[RemoteHomeBindingImpl:");
+ sb.append(", jndi=" + jndi);
+ sb.append(']');
+ return sb.toString();
+ }
+}
Modified: trunk/ejb3/src/main/org/jboss/ejb3/Ejb3DescriptorHandler.java
===================================================================
--- trunk/ejb3/src/main/org/jboss/ejb3/Ejb3DescriptorHandler.java 2007-03-08 01:47:18 UTC (rev 61218)
+++ trunk/ejb3/src/main/org/jboss/ejb3/Ejb3DescriptorHandler.java 2007-03-08 04:10:02 UTC (rev 61219)
@@ -41,6 +41,8 @@
import org.jboss.annotation.ejb.ExcludeDefaultInterceptorsImpl;
import org.jboss.annotation.ejb.LocalBinding;
import org.jboss.annotation.ejb.LocalBindingImpl;
+import org.jboss.annotation.ejb.LocalHomeBinding;
+import org.jboss.annotation.ejb.LocalHomeBindingImpl;
import org.jboss.annotation.ejb.LocalHomeImpl;
import org.jboss.annotation.ejb.Management;
import org.jboss.annotation.ejb.ManagementImpl;
@@ -53,6 +55,8 @@
import org.jboss.annotation.ejb.RemoteBindingImpl;
import org.jboss.annotation.ejb.RemoteBindings;
import org.jboss.annotation.ejb.RemoteBindingsImpl;
+import org.jboss.annotation.ejb.RemoteHomeBinding;
+import org.jboss.annotation.ejb.RemoteHomeBindingImpl;
import org.jboss.annotation.ejb.RemoteHomeImpl;
import org.jboss.annotation.ejb.ResourceAdapter;
import org.jboss.annotation.ejb.ResourceAdapterImpl;
@@ -1423,11 +1427,25 @@
LocalBindingImpl localBinding = new LocalBindingImpl(localJndiName);
addClassAnnotation(container, LocalBinding.class, localBinding);
}
+
+ String localHomeJndiName = enterpriseBean.getLocalHomeJndiName();
+ if (localHomeJndiName != null)
+ {
+ LocalHomeBindingImpl localHomeBinding = new LocalHomeBindingImpl(localHomeJndiName);
+ addClassAnnotation(container, LocalHomeBinding.class, localHomeBinding);
+ }
}
private void addRemoteJndiAnnotations(EJBContainer container,
EnterpriseBean enterpriseBean) throws ClassNotFoundException
{
+ String homeJndiName = enterpriseBean.getHomeJndiName();
+ if (homeJndiName != null)
+ {
+ RemoteHomeBindingImpl homeBinding = new RemoteHomeBindingImpl(homeJndiName);
+ addClassAnnotation(container, RemoteHomeBinding.class, homeBinding);
+ }
+
List<org.jboss.ejb3.metamodel.RemoteBinding> bindingsList = enterpriseBean.getRemoteBindings();
if (bindingsList.size() == 0)
{
Modified: trunk/ejb3/src/main/org/jboss/ejb3/ProxyFactoryHelper.java
===================================================================
--- trunk/ejb3/src/main/org/jboss/ejb3/ProxyFactoryHelper.java 2007-03-08 01:47:18 UTC (rev 61218)
+++ trunk/ejb3/src/main/org/jboss/ejb3/ProxyFactoryHelper.java 2007-03-08 04:10:02 UTC (rev 61219)
@@ -21,6 +21,8 @@
*/
package org.jboss.ejb3;
+import org.jboss.annotation.ejb.LocalHomeBinding;
+import org.jboss.annotation.ejb.RemoteHomeBinding;
import org.jboss.annotation.ejb.LocalBinding;
import org.jboss.annotation.ejb.RemoteBinding;
import org.jboss.annotation.ejb.RemoteBindings;
@@ -246,6 +248,26 @@
return false;
}
+
+ public static String getHomeJndiName(Container container)
+ {
+ Advisor advisor = (Advisor) container;
+ RemoteHomeBinding binding = (RemoteHomeBinding)advisor.resolveAnnotation(RemoteHomeBinding.class);
+ if (binding != null)
+ return binding.jndiBinding();
+
+ return container.getEjbName() + "/home";
+ }
+
+ public static String getLocalHomeJndiName(Container container)
+ {
+ Advisor advisor = (Advisor) container;
+ LocalHomeBinding binding = (LocalHomeBinding)advisor.resolveAnnotation(LocalHomeBinding.class);
+ if (binding != null)
+ return binding.jndiBinding();
+
+ return container.getEjbName() + "/localHome";
+ }
public static String getJndiName(Container container, Class businessInterface)
{
@@ -276,7 +298,7 @@
{
if (businessInterface.getName().equals(remoteHome.getName()))
{
- return getRemoteJndiName(container) + "Home";
+ return getHomeJndiName(container);
}
}
Class[] locals = getLocalInterfaces(container);
@@ -295,7 +317,7 @@
{
if (businessInterface.getName().equals(localHome.getName()))
{
- return getLocalJndiName(container) + "Home";
+ return getLocalHomeJndiName(container);
}
}
Modified: trunk/ejb3/src/main/org/jboss/ejb3/iiop/IORFactory.java
===================================================================
--- trunk/ejb3/src/main/org/jboss/ejb3/iiop/IORFactory.java 2007-03-08 01:47:18 UTC (rev 61218)
+++ trunk/ejb3/src/main/org/jboss/ejb3/iiop/IORFactory.java 2007-03-08 04:10:02 UTC (rev 61219)
@@ -369,7 +369,7 @@
Object homeObject = createHomeProxy();
- rebind(ctx, getJndiName() + "Home", (org.omg.CORBA.Object) homeObject);
+ rebind(ctx, ProxyFactoryHelper.getHomeJndiName(container), (org.omg.CORBA.Object) homeObject);
}
// bind HandleDelegate stuff
@@ -382,7 +382,7 @@
{
if(homeReferenceFactory != null)
{
- unbind(getJndiName() + "Home");
+ unbind(ProxyFactoryHelper.getHomeJndiName(container));
unbindHomeServant();
}
unbind(getJndiName());
Modified: trunk/ejb3/src/main/org/jboss/ejb3/metamodel/EnterpriseBean.java
===================================================================
--- trunk/ejb3/src/main/org/jboss/ejb3/metamodel/EnterpriseBean.java 2007-03-08 01:47:18 UTC (rev 61218)
+++ trunk/ejb3/src/main/org/jboss/ejb3/metamodel/EnterpriseBean.java 2007-03-08 04:10:02 UTC (rev 61219)
@@ -72,8 +72,10 @@
// jboss.xml
private String jndiName;
+ private String homeJndiName;
private String localJndiName;
+ private String localHomeJndiName;
private String securityDomain;
@@ -228,6 +230,16 @@
{
this.jndiName = jndiName;
}
+
+ public String getHomeJndiName()
+ {
+ return homeJndiName;
+ }
+
+ public void setHomeJndiName(String homeJndiName)
+ {
+ this.homeJndiName = homeJndiName;
+ }
public String getLocalJndiName()
{
@@ -238,7 +250,17 @@
{
this.localJndiName = localJndiName;
}
+
+ public String getLocalHomeJndiName()
+ {
+ return localHomeJndiName;
+ }
+ public void setLocalHomeJndiName(String localHomeJndiName)
+ {
+ this.localHomeJndiName = localHomeJndiName;
+ }
+
public TransactionManagementType getTransactionManagementType()
{
return tmType;
Modified: trunk/ejb3/src/main/org/jboss/ejb3/metamodel/EnterpriseBeans.java
===================================================================
--- trunk/ejb3/src/main/org/jboss/ejb3/metamodel/EnterpriseBeans.java 2007-03-08 01:47:18 UTC (rev 61218)
+++ trunk/ejb3/src/main/org/jboss/ejb3/metamodel/EnterpriseBeans.java 2007-03-08 04:10:02 UTC (rev 61219)
@@ -213,6 +213,11 @@
{
currentEjb.setJndiName(jndiName);
}
+
+ public void setHomeJndiName(String homeJndiName)
+ {
+ currentEjb.setHomeJndiName(homeJndiName);
+ }
public void setSecurityDomain(String securityDomain)
{
@@ -223,6 +228,11 @@
{
currentEjb.setLocalJndiName(jndiName);
}
+
+ public void setLocalHomeJndiName(String homeJndiName)
+ {
+ currentEjb.setLocalHomeJndiName(homeJndiName);
+ }
public EnterpriseBean createEjbByEjbName(String ejbName, Class ejbClass)
{
Modified: trunk/ejb3/src/main/org/jboss/ejb3/session/BaseSessionProxyFactory.java
===================================================================
--- trunk/ejb3/src/main/org/jboss/ejb3/session/BaseSessionProxyFactory.java 2007-03-08 01:47:18 UTC (rev 61218)
+++ trunk/ejb3/src/main/org/jboss/ejb3/session/BaseSessionProxyFactory.java 2007-03-08 04:10:02 UTC (rev 61219)
@@ -31,6 +31,7 @@
import org.jboss.ejb3.Container;
import org.jboss.ejb3.EJBContainer;
import org.jboss.ejb3.ProxyFactory;
+import org.jboss.ejb3.ProxyFactoryHelper;
import org.jboss.logging.Logger;
import org.jboss.util.StringPropertyReplacer;
import org.jboss.ejb3.proxy.EJBMetaDataImpl;
@@ -77,7 +78,7 @@
RemoteBinding remoteBindingAnnotation = (RemoteBinding)ejbContainer.resolveAnnotation(RemoteBinding.class);
if (remoteBindingAnnotation != null)
- homeHandle = new HomeHandleImpl(remoteBindingAnnotation.jndiBinding() + "Home");
+ homeHandle = new HomeHandleImpl(ProxyFactoryHelper.getHomeJndiName(container));
return homeHandle;
}
Modified: trunk/ejb3/src/main/org/jboss/ejb3/stateful/StatefulContainer.java
===================================================================
--- trunk/ejb3/src/main/org/jboss/ejb3/stateful/StatefulContainer.java 2007-03-08 01:47:18 UTC (rev 61218)
+++ trunk/ejb3/src/main/org/jboss/ejb3/stateful/StatefulContainer.java 2007-03-08 04:10:02 UTC (rev 61219)
@@ -757,8 +757,7 @@
RemoteBinding remoteBindingAnnotation = (RemoteBinding) resolveAnnotation(RemoteBinding.class);
if (remoteBindingAnnotation != null)
- homeHandle = new HomeHandleImpl(remoteBindingAnnotation
- .jndiBinding() + "Home");
+ homeHandle = new HomeHandleImpl(ProxyFactoryHelper.getHomeJndiName(this));
EJBHome ejbHome = homeHandle.getEJBHome();
Modified: trunk/ejb3/src/main/org/jboss/ejb3/stateful/StatefulLocalProxyFactory.java
===================================================================
--- trunk/ejb3/src/main/org/jboss/ejb3/stateful/StatefulLocalProxyFactory.java 2007-03-08 01:47:18 UTC (rev 61218)
+++ trunk/ejb3/src/main/org/jboss/ejb3/stateful/StatefulLocalProxyFactory.java 2007-03-08 04:10:02 UTC (rev 61219)
@@ -77,7 +77,7 @@
Class[] interfaces = {localHome.value()};
Object homeProxy = java.lang.reflect.Proxy.newProxyInstance(container.getBeanClass().getClassLoader(),
interfaces, new StatefulLocalHomeProxy(container));
- NonSerializableFactory.rebind(container.getInitialContext(), jndiName + "Home", homeProxy);
+ NonSerializableFactory.rebind(container.getInitialContext(), ProxyFactoryHelper.getLocalHomeJndiName(container), homeProxy);
}
}
@@ -88,7 +88,7 @@
LocalHome localHome = (LocalHome) ((EJBContainer) container).resolveAnnotation(LocalHome.class);
if (localHome != null)
{
- NonSerializableFactory.unbind(container.getInitialContext(), jndiName + "Home");
+ NonSerializableFactory.unbind(container.getInitialContext(), ProxyFactoryHelper.getLocalHomeJndiName(container));
}
}
Modified: trunk/ejb3/src/main/org/jboss/ejb3/stateful/StatefulRemoteProxyFactory.java
===================================================================
--- trunk/ejb3/src/main/org/jboss/ejb3/stateful/StatefulRemoteProxyFactory.java 2007-03-08 01:47:18 UTC (rev 61218)
+++ trunk/ejb3/src/main/org/jboss/ejb3/stateful/StatefulRemoteProxyFactory.java 2007-03-08 04:10:02 UTC (rev 61219)
@@ -105,7 +105,7 @@
if (remoteHome != null)
{
Object homeProxy = createHomeProxy(remoteHome.value());
- Util.rebind(container.getInitialContext(), jndiName + "Home", homeProxy);
+ Util.rebind(container.getInitialContext(), ProxyFactoryHelper.getHomeJndiName(container), homeProxy);
}
}
@@ -118,7 +118,7 @@
RemoteHome remoteHome = (RemoteHome) statefulContainer.resolveAnnotation(RemoteHome.class);
if (remoteHome != null)
{
- Util.unbind(container.getInitialContext(), jndiName + "Home");
+ Util.unbind(container.getInitialContext(), ProxyFactoryHelper.getHomeJndiName(container));
}
}
Modified: trunk/ejb3/src/main/org/jboss/ejb3/stateless/StatelessContainer.java
===================================================================
--- trunk/ejb3/src/main/org/jboss/ejb3/stateless/StatelessContainer.java 2007-03-08 01:47:18 UTC (rev 61218)
+++ trunk/ejb3/src/main/org/jboss/ejb3/stateless/StatelessContainer.java 2007-03-08 04:10:02 UTC (rev 61219)
@@ -328,7 +328,7 @@
RemoteBinding remoteBindingAnnotation = (RemoteBinding) resolveAnnotation(RemoteBinding.class);
if (remoteBindingAnnotation != null)
- homeHandle = new HomeHandleImpl(remoteBindingAnnotation.jndiBinding() + "Home");
+ homeHandle = new HomeHandleImpl(ProxyFactoryHelper.getHomeJndiName(this));
return homeHandle.getEJBHome();
}
Modified: trunk/ejb3/src/main/org/jboss/ejb3/stateless/StatelessLocalProxyFactory.java
===================================================================
--- trunk/ejb3/src/main/org/jboss/ejb3/stateless/StatelessLocalProxyFactory.java 2007-03-08 01:47:18 UTC (rev 61218)
+++ trunk/ejb3/src/main/org/jboss/ejb3/stateless/StatelessLocalProxyFactory.java 2007-03-08 04:10:02 UTC (rev 61219)
@@ -69,7 +69,7 @@
Class[] interfaces = {localHome.value()};
Object homeProxy = java.lang.reflect.Proxy.newProxyInstance(container.getBeanClass().getClassLoader(),
interfaces, new StatelessLocalProxy(container));
- NonSerializableFactory.rebind(container.getInitialContext(), jndiName + "Home", homeProxy);
+ NonSerializableFactory.rebind(container.getInitialContext(), ProxyFactoryHelper.getLocalHomeJndiName(container), homeProxy);
}
}
@@ -81,7 +81,7 @@
LocalHome localHome = (LocalHome) statelessContainer.resolveAnnotation(LocalHome.class);
if (localHome != null)
{
- NonSerializableFactory.unbind(container.getInitialContext(), jndiName + "Home");
+ NonSerializableFactory.unbind(container.getInitialContext(), ProxyFactoryHelper.getLocalHomeJndiName(container));
}
}
Modified: trunk/ejb3/src/main/org/jboss/ejb3/stateless/StatelessRemoteProxyFactory.java
===================================================================
--- trunk/ejb3/src/main/org/jboss/ejb3/stateless/StatelessRemoteProxyFactory.java 2007-03-08 01:47:18 UTC (rev 61218)
+++ trunk/ejb3/src/main/org/jboss/ejb3/stateless/StatelessRemoteProxyFactory.java 2007-03-08 04:10:02 UTC (rev 61219)
@@ -90,11 +90,11 @@
Object homeProxy = createHomeProxy(remoteHome.value());
try
{
- Util.rebind(container.getInitialContext(), jndiName + "Home", homeProxy);
+ Util.rebind(container.getInitialContext(), ProxyFactoryHelper.getHomeJndiName(container), homeProxy);
}
catch (NamingException e)
{
- NamingException namingException = new NamingException("Could not bind stateless home proxy with ejb name " + container.getEjbName() + " into JNDI under jndiName: " + container.getInitialContext().getNameInNamespace() + "/" + jndiName + "Home");
+ NamingException namingException = new NamingException("Could not bind stateless home proxy with ejb name " + container.getEjbName() + " into JNDI under jndiName: " + container.getInitialContext().getNameInNamespace() + "/" + ProxyFactoryHelper.getHomeJndiName(container));
namingException.setRootCause(e);
throw namingException;
}
@@ -109,7 +109,7 @@
RemoteHome remoteHome = (RemoteHome) statelessContainer.resolveAnnotation(RemoteHome.class);
if (remoteHome != null)
{
- Util.unbind(container.getInitialContext(), jndiName + "Home");
+ Util.unbind(container.getInitialContext(), ProxyFactoryHelper.getHomeJndiName(container));
}
}
Modified: trunk/ejb3/src/resources/schema/jboss_5_0.xsd
===================================================================
(Binary files differ)
Added: trunk/ejb3/src/resources/test/homeinterface/META-INF/jboss.xml
===================================================================
--- trunk/ejb3/src/resources/test/homeinterface/META-INF/jboss.xml (rev 0)
+++ trunk/ejb3/src/resources/test/homeinterface/META-INF/jboss.xml 2007-03-08 04:10:02 UTC (rev 61219)
@@ -0,0 +1,21 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<jboss
+ xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+ http://www.jboss.org/j2ee/schema/jboss_5_0.xsd"
+ version="3.0">
+ <enterprise-beans>
+ <session>
+ <ejb-name>DescriptorStatelessBean</ejb-name>
+ <home-jndi-name>DescriptorStatelessHome</home-jndi-name>
+ <local-home-jndi-name>DescriptorStatelessLocalHome</local-home-jndi-name>
+ </session>
+ <session>
+ <ejb-name>DescriptorStatefulBean</ejb-name>
+ <home-jndi-name>DescriptorStatefulHome</home-jndi-name>
+ <local-home-jndi-name>DescriptorStatefulLocalHome</local-home-jndi-name>
+ </session>
+ </enterprise-beans>
+</jboss>
+
Added: trunk/ejb3/src/test/org/jboss/ejb3/test/homeinterface/DefaultStatefulBean.java
===================================================================
--- trunk/ejb3/src/test/org/jboss/ejb3/test/homeinterface/DefaultStatefulBean.java (rev 0)
+++ trunk/ejb3/src/test/org/jboss/ejb3/test/homeinterface/DefaultStatefulBean.java 2007-03-08 04:10:02 UTC (rev 61219)
@@ -0,0 +1,51 @@
+/*
+ * 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.test.homeinterface;
+
+import javax.ejb.Local;
+import javax.ejb.LocalHome;
+import javax.ejb.Remote;
+import javax.ejb.RemoteHome;
+import javax.ejb.Stateful;
+
+import org.jboss.logging.Logger;
+
+/**
+ * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
+ */
+ at Stateful
+ at Remote(RemoteInterface.class)
+ at RemoteHome(Home.class)
+ at Local(LocalInterface.class)
+ at LocalHome(org.jboss.ejb3.test.homeinterface.LocalHome.class)
+public class DefaultStatefulBean implements RemoteInterface, LocalInterface
+{
+ private static final Logger log = Logger.getLogger(DefaultStatefulBean.class);
+
+ public void test()
+ {
+ }
+
+ public void testLocal()
+ {
+ }
+}
Added: trunk/ejb3/src/test/org/jboss/ejb3/test/homeinterface/DefaultStatelessBean.java
===================================================================
--- trunk/ejb3/src/test/org/jboss/ejb3/test/homeinterface/DefaultStatelessBean.java (rev 0)
+++ trunk/ejb3/src/test/org/jboss/ejb3/test/homeinterface/DefaultStatelessBean.java 2007-03-08 04:10:02 UTC (rev 61219)
@@ -0,0 +1,51 @@
+/*
+ * 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.test.homeinterface;
+
+import javax.ejb.Local;
+import javax.ejb.LocalHome;
+import javax.ejb.Remote;
+import javax.ejb.RemoteHome;
+import javax.ejb.Stateless;
+
+import org.jboss.logging.Logger;
+
+/**
+ * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
+ */
+ at Stateless
+ at Remote(RemoteInterface.class)
+ at RemoteHome(Home.class)
+ at Local(LocalInterface.class)
+ at LocalHome(org.jboss.ejb3.test.homeinterface.LocalHome.class)
+public class DefaultStatelessBean implements RemoteInterface, LocalInterface
+{
+ private static final Logger log = Logger.getLogger(DefaultStatelessBean.class);
+
+ public void test()
+ {
+ }
+
+ public void testLocal()
+ {
+ }
+}
Added: trunk/ejb3/src/test/org/jboss/ejb3/test/homeinterface/DescriptorStatefulBean.java
===================================================================
--- trunk/ejb3/src/test/org/jboss/ejb3/test/homeinterface/DescriptorStatefulBean.java (rev 0)
+++ trunk/ejb3/src/test/org/jboss/ejb3/test/homeinterface/DescriptorStatefulBean.java 2007-03-08 04:10:02 UTC (rev 61219)
@@ -0,0 +1,51 @@
+/*
+ * 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.test.homeinterface;
+
+import javax.ejb.Local;
+import javax.ejb.LocalHome;
+import javax.ejb.Remote;
+import javax.ejb.RemoteHome;
+import javax.ejb.Stateful;
+
+import org.jboss.logging.Logger;
+
+/**
+ * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
+ */
+ at Stateful
+ at Remote(RemoteInterface.class)
+ at RemoteHome(Home.class)
+ at Local(LocalInterface.class)
+ at LocalHome(org.jboss.ejb3.test.homeinterface.LocalHome.class)
+public class DescriptorStatefulBean implements RemoteInterface, LocalInterface
+{
+ private static final Logger log = Logger.getLogger(DescriptorStatefulBean.class);
+
+ public void test()
+ {
+ }
+
+ public void testLocal()
+ {
+ }
+}
Added: trunk/ejb3/src/test/org/jboss/ejb3/test/homeinterface/DescriptorStatelessBean.java
===================================================================
--- trunk/ejb3/src/test/org/jboss/ejb3/test/homeinterface/DescriptorStatelessBean.java (rev 0)
+++ trunk/ejb3/src/test/org/jboss/ejb3/test/homeinterface/DescriptorStatelessBean.java 2007-03-08 04:10:02 UTC (rev 61219)
@@ -0,0 +1,51 @@
+/*
+ * 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.test.homeinterface;
+
+import javax.ejb.Local;
+import javax.ejb.LocalHome;
+import javax.ejb.Remote;
+import javax.ejb.RemoteHome;
+import javax.ejb.Stateless;
+
+import org.jboss.logging.Logger;
+
+/**
+ * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
+ */
+ at Stateless
+ at Remote(RemoteInterface.class)
+ at RemoteHome(Home.class)
+ at Local(LocalInterface.class)
+ at LocalHome(org.jboss.ejb3.test.homeinterface.LocalHome.class)
+public class DescriptorStatelessBean implements RemoteInterface, LocalInterface
+{
+ private static final Logger log = Logger.getLogger(DescriptorStatelessBean.class);
+
+ public void test()
+ {
+ }
+
+ public void testLocal()
+ {
+ }
+}
Added: trunk/ejb3/src/test/org/jboss/ejb3/test/homeinterface/ExplicitStatefulBean.java
===================================================================
--- trunk/ejb3/src/test/org/jboss/ejb3/test/homeinterface/ExplicitStatefulBean.java (rev 0)
+++ trunk/ejb3/src/test/org/jboss/ejb3/test/homeinterface/ExplicitStatefulBean.java 2007-03-08 04:10:02 UTC (rev 61219)
@@ -0,0 +1,60 @@
+/*
+ * 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.test.homeinterface;
+
+import javax.ejb.Local;
+import javax.ejb.LocalHome;
+import javax.ejb.Remote;
+import javax.ejb.RemoteHome;
+import javax.ejb.Stateful;
+
+import org.jboss.annotation.ejb.LocalHomeBinding;
+import org.jboss.annotation.ejb.RemoteHomeBinding;
+import org.jboss.annotation.ejb.LocalBinding;
+import org.jboss.annotation.ejb.RemoteBinding;
+
+import org.jboss.logging.Logger;
+
+/**
+ * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
+ */
+ at Stateful
+ at Remote(RemoteInterface.class)
+ at RemoteBinding(jndiBinding="ExplicitStatefulRemote")
+ at RemoteHomeBinding(jndiBinding="ExplicitStatefulHome")
+ at RemoteHome(Home.class)
+ at Local(LocalInterface.class)
+ at LocalBinding(jndiBinding="ExplicitStatefulLocal")
+ at LocalHomeBinding(jndiBinding="ExplicitStatefulLocalHome")
+ at LocalHome(org.jboss.ejb3.test.homeinterface.LocalHome.class)
+public class ExplicitStatefulBean implements RemoteInterface, LocalInterface
+{
+ private static final Logger log = Logger.getLogger(ExplicitStatefulBean.class);
+
+ public void test()
+ {
+ }
+
+ public void testLocal()
+ {
+ }
+}
Added: trunk/ejb3/src/test/org/jboss/ejb3/test/homeinterface/ExplicitStatelessBean.java
===================================================================
--- trunk/ejb3/src/test/org/jboss/ejb3/test/homeinterface/ExplicitStatelessBean.java (rev 0)
+++ trunk/ejb3/src/test/org/jboss/ejb3/test/homeinterface/ExplicitStatelessBean.java 2007-03-08 04:10:02 UTC (rev 61219)
@@ -0,0 +1,60 @@
+/*
+ * 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.test.homeinterface;
+
+import javax.ejb.Local;
+import javax.ejb.LocalHome;
+import javax.ejb.Remote;
+import javax.ejb.RemoteHome;
+import javax.ejb.Stateless;
+
+import org.jboss.annotation.ejb.LocalHomeBinding;
+import org.jboss.annotation.ejb.RemoteHomeBinding;
+import org.jboss.annotation.ejb.LocalBinding;
+import org.jboss.annotation.ejb.RemoteBinding;
+
+import org.jboss.logging.Logger;
+
+/**
+ * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
+ */
+ at Stateless
+ at Remote(RemoteInterface.class)
+ at RemoteBinding(jndiBinding="ExplicitStatelessRemote")
+ at RemoteHomeBinding(jndiBinding="ExplicitStatelessHome")
+ at RemoteHome(Home.class)
+ at Local(LocalInterface.class)
+ at LocalBinding(jndiBinding="ExplicitStatelessLocal")
+ at LocalHomeBinding(jndiBinding="ExplicitStatelessLocalHome")
+ at LocalHome(org.jboss.ejb3.test.homeinterface.LocalHome.class)
+public class ExplicitStatelessBean implements RemoteInterface, LocalInterface
+{
+ private static final Logger log = Logger.getLogger(ExplicitStatelessBean.class);
+
+ public void test()
+ {
+ }
+
+ public void testLocal()
+ {
+ }
+}
Added: trunk/ejb3/src/test/org/jboss/ejb3/test/homeinterface/Home.java
===================================================================
--- trunk/ejb3/src/test/org/jboss/ejb3/test/homeinterface/Home.java (rev 0)
+++ trunk/ejb3/src/test/org/jboss/ejb3/test/homeinterface/Home.java 2007-03-08 04:10:02 UTC (rev 61219)
@@ -0,0 +1,33 @@
+/*
+ * 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.test.homeinterface;
+
+import javax.ejb.*;
+
+/**
+ * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
+ */
+public interface Home extends EJBHome {
+
+ public RemoteInterface create() throws java.rmi.RemoteException, javax.ejb.CreateException;
+}
+
Added: trunk/ejb3/src/test/org/jboss/ejb3/test/homeinterface/LocalHome.java
===================================================================
--- trunk/ejb3/src/test/org/jboss/ejb3/test/homeinterface/LocalHome.java (rev 0)
+++ trunk/ejb3/src/test/org/jboss/ejb3/test/homeinterface/LocalHome.java 2007-03-08 04:10:02 UTC (rev 61219)
@@ -0,0 +1,33 @@
+/*
+ * 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.test.homeinterface;
+
+import javax.ejb.*;
+
+/**
+ * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
+ */
+public interface LocalHome extends EJBHome {
+
+ public LocalInterface create() throws java.rmi.RemoteException, javax.ejb.CreateException;
+}
+
Added: trunk/ejb3/src/test/org/jboss/ejb3/test/homeinterface/LocalInterface.java
===================================================================
--- trunk/ejb3/src/test/org/jboss/ejb3/test/homeinterface/LocalInterface.java (rev 0)
+++ trunk/ejb3/src/test/org/jboss/ejb3/test/homeinterface/LocalInterface.java 2007-03-08 04:10:02 UTC (rev 61219)
@@ -0,0 +1,30 @@
+/*
+ * 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.test.homeinterface;
+
+/**
+ * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
+ */
+public interface LocalInterface
+{
+ void testLocal();
+}
Added: trunk/ejb3/src/test/org/jboss/ejb3/test/homeinterface/RemoteInterface.java
===================================================================
--- trunk/ejb3/src/test/org/jboss/ejb3/test/homeinterface/RemoteInterface.java (rev 0)
+++ trunk/ejb3/src/test/org/jboss/ejb3/test/homeinterface/RemoteInterface.java 2007-03-08 04:10:02 UTC (rev 61219)
@@ -0,0 +1,30 @@
+/*
+ * 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.test.homeinterface;
+
+/**
+ * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
+ */
+public interface RemoteInterface
+{
+ void test();
+}
Added: trunk/ejb3/src/test/org/jboss/ejb3/test/homeinterface/Test.java
===================================================================
--- trunk/ejb3/src/test/org/jboss/ejb3/test/homeinterface/Test.java (rev 0)
+++ trunk/ejb3/src/test/org/jboss/ejb3/test/homeinterface/Test.java 2007-03-08 04:10:02 UTC (rev 61219)
@@ -0,0 +1,40 @@
+/*
+ * 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.test.homeinterface;
+
+/**
+ * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
+ */
+public interface Test
+{
+ void testDefaultStatelessLocal() throws Exception;
+
+ void testExplicitStatelessLocal() throws Exception;
+
+ void testDescriptorStatelessLocal() throws Exception;
+
+ void testDefaultStatefulLocal() throws Exception;
+
+ void testExplicitStatefulLocal() throws Exception;
+
+ void testDescriptorStatefulLocal() throws Exception;
+}
Added: trunk/ejb3/src/test/org/jboss/ejb3/test/homeinterface/TestBean.java
===================================================================
--- trunk/ejb3/src/test/org/jboss/ejb3/test/homeinterface/TestBean.java (rev 0)
+++ trunk/ejb3/src/test/org/jboss/ejb3/test/homeinterface/TestBean.java 2007-03-08 04:10:02 UTC (rev 61219)
@@ -0,0 +1,111 @@
+/*
+ * 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.test.homeinterface;
+
+import javax.ejb.Remote;
+import javax.ejb.RemoteHome;
+import javax.ejb.Stateless;
+import javax.ejb.EJB;
+import javax.naming.InitialContext;
+import javax.ejb.EJBs;
+
+import org.jboss.annotation.ejb.RemoteBinding;
+import org.jboss.ejb3.Container;
+
+import org.jboss.logging.Logger;
+
+/**
+ * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
+ * @version <tt>$Revision: 60233 $</tt>
+ */
+ at Stateless
+ at Remote(Test.class)
+public class TestBean implements Test
+{
+ private static final Logger log = Logger.getLogger(TestBean.class);
+
+ public void testDefaultStatelessLocal() throws Exception
+ {
+ InitialContext jndiContext = new InitialContext();
+ LocalHome home = (LocalHome)jndiContext.lookup("DefaultStatelessBean/localHome");
+ LocalInterface local = home.create();
+ local.testLocal();
+
+ local = (LocalInterface)jndiContext.lookup("DefaultStatelessBean/local");
+ local.testLocal();
+ }
+
+ public void testExplicitStatelessLocal() throws Exception
+ {
+ InitialContext jndiContext = new InitialContext();
+ LocalHome home = (LocalHome)jndiContext.lookup("ExplicitStatelessLocalHome");
+ LocalInterface local = home.create();
+ local.testLocal();
+
+ local = (LocalInterface)jndiContext.lookup("ExplicitStatelessLocal");
+ local.testLocal();
+ }
+
+ public void testDescriptorStatelessLocal() throws Exception
+ {
+ InitialContext jndiContext = new InitialContext();
+ LocalHome home = (LocalHome)jndiContext.lookup("DescriptorStatelessLocalHome");
+ LocalInterface local = home.create();
+ local.testLocal();
+
+ local = (LocalInterface)jndiContext.lookup("DescriptorStatelessBean/local");
+ local.testLocal();
+ }
+
+ public void testDefaultStatefulLocal() throws Exception
+ {
+ InitialContext jndiContext = new InitialContext();
+ LocalHome home = (LocalHome)jndiContext.lookup("DefaultStatefulBean/localHome");
+ LocalInterface local = home.create();
+ local.testLocal();
+
+ local = (LocalInterface)jndiContext.lookup("DefaultStatefulBean/local");
+ local.testLocal();
+ }
+
+ public void testExplicitStatefulLocal() throws Exception
+ {
+ InitialContext jndiContext = new InitialContext();
+ LocalHome home = (LocalHome)jndiContext.lookup("ExplicitStatefulLocalHome");
+ LocalInterface local = home.create();
+ local.testLocal();
+
+ local = (LocalInterface)jndiContext.lookup("ExplicitStatefulLocal");
+ local.testLocal();
+ }
+
+ public void testDescriptorStatefulLocal() throws Exception
+ {
+ InitialContext jndiContext = new InitialContext();
+ LocalHome home = (LocalHome)jndiContext.lookup("DescriptorStatefulLocalHome");
+ LocalInterface local = home.create();
+ local.testLocal();
+
+ local = (LocalInterface)jndiContext.lookup("DescriptorStatefulBean/local");
+ local.testLocal();
+ }
+}
Added: trunk/ejb3/src/test/org/jboss/ejb3/test/homeinterface/unit/HomeTestCase.java
===================================================================
--- trunk/ejb3/src/test/org/jboss/ejb3/test/homeinterface/unit/HomeTestCase.java (rev 0)
+++ trunk/ejb3/src/test/org/jboss/ejb3/test/homeinterface/unit/HomeTestCase.java 2007-03-08 04:10:02 UTC (rev 61219)
@@ -0,0 +1,133 @@
+/*
+ * 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.test.homeinterface.unit;
+
+import javax.naming.InitialContext;
+
+import org.jboss.ejb3.test.homeinterface.*;
+
+import org.jboss.logging.Logger;
+import org.jboss.test.JBossTestCase;
+
+/**
+ * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
+ */
+public class HomeTestCase
+ extends JBossTestCase {
+
+ private static final Logger log = Logger
+ .getLogger(HomeTestCase.class);
+
+ public HomeTestCase(String name)
+ {
+ super(name);
+ }
+
+ public void testDefaultStateless() throws Exception
+ {
+ InitialContext jndiContext = new InitialContext();
+ Home home = (Home)jndiContext.lookup("DefaultStatelessBean/home");
+ RemoteInterface remote = home.create();
+ remote.test();
+
+ remote = (RemoteInterface)jndiContext.lookup("DefaultStatelessBean/remote");
+ remote.test();
+
+ Test test = (Test)jndiContext.lookup("TestBean/remote");
+ test.testDefaultStatelessLocal();
+ }
+
+ public void testExplicitStateless() throws Exception
+ {
+ InitialContext jndiContext = new InitialContext();
+ Home home = (Home)jndiContext.lookup("ExplicitStatelessHome");
+ RemoteInterface remote = home.create();
+ remote.test();
+
+ remote = (RemoteInterface)jndiContext.lookup("ExplicitStatelessRemote");
+ remote.test();
+
+ Test test = (Test)jndiContext.lookup("TestBean/remote");
+ test.testExplicitStatelessLocal();
+ }
+
+ public void testDescriptorStateless() throws Exception
+ {
+ InitialContext jndiContext = new InitialContext();
+ Home home = (Home)jndiContext.lookup("DescriptorStatelessHome");
+ RemoteInterface remote = home.create();
+ remote.test();
+
+ remote = (RemoteInterface)jndiContext.lookup("DescriptorStatelessBean/remote");
+ remote.test();
+
+ Test test = (Test)jndiContext.lookup("TestBean/remote");
+ test.testDescriptorStatelessLocal();
+ }
+
+ public void testDefaultStateful() throws Exception
+ {
+ InitialContext jndiContext = new InitialContext();
+ Home home = (Home)jndiContext.lookup("DefaultStatefulBean/home");
+ RemoteInterface remote = home.create();
+ remote.test();
+
+ remote = (RemoteInterface)jndiContext.lookup("DefaultStatefulBean/remote");
+ remote.test();
+
+ Test test = (Test)jndiContext.lookup("TestBean/remote");
+ test.testDefaultStatefulLocal();
+ }
+
+ public void testExplicitStateful() throws Exception
+ {
+ InitialContext jndiContext = new InitialContext();
+ Home home = (Home)jndiContext.lookup("ExplicitStatefulHome");
+ RemoteInterface remote = home.create();
+ remote.test();
+
+ remote = (RemoteInterface)jndiContext.lookup("ExplicitStatefulRemote");
+ remote.test();
+
+ Test test = (Test)jndiContext.lookup("TestBean/remote");
+ test.testExplicitStatefulLocal();
+ }
+
+ public void testDescriptorStateful() throws Exception
+ {
+ InitialContext jndiContext = new InitialContext();
+ Home home = (Home)jndiContext.lookup("DescriptorStatefulHome");
+ RemoteInterface remote = home.create();
+ remote.test();
+
+ remote = (RemoteInterface)jndiContext.lookup("DescriptorStatefulBean/remote");
+ remote.test();
+
+ Test test = (Test)jndiContext.lookup("TestBean/remote");
+ test.testDescriptorStatefulLocal();
+ }
+
+ public static junit.framework.Test suite() throws Exception
+ {
+ return getDeploySetup(HomeTestCase.class, "homeinterface-test.jar");
+ }
+}
Modified: trunk/ejb3/src/test/org/jboss/ejb3/test/iiop/unit/IiopRemoteUnitTestCase.java
===================================================================
--- trunk/ejb3/src/test/org/jboss/ejb3/test/iiop/unit/IiopRemoteUnitTestCase.java 2007-03-08 01:47:18 UTC (rev 61218)
+++ trunk/ejb3/src/test/org/jboss/ejb3/test/iiop/unit/IiopRemoteUnitTestCase.java 2007-03-08 04:10:02 UTC (rev 61219)
@@ -104,7 +104,7 @@
public void test2() throws Exception
{
InitialContext ctx = getInitialContext();
- Object obj = ctx.lookup("MyStatefulBean/remoteHome");
+ Object obj = ctx.lookup("MyStatefulBean/home");
MyStatefulHome home = (MyStatefulHome) PortableRemoteObject.narrow(obj, MyStatefulHome.class);
//MyStateful bean1 = (MyStateful) PortableRemoteObject.narrow(obj, MyStateful.class);
MyStateful bean1 = home.create();
@@ -117,7 +117,7 @@
public void testGetEJBHome() throws Exception
{
InitialContext ctx = getInitialContext();
- Object obj = ctx.lookup("HomedStatelessBean/remoteHome");
+ Object obj = ctx.lookup("HomedStatelessBean/home");
HomedStatelessHome home = (HomedStatelessHome) PortableRemoteObject.narrow(obj, HomedStatelessHome.class);
MySession session = home.create();
Object o = session.getEJBHome();
@@ -128,7 +128,7 @@
public void testGetHandle() throws Exception
{
InitialContext ctx = getInitialContext();
- Object obj = ctx.lookup("HomedStatelessBean/remoteHome");
+ Object obj = ctx.lookup("HomedStatelessBean/home");
HomedStatelessHome home = (HomedStatelessHome) PortableRemoteObject.narrow(obj, HomedStatelessHome.class);
MySession session = home.create();
Handle h = session.getHandle();
@@ -144,7 +144,7 @@
public void testGetHomeHandle() throws Exception
{
InitialContext ctx = getInitialContext();
- Object obj = ctx.lookup("HomedStatelessBean/remoteHome");
+ Object obj = ctx.lookup("HomedStatelessBean/home");
HomedStatelessHome home = (HomedStatelessHome) PortableRemoteObject.narrow(obj, HomedStatelessHome.class);
HomeHandle h = home.getHomeHandle();
MarshalledObject mo = new MarshalledObject(h);
@@ -157,7 +157,7 @@
public void testGetPrimaryKeyAndRemove() throws Exception
{
InitialContext ctx = getInitialContext();
- Object obj = ctx.lookup("MyStatefulBean/remoteHome");
+ Object obj = ctx.lookup("MyStatefulBean/home");
MyStatefulHome home = (MyStatefulHome) PortableRemoteObject.narrow(obj, MyStatefulHome.class);
MyStateful session = home.create();
Object primaryKey = session.getPrimaryKey();
@@ -178,7 +178,7 @@
public void testHomedStateless() throws Exception
{
InitialContext ctx = getInitialContext();
- Object obj = ctx.lookup("HomedStatelessBean/remoteHome");
+ Object obj = ctx.lookup("HomedStatelessBean/home");
HomedStatelessHome home = (HomedStatelessHome) PortableRemoteObject.narrow(obj, HomedStatelessHome.class);
MySession session = home.create();
String me = new Date().toString();
@@ -189,7 +189,7 @@
public void testIsIdentical() throws Exception
{
InitialContext ctx = getInitialContext();
- Object obj = ctx.lookup("MyStatefulBean/remoteHome");
+ Object obj = ctx.lookup("MyStatefulBean/home");
MyStatefulHome home = (MyStatefulHome) PortableRemoteObject.narrow(obj, MyStatefulHome.class);
MyStateful session = home.create();
Handle h = session.getHandle();
@@ -203,7 +203,7 @@
public void testRemoveByHandle() throws Exception
{
InitialContext ctx = getInitialContext();
- Object obj = ctx.lookup("MyStatefulBean/remoteHome");
+ Object obj = ctx.lookup("MyStatefulBean/home");
MyStatefulHome home = (MyStatefulHome) PortableRemoteObject.narrow(obj, MyStatefulHome.class);
MyStateful session = home.create();
session.setName("Me");
Modified: trunk/ejb3/src/test/org/jboss/ejb3/test/reference21_30/GlobalSession30Bean.java
===================================================================
--- trunk/ejb3/src/test/org/jboss/ejb3/test/reference21_30/GlobalSession30Bean.java 2007-03-08 01:47:18 UTC (rev 61218)
+++ trunk/ejb3/src/test/org/jboss/ejb3/test/reference21_30/GlobalSession30Bean.java 2007-03-08 04:10:02 UTC (rev 61219)
@@ -34,7 +34,7 @@
*/
@Stateless(name="GlobalSession30")
@Remote(Session30.class)
- at RemoteBinding(jndiBinding = "GlobalSession30")
+ at RemoteBinding(jndiBinding = "GlobalSession30Remote")
public class GlobalSession30Bean
{
private static final Logger log = Logger.getLogger(GlobalSession30Bean.class);
@@ -68,7 +68,7 @@
{
try {
InitialContext jndiContext = new InitialContext();
- Session21Home home = (Session21Home)jndiContext.lookup("Session21");
+ Session21Home home = (Session21Home)jndiContext.lookup("Session21Remote");
Session21 session = (Session21)home.create();
return session.access();
} catch (Exception e)
Modified: trunk/ejb3/src/test/org/jboss/ejb3/test/reference21_30/HomedStatefulSession30Bean.java
===================================================================
--- trunk/ejb3/src/test/org/jboss/ejb3/test/reference21_30/HomedStatefulSession30Bean.java 2007-03-08 01:47:18 UTC (rev 61218)
+++ trunk/ejb3/src/test/org/jboss/ejb3/test/reference21_30/HomedStatefulSession30Bean.java 2007-03-08 04:10:02 UTC (rev 61219)
@@ -42,7 +42,7 @@
@LocalHome(StatefulSession30LocalHome.class)
@Local(LocalStatefulSession30.class)
@Remote(StatefulSession30.class)
- at RemoteBinding(jndiBinding = "HomedStatefulSession30")
+ at RemoteBinding(jndiBinding = "HomedStatefulSession30Remote")
@LocalBinding(jndiBinding = "HomedLocalStatefulSession30")
public class HomedStatefulSession30Bean implements java.io.Serializable
{
Modified: trunk/ejb3/src/test/org/jboss/ejb3/test/reference21_30/Session21Bean.java
===================================================================
--- trunk/ejb3/src/test/org/jboss/ejb3/test/reference21_30/Session21Bean.java 2007-03-08 01:47:18 UTC (rev 61218)
+++ trunk/ejb3/src/test/org/jboss/ejb3/test/reference21_30/Session21Bean.java 2007-03-08 04:10:02 UTC (rev 61219)
@@ -56,7 +56,7 @@
{
try {
InitialContext jndiContext = new InitialContext();
- Session30 session = (Session30)jndiContext.lookup("GlobalSession30");
+ Session30 session = (Session30)jndiContext.lookup("GlobalSession30Remote");
return session.access();
} catch (Exception e)
{
Modified: trunk/ejb3/src/test/org/jboss/ejb3/test/reference21_30/Session30Bean.java
===================================================================
--- trunk/ejb3/src/test/org/jboss/ejb3/test/reference21_30/Session30Bean.java 2007-03-08 01:47:18 UTC (rev 61218)
+++ trunk/ejb3/src/test/org/jboss/ejb3/test/reference21_30/Session30Bean.java 2007-03-08 04:10:02 UTC (rev 61219)
@@ -40,7 +40,7 @@
@Stateless(name="Session30")
@Remote(Session30.class)
@Local(LocalSession30.class)
- at RemoteBinding(jndiBinding = "Session30")
+ at RemoteBinding(jndiBinding = "Session30Remote")
@LocalBinding(jndiBinding = "LocalSession30")
@EJBs({@EJB(name="injected", beanInterface=org.jboss.ejb3.test.reference21_30.Session21.class, beanName="Session21")})
public class Session30Bean
@@ -85,7 +85,7 @@
{
try {
InitialContext jndiContext = new InitialContext();
- StatefulSession30LocalHome localHome = (StatefulSession30LocalHome)jndiContext.lookup("LocalStatefulSession30Home");
+ StatefulSession30LocalHome localHome = (StatefulSession30LocalHome)jndiContext.lookup("StatefulSession30/localHome");
LocalStatefulSession30 localSession = localHome.create();
return localSession.getLocalValue();
} catch (Exception e)
@@ -99,7 +99,7 @@
{
try {
InitialContext jndiContext = new InitialContext();
- StatefulSession30LocalHome localHome = (StatefulSession30LocalHome)jndiContext.lookup("LocalStatefulSession30Home");
+ StatefulSession30LocalHome localHome = (StatefulSession30LocalHome)jndiContext.lookup("StatefulSession30/localHome");
LocalStatefulSession30 localSession = localHome.create(value);
return localSession.getLocalValue();
} catch (Exception e)
@@ -113,7 +113,7 @@
{
try {
InitialContext jndiContext = new InitialContext();
- StatefulSession30LocalHome localHome = (StatefulSession30LocalHome)jndiContext.lookup("LocalStatefulSession30Home");
+ StatefulSession30LocalHome localHome = (StatefulSession30LocalHome)jndiContext.lookup("StatefulSession30/localHome");
LocalStatefulSession30 localSession = localHome.create(value, suffix);
return localSession.getLocalValue();
} catch (Exception e)
Modified: trunk/ejb3/src/test/org/jboss/ejb3/test/reference21_30/StatefulSession30Bean.java
===================================================================
--- trunk/ejb3/src/test/org/jboss/ejb3/test/reference21_30/StatefulSession30Bean.java 2007-03-08 01:47:18 UTC (rev 61218)
+++ trunk/ejb3/src/test/org/jboss/ejb3/test/reference21_30/StatefulSession30Bean.java 2007-03-08 04:10:02 UTC (rev 61219)
@@ -38,7 +38,7 @@
@Stateful(name="StatefulSession30")
@Local(LocalStatefulSession30.class)
@Remote(StatefulSession30.class)
- at RemoteBinding(jndiBinding = "StatefulSession30")
+ at RemoteBinding(jndiBinding = "StatefulSession30Remote")
@LocalBinding(jndiBinding = "LocalStatefulSession30")
public class StatefulSession30Bean implements java.io.Serializable
{
@@ -70,7 +70,7 @@
{
try {
InitialContext jndiContext = new InitialContext();
- Session30LocalHome localHome = (Session30LocalHome)jndiContext.lookup("LocalSession30Home");
+ Session30LocalHome localHome = (Session30LocalHome)jndiContext.lookup("Session30/localHome");
LocalSession30 localSession = localHome.create();
return localSession.access();
} catch (Exception e)
@@ -85,7 +85,7 @@
try
{
InitialContext jndiContext = new InitialContext();
- StatefulSession30LocalHome home = (StatefulSession30LocalHome)jndiContext.lookup("HomedLocalStatefulSession30Home");
+ StatefulSession30LocalHome home = (StatefulSession30LocalHome)jndiContext.lookup("HomedStatefulSession30/localHome");
LocalStatefulSession30 session = (LocalStatefulSession30)home.create();
session.setLocalValue("LocalHome");
return session.getLocalValue();
Modified: trunk/ejb3/src/test/org/jboss/ejb3/test/reference21_30/Test3Bean.java
===================================================================
--- trunk/ejb3/src/test/org/jboss/ejb3/test/reference21_30/Test3Bean.java 2007-03-08 01:47:18 UTC (rev 61218)
+++ trunk/ejb3/src/test/org/jboss/ejb3/test/reference21_30/Test3Bean.java 2007-03-08 04:10:02 UTC (rev 61219)
@@ -39,7 +39,7 @@
*/
@Stateless(name="Test3")
@Remote(Test3.class)
- at RemoteBinding(jndiBinding="Test3")
+ at RemoteBinding(jndiBinding="Test3Remote")
@RemoteHome(Test3Home.class)
@EJBs({@EJB(name="injected/Test2", mappedName="Test2")})
public class Test3Bean
Modified: trunk/ejb3/src/test/org/jboss/ejb3/test/reference21_30/unit/EarTestCase.java
===================================================================
--- trunk/ejb3/src/test/org/jboss/ejb3/test/reference21_30/unit/EarTestCase.java 2007-03-08 01:47:18 UTC (rev 61218)
+++ trunk/ejb3/src/test/org/jboss/ejb3/test/reference21_30/unit/EarTestCase.java 2007-03-08 04:10:02 UTC (rev 61219)
@@ -53,7 +53,7 @@
{
InitialContext jndiContext = new InitialContext();
- Test3 test3 = (Test3)jndiContext.lookup("Test3");
+ Test3 test3 = (Test3)jndiContext.lookup("Test3Remote");
assertNotNull(test3);
test3.testAccess();
Modified: trunk/ejb3/src/test/org/jboss/ejb3/test/reference21_30/unit/GlobalReferenceTestCase.java
===================================================================
--- trunk/ejb3/src/test/org/jboss/ejb3/test/reference21_30/unit/GlobalReferenceTestCase.java 2007-03-08 01:47:18 UTC (rev 61218)
+++ trunk/ejb3/src/test/org/jboss/ejb3/test/reference21_30/unit/GlobalReferenceTestCase.java 2007-03-08 04:10:02 UTC (rev 61219)
@@ -55,7 +55,7 @@
{
InitialContext jndiContext = new InitialContext();
- Session21Home home = (Session21Home) jndiContext.lookup("Session21");
+ Session21Home home = (Session21Home) jndiContext.lookup("Session21Remote");
Session21 session = (Session21)home.create();
String access = session.access();
assertEquals("Session21", access);
@@ -67,7 +67,7 @@
{
InitialContext jndiContext = new InitialContext();
- Session30 session = (Session30) jndiContext.lookup("GlobalSession30");
+ Session30 session = (Session30) jndiContext.lookup("GlobalSession30Remote");
String access = session.access();
assertEquals("Session30", access);
access = session.globalAccess21();
Modified: trunk/ejb3/src/test/org/jboss/ejb3/test/reference21_30/unit/MultiDeployTestCase.java
===================================================================
--- trunk/ejb3/src/test/org/jboss/ejb3/test/reference21_30/unit/MultiDeployTestCase.java 2007-03-08 01:47:18 UTC (rev 61218)
+++ trunk/ejb3/src/test/org/jboss/ejb3/test/reference21_30/unit/MultiDeployTestCase.java 2007-03-08 04:10:02 UTC (rev 61219)
@@ -53,7 +53,7 @@
{
InitialContext jndiContext = new InitialContext();
- Test3 test3 = (Test3)jndiContext.lookup("Test3");
+ Test3 test3 = (Test3)jndiContext.lookup("Test3Remote");
assertNotNull(test3);
test3.testAccess();
Modified: trunk/ejb3/src/test/org/jboss/ejb3/test/reference21_30/unit/ReferenceTestCase.java
===================================================================
--- trunk/ejb3/src/test/org/jboss/ejb3/test/reference21_30/unit/ReferenceTestCase.java 2007-03-08 01:47:18 UTC (rev 61218)
+++ trunk/ejb3/src/test/org/jboss/ejb3/test/reference21_30/unit/ReferenceTestCase.java 2007-03-08 04:10:02 UTC (rev 61219)
@@ -58,7 +58,7 @@
{
InitialContext jndiContext = new InitialContext();
- Session21 session = (Session21)jndiContext.lookup("Session21");
+ Session21 session = (Session21)jndiContext.lookup("Session21Remote");
String access = session.access();
assertEquals("Session21", access);
access = session.access30();
@@ -69,7 +69,7 @@
{
InitialContext jndiContext = new InitialContext();
- Session30 session = (Session30) jndiContext.lookup("Session30");
+ Session30 session = (Session30) jndiContext.lookup("Session30Remote");
String access = session.access();
assertEquals("Session30", access);
access = session.access21();
@@ -80,12 +80,12 @@
{
InitialContext jndiContext = new InitialContext();
- Session30 session = (Session30) jndiContext.lookup("Session30");
+ Session30 session = (Session30) jndiContext.lookup("Session30Remote");
assertNotNull(session);
String access = session.access();
assertEquals("Session30", access);
- Session30Home home = (Session30Home) jndiContext.lookup("Session30Home");
+ Session30Home home = (Session30Home) jndiContext.lookup("Session30/home");
assertNotNull(home);
session = (Session30)home.create();
assertNotNull(session);
@@ -97,7 +97,7 @@
{
InitialContext jndiContext = new InitialContext();
- StatefulSession30Home home = (StatefulSession30Home) jndiContext.lookup("StatefulSession30Home");
+ StatefulSession30Home home = (StatefulSession30Home) jndiContext.lookup("StatefulSession30/home");
assertNotNull(home);
StatefulSession30 session = (StatefulSession30)home.create();
assertNotNull(session);
@@ -141,13 +141,13 @@
{
InitialContext jndiContext = new InitialContext();
- StatefulSession30 session = (StatefulSession30) jndiContext.lookup("StatefulSession30");
+ StatefulSession30 session = (StatefulSession30) jndiContext.lookup("StatefulSession30Remote");
assertNotNull(session);
session.setValue("testing");
String value = session.getValue();
assertEquals("testing", value);
- StatefulSession30Home home = (StatefulSession30Home) jndiContext.lookup("StatefulSession30Home");
+ StatefulSession30Home home = (StatefulSession30Home) jndiContext.lookup("StatefulSession30/home");
assertNotNull(home);
session = (StatefulSession30)home.create();
assertNotNull(session);
@@ -170,7 +170,7 @@
{
InitialContext jndiContext = new InitialContext();
- StatefulSession30Home home = (StatefulSession30Home) jndiContext.lookup("HomedStatefulSession30Home");
+ StatefulSession30Home home = (StatefulSession30Home) jndiContext.lookup("HomedStatefulSession30/home");
assertNotNull(home);
StatefulSession30 session = (StatefulSession30)home.create();
assertNotNull(session);
@@ -193,7 +193,7 @@
{
InitialContext jndiContext = new InitialContext();
- StatefulSession30 session = (StatefulSession30) jndiContext.lookup("StatefulSession30");
+ StatefulSession30 session = (StatefulSession30) jndiContext.lookup("StatefulSession30Remote");
String access = session.accessLocalHome();
assertEquals("LocalHome", access);
@@ -203,12 +203,12 @@
{
InitialContext jndiContext = new InitialContext();
- StatefulSession30 statefulSession = (StatefulSession30) jndiContext.lookup("StatefulSession30");
+ StatefulSession30 statefulSession = (StatefulSession30) jndiContext.lookup("StatefulSession30Remote");
assertNotNull(statefulSession);
String access = statefulSession.accessLocalStateless();
assertEquals("Session30", access);
- Session30 session = (Session30) jndiContext.lookup("Session30");
+ Session30 session = (Session30) jndiContext.lookup("Session30Remote");
assertNotNull(session);
access = session.accessLocalStateful();
assertEquals("default", access);
@@ -224,16 +224,16 @@
{
InitialContext jndiContext = new InitialContext();
- StatefulSession30 session1 = (StatefulSession30) jndiContext.lookup("StatefulSession30");
+ StatefulSession30 session1 = (StatefulSession30) jndiContext.lookup("StatefulSession30Remote");
assertNotNull(session1);
session1.setValue("testing");
assertEquals("testing", session1.getValue());
- StatefulSession30 session2 = (StatefulSession30) jndiContext.lookup("StatefulSession30");
+ StatefulSession30 session2 = (StatefulSession30) jndiContext.lookup("StatefulSession30Remote");
assertNotNull(session2);
assertEquals("default", session2.getValue());
- StatefulSession30Home home = (StatefulSession30Home) jndiContext.lookup("StatefulSession30Home");
+ StatefulSession30Home home = (StatefulSession30Home) jndiContext.lookup("StatefulSession30/home");
assertNotNull(home);
StatefulSession30 session3 = (StatefulSession30)home.create();
assertNotNull(session3);
@@ -257,7 +257,7 @@
assertNotNull(session7);
assertEquals("secondinit", session7.getValue());
- StatefulSession30 session8 = (StatefulSession30) jndiContext.lookup("StatefulSession30");
+ StatefulSession30 session8 = (StatefulSession30) jndiContext.lookup("StatefulSession30Remote");
assertNotNull(session8);
assertEquals("default", session8.getValue());
@@ -274,7 +274,7 @@
{
InitialContext jndiContext = new InitialContext();
- StatefulSession30Home home = (StatefulSession30Home) jndiContext.lookup("StatefulSession30Home");
+ StatefulSession30Home home = (StatefulSession30Home) jndiContext.lookup("StatefulSession30/home");
assertNotNull(home);
EJBMetaData metadata = home.getEJBMetaData();
@@ -318,7 +318,7 @@
{
InitialContext jndiContext = new InitialContext();
- Session30Home home = (Session30Home) jndiContext.lookup("Session30Home");
+ Session30Home home = (Session30Home) jndiContext.lookup("Session30/home");
assertNotNull(home);
EJBMetaData metadata = home.getEJBMetaData();
Modified: trunk/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree653/unit/PoolingSLBSTestCase.java
===================================================================
--- trunk/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree653/unit/PoolingSLBSTestCase.java 2007-03-08 01:47:18 UTC (rev 61218)
+++ trunk/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree653/unit/PoolingSLBSTestCase.java 2007-03-08 04:10:02 UTC (rev 61219)
@@ -45,7 +45,7 @@
public void test1() throws Exception
{
- MyStateful21Home home = (MyStateful21Home) getInitialContext().lookup("MyStateful21Bean/remoteHome");
+ MyStateful21Home home = (MyStateful21Home) getInitialContext().lookup("MyStateful21Bean/home");
MyStateful21 session = home.create();
for(int i = 0; i < 1000; i++)
{
Modified: trunk/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree670/unit/PreDestroyCallsTestCase.java
===================================================================
--- trunk/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree670/unit/PreDestroyCallsTestCase.java 2007-03-08 01:47:18 UTC (rev 61218)
+++ trunk/ejb3/src/test/org/jboss/ejb3/test/regression/ejbthree670/unit/PreDestroyCallsTestCase.java 2007-03-08 04:10:02 UTC (rev 61219)
@@ -62,7 +62,7 @@
public void test21() throws Exception
{
- MyStateful21Home home = (MyStateful21Home) getInitialContext().lookup("MyStateful21Bean/remoteHome");
+ MyStateful21Home home = (MyStateful21Home) getInitialContext().lookup("MyStateful21Bean/home");
MyStateful21 session = home.create();
session.setName("Test");
String actual = session.sayHello();
@@ -81,7 +81,7 @@
public void testRemoveByHandle() throws Exception
{
- MyStateful21Home home = (MyStateful21Home) getInitialContext().lookup("MyStateful21Bean/remoteHome");
+ MyStateful21Home home = (MyStateful21Home) getInitialContext().lookup("MyStateful21Bean/home");
MyStateful21 session = home.create();
session.setName("Test");
String actual = session.sayHello();
Modified: trunk/ejb3/src/test/org/jboss/ejb3/test/servlet/servlets/EJBServlet.java
===================================================================
--- trunk/ejb3/src/test/org/jboss/ejb3/test/servlet/servlets/EJBServlet.java 2007-03-08 01:47:18 UTC (rev 61218)
+++ trunk/ejb3/src/test/org/jboss/ejb3/test/servlet/servlets/EJBServlet.java 2007-03-08 04:10:02 UTC (rev 61219)
@@ -79,11 +79,11 @@
WarTestObject warObject = (WarTestObject)session.getWarTestObject();
- Session30Home home = (Session30Home)ctx.lookup("ejb/Session30Home");
+ Session30Home home = (Session30Home)ctx.lookup("Session30/home");
session = home.create();
session.access(o);
- Session30LocalHome localHome = (Session30LocalHome)ctx.lookup("ejb/Session30LocalHome");
+ Session30LocalHome localHome = (Session30LocalHome)ctx.lookup("Session30/localHome");
session = localHome.create();
session.access(o);
Modified: trunk/ejb3/src/test/org/jboss/ejb3/test/stateful/unit/RemoteUnitTestCase.java
===================================================================
--- trunk/ejb3/src/test/org/jboss/ejb3/test/stateful/unit/RemoteUnitTestCase.java 2007-03-08 01:47:18 UTC (rev 61218)
+++ trunk/ejb3/src/test/org/jboss/ejb3/test/stateful/unit/RemoteUnitTestCase.java 2007-03-08 04:10:02 UTC (rev 61219)
@@ -147,7 +147,7 @@
SecurityAssociation.setPrincipal(new SimplePrincipal("somebody"));
SecurityAssociation.setCredential("password".toCharArray());
- StatefulHome home = (StatefulHome)getInitialContext().lookup("StatefulHome");
+ StatefulHome home = (StatefulHome)getInitialContext().lookup("StatefulBean/home");
assertNotNull(home);
javax.ejb.EJBObject stateful = (javax.ejb.EJBObject)home.create();
assertNotNull(stateful);
@@ -235,7 +235,7 @@
SecurityAssociation.setPrincipal(new SimplePrincipal("somebody"));
SecurityAssociation.setCredential("password".toCharArray());
- StatefulHome home = (StatefulHome)getInitialContext().lookup("StatefulHome");
+ StatefulHome home = (StatefulHome)getInitialContext().lookup("StatefulBean/home");
assertNotNull(home);
ExtendedState state = new ExtendedState("init");
Stateful stateful = home.create(state);
More information about the jboss-cvs-commits
mailing list