[jboss-cvs] JBossAS SVN: r108402 - in trunk: server/src/main/java/org/jboss/deployment and 11 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Fri Oct 1 09:15:48 EDT 2010
Author: jaikiran
Date: 2010-10-01 09:15:47 -0400 (Fri, 01 Oct 2010)
New Revision: 108402
Added:
trunk/testsuite/src/main/org/jboss/test/ejb3/spec/
trunk/testsuite/src/main/org/jboss/test/ejb3/spec/global/
trunk/testsuite/src/main/org/jboss/test/ejb3/spec/global/jndi/
trunk/testsuite/src/main/org/jboss/test/ejb3/spec/global/jndi/AbstractJNDILookup.java
trunk/testsuite/src/main/org/jboss/test/ejb3/spec/global/jndi/Echo.java
trunk/testsuite/src/main/org/jboss/test/ejb3/spec/global/jndi/Echo2xLocal.java
trunk/testsuite/src/main/org/jboss/test/ejb3/spec/global/jndi/Echo2xRemote.java
trunk/testsuite/src/main/org/jboss/test/ejb3/spec/global/jndi/EchoLocal.java
trunk/testsuite/src/main/org/jboss/test/ejb3/spec/global/jndi/EchoRemote.java
trunk/testsuite/src/main/org/jboss/test/ejb3/spec/global/jndi/JNDI30LookupBean.java
trunk/testsuite/src/main/org/jboss/test/ejb3/spec/global/jndi/JNDI31Lookup.java
trunk/testsuite/src/main/org/jboss/test/ejb3/spec/global/jndi/JNDI31LookupBean.java
trunk/testsuite/src/main/org/jboss/test/ejb3/spec/global/jndi/JNDILookup.java
trunk/testsuite/src/main/org/jboss/test/ejb3/spec/global/jndi/SimpleHome.java
trunk/testsuite/src/main/org/jboss/test/ejb3/spec/global/jndi/SimpleLocalHome.java
trunk/testsuite/src/main/org/jboss/test/ejb3/spec/global/jndi/SimpleSFSB.java
trunk/testsuite/src/main/org/jboss/test/ejb3/spec/global/jndi/SimpleSLSB.java
trunk/testsuite/src/main/org/jboss/test/ejb3/spec/global/jndi/SimpleSingleton.java
trunk/testsuite/src/main/org/jboss/test/ejb3/spec/global/jndi/unit/
trunk/testsuite/src/main/org/jboss/test/ejb3/spec/global/jndi/unit/EJB30JNDINamingSpecUnitTestCase.java
trunk/testsuite/src/main/org/jboss/test/ejb3/spec/global/jndi/unit/EJB31JNDINamingSpecUnitTestCase.java
trunk/testsuite/src/resources/ejb3/spec/
trunk/testsuite/src/resources/ejb3/spec/global/
trunk/testsuite/src/resources/ejb3/spec/global/jndi/
trunk/testsuite/src/resources/ejb3/spec/global/jndi/META-INF/
trunk/testsuite/src/resources/ejb3/spec/global/jndi/META-INF/ejb-jar.xml
Modified:
trunk/component-matrix/pom.xml
trunk/server/src/main/java/org/jboss/deployment/MappedReferenceMetaDataResolverDeployer.java
trunk/testsuite/imports/sections/ejb3.xml
Log:
JBAS-8482 Upgraded to 1.0.0-alpha-10 of jboss-ejb3-as6-depchain to bring in fix for EJBTHREE-2180
Modified: trunk/component-matrix/pom.xml
===================================================================
--- trunk/component-matrix/pom.xml 2010-10-01 12:15:46 UTC (rev 108401)
+++ trunk/component-matrix/pom.xml 2010-10-01 13:15:47 UTC (rev 108402)
@@ -85,7 +85,7 @@
<version.org.jboss.cluster.server.core>1.0.0.Alpha2</version.org.jboss.cluster.server.core>
<version.org.jboss.common.core>2.2.17.GA</version.org.jboss.common.core>
<version.org.jboss.deployers>2.2.0.Alpha7</version.org.jboss.deployers>
- <version.org.jboss.ejb3.depchain>1.0.0-alpha-9</version.org.jboss.ejb3.depchain>
+ <version.org.jboss.ejb3.depchain>1.0.0-alpha-10</version.org.jboss.ejb3.depchain>
<!-- This to move into the EJB3 BOM -->
<version.org.jboss.ejb3.embedded>1.0.0-alpha-1</version.org.jboss.ejb3.embedded>
<version.org.jboss.ejb.api>1.0-alpha-1</version.org.jboss.ejb.api>
Modified: trunk/server/src/main/java/org/jboss/deployment/MappedReferenceMetaDataResolverDeployer.java
===================================================================
--- trunk/server/src/main/java/org/jboss/deployment/MappedReferenceMetaDataResolverDeployer.java 2010-10-01 12:15:46 UTC (rev 108401)
+++ trunk/server/src/main/java/org/jboss/deployment/MappedReferenceMetaDataResolverDeployer.java 2010-10-01 13:15:47 UTC (rev 108402)
@@ -587,7 +587,7 @@
}
}
// Map no-interface view of EJB3.1 bean
- if (sbean instanceof JBossSessionBean31MetaData)
+ if (sbean.getJBossMetaData().isEJB31() && sbean instanceof JBossSessionBean31MetaData)
{
JBossSessionBean31MetaData sessionBean31 = (JBossSessionBean31MetaData) sbean;
if (sessionBean31.isNoInterfaceBean())
Modified: trunk/testsuite/imports/sections/ejb3.xml
===================================================================
--- trunk/testsuite/imports/sections/ejb3.xml 2010-10-01 12:15:46 UTC (rev 108401)
+++ trunk/testsuite/imports/sections/ejb3.xml 2010-10-01 13:15:47 UTC (rev 108402)
@@ -200,10 +200,34 @@
</jar>
</target>
+ <target name="ejb3-portable-jndi-names" depends="compile">
+ <mkdir dir="${build.lib}" />
+ <!-- EJB3.1 deployment jar -->
+ <jar destfile="${build.lib}/ejb31-portable-jndi-names.jar">
+ <fileset dir="${build.classes}" includes="org/jboss/test/ejb3/spec/global/jndi/*"/>
+ </jar>
+ <!-- EJB3.0 deployment jar -->
+ <jar destfile="${build.lib}/ejb30-portable-jndi-names.jar">
+ <!-- Include all beans except singleton beans (since Singletons are only for EJB3.1) -->
+ <fileset dir="${build.classes}">
+ <include name="org/jboss/test/ejb3/spec/global/jndi/*"/>
+ <exclude name="org/jboss/test/ejb3/spec/global/jndi/SimpleSingleton.class"/>
+ <exclude name="org/jboss/test/ejb3/spec/global/jndi/JNDI31LookupBean.class"/>
+ </fileset>
+ <!-- Include the ejb-jar.xml which explicitly marks this as 3.0 deployment -->
+ <fileset dir="${build.resources}/ejb3/spec/global/jndi">
+ <include name="META-INF/ejb-jar.xml"/>
+ </fileset>
+
+ </jar>
+
+ </target>
+
<target name="_jars-ejb3" depends="ejb3-servlet,jbas6161,jbas6239,
jbas7526,
jbas7556,
- ejbthree1597,ejbthree7376, jboss51xsd, ejb31nointerface, ejb3war, jbpapp3026, ejb31singleton,ejb31async">
+ ejbthree1597,ejbthree7376, jboss51xsd, ejb31nointerface, ejb3war, jbpapp3026, ejb31singleton,ejb31async,
+ ejb3-portable-jndi-names">
<mkdir dir="${build.lib}" />
<!-- A jar with a simple ejb3 session -->
Added: trunk/testsuite/src/main/org/jboss/test/ejb3/spec/global/jndi/AbstractJNDILookup.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/ejb3/spec/global/jndi/AbstractJNDILookup.java (rev 0)
+++ trunk/testsuite/src/main/org/jboss/test/ejb3/spec/global/jndi/AbstractJNDILookup.java 2010-10-01 13:15:47 UTC (rev 108402)
@@ -0,0 +1,192 @@
+/*
+ * 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.test.ejb3.spec.global.jndi;
+
+import javax.naming.Context;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+
+import org.jboss.logging.Logger;
+
+/**
+ * AbstractJNDILookup
+ *
+ * @author Jaikiran Pai
+ * @version $Revision: $
+ */
+public abstract class AbstractJNDILookup
+{
+ private static Logger logger = Logger.getLogger(AbstractJNDILookup.class);
+
+ //@Resource (mappedName = "java:app/AppName")
+ // FIXME: It should actually come from the above @Resource, once it
+ // starts working
+ protected String appName;
+
+ //@Resource (mappedName = "java:module/ModuleName")
+ // FIXME: It should actually come from the above @Resource, once it
+ // starts working
+ protected String moduleName;
+
+ protected void lookupPortableJNDINames(Class<?> beanClass, boolean skipEJB2xViews, boolean isEJB31) throws NamingException
+ {
+ String beanName = beanClass.getSimpleName();
+ Context ctx = new InitialContext();
+
+ // java:global
+ String remoteBusinessInterfaceJNDIName = this.getJavaGlobalJNDIName(beanName, EchoRemote.class.getName());
+ String localBusinessInterfaceJNDIName = this.getJavaGlobalJNDIName(beanName, EchoLocal.class.getName());
+
+
+ logger.info("Looking up " + remoteBusinessInterfaceJNDIName);
+ EchoRemote remoteEcho = (EchoRemote) ctx.lookup(remoteBusinessInterfaceJNDIName);
+ logger.info("Looking up " + localBusinessInterfaceJNDIName);
+ EchoLocal localEcho = (EchoLocal) ctx.lookup(localBusinessInterfaceJNDIName);
+
+ if (isEJB31)
+ {
+ String noInterfaceViewJNDIName = this.getJavaGlobalJNDIName(beanName, beanClass.getName());
+ logger.info("Looking up " + noInterfaceViewJNDIName);
+ Object noInterfaceView = ctx.lookup(noInterfaceViewJNDIName);
+ if (!beanClass.isInstance(noInterfaceView))
+ {
+ throw new RuntimeException("Unexpected object " + noInterfaceView + " in JNDI for jndi name "
+ + noInterfaceViewJNDIName);
+ }
+ }
+ if (!skipEJB2xViews)
+ {
+ String homeJNDIName = this.getJavaGlobalJNDIName(beanName, SimpleHome.class.getName());
+ String localHomeJNDIName = this.getJavaGlobalJNDIName(beanName, SimpleLocalHome.class.getName());
+
+ logger.info("Looking up " + homeJNDIName);
+ SimpleHome home = (SimpleHome) ctx.lookup(homeJNDIName);
+ logger.info("Looking up " + localHomeJNDIName);
+ SimpleLocalHome localHome = (SimpleLocalHome) ctx.lookup(localHomeJNDIName);
+ }
+
+ logger.info("Successfully looked up various views in java:global namespace for SLSB: " + SimpleSLSB.class);
+
+ // java:app
+ remoteBusinessInterfaceJNDIName = this.getJavaAppJNDIName(beanName, EchoRemote.class.getName());
+ localBusinessInterfaceJNDIName = this.getJavaAppJNDIName(beanName, EchoLocal.class.getName());
+
+
+ logger.info("Looking up " + remoteBusinessInterfaceJNDIName);
+ remoteEcho = (EchoRemote) ctx.lookup(remoteBusinessInterfaceJNDIName);
+ logger.info("Looking up " + localBusinessInterfaceJNDIName);
+ localEcho = (EchoLocal) ctx.lookup(localBusinessInterfaceJNDIName);
+
+ if (isEJB31)
+ {
+ String noInterfaceViewJNDIName = this.getJavaAppJNDIName(beanName, beanClass.getName());
+ logger.info("Looking up " + noInterfaceViewJNDIName);
+ Object noInterfaceView = ctx.lookup(noInterfaceViewJNDIName);
+ if (!beanClass.isInstance(noInterfaceView))
+ {
+ throw new RuntimeException("Unexpected object " + noInterfaceView + " in JNDI for jndi name "
+ + noInterfaceViewJNDIName);
+ }
+ }
+
+ if (!skipEJB2xViews)
+ {
+ String homeJNDIName = this.getJavaAppJNDIName(beanName, SimpleHome.class.getName());
+ String localHomeJNDIName = this.getJavaAppJNDIName(beanName, SimpleLocalHome.class.getName());
+
+ logger.info("Looking up " + homeJNDIName);
+ SimpleHome home = (SimpleHome) ctx.lookup(homeJNDIName);
+ logger.info("Looking up " + localHomeJNDIName);
+ SimpleLocalHome localHome = (SimpleLocalHome) ctx.lookup(localHomeJNDIName);
+ }
+
+ // java:module
+ remoteBusinessInterfaceJNDIName = this.getJavaModuleJNDIName(beanName, EchoRemote.class.getName());
+ localBusinessInterfaceJNDIName = this.getJavaModuleJNDIName(beanName, EchoLocal.class.getName());
+
+ logger.info("Looking up " + remoteBusinessInterfaceJNDIName);
+ remoteEcho = (EchoRemote) ctx.lookup(remoteBusinessInterfaceJNDIName);
+ logger.info("Looking up " + localBusinessInterfaceJNDIName);
+ localEcho = (EchoLocal) ctx.lookup(localBusinessInterfaceJNDIName);
+
+ if (isEJB31)
+ {
+ String noInterfaceViewJNDIName = this.getJavaModuleJNDIName(beanName, beanClass.getName());
+ logger.info("Looking up " + noInterfaceViewJNDIName);
+ Object noInterfaceView = ctx.lookup(noInterfaceViewJNDIName);
+ if (!beanClass.isInstance(noInterfaceView))
+ {
+ throw new RuntimeException("Unexpected object " + noInterfaceView + " in JNDI for jndi name "
+ + noInterfaceViewJNDIName);
+ }
+ }
+ if (!skipEJB2xViews)
+ {
+ String homeJNDIName = this.getJavaModuleJNDIName(beanName, SimpleHome.class.getName());
+ String localHomeJNDIName = this.getJavaModuleJNDIName(beanName, SimpleLocalHome.class.getName());
+
+ logger.info("Looking up " + homeJNDIName);
+ SimpleHome home = (SimpleHome) ctx.lookup(homeJNDIName);
+ logger.info("Looking up " + localHomeJNDIName);
+ SimpleLocalHome localHome = (SimpleLocalHome) ctx.lookup(localHomeJNDIName);
+ }
+ }
+
+ private String getJavaGlobalJNDIName(String beanName, String beanInterface)
+ {
+ String globalJNDIName = "java:global/";
+ if (appName != null)
+ {
+ globalJNDIName = globalJNDIName + appName + "/";
+ }
+ globalJNDIName = globalJNDIName + moduleName + "/" + beanName;
+ if (beanInterface != null)
+ {
+ globalJNDIName += "!" + beanInterface;
+ }
+
+ return globalJNDIName;
+ }
+
+ private String getJavaAppJNDIName(String beanName, String beanInterface)
+ {
+ String jndiName = "java:app/" + moduleName + "/" + beanName;
+
+ if (beanInterface != null)
+ {
+ jndiName += "!" + beanInterface;
+ }
+
+ return jndiName;
+ }
+
+ private String getJavaModuleJNDIName(String beanName, String beanInterface)
+ {
+ String jndiName = "java:module/" + beanName;
+
+ if (beanInterface != null)
+ {
+ jndiName += "!" + beanInterface;
+ }
+ return jndiName;
+ }
+}
Added: trunk/testsuite/src/main/org/jboss/test/ejb3/spec/global/jndi/Echo.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/ejb3/spec/global/jndi/Echo.java (rev 0)
+++ trunk/testsuite/src/main/org/jboss/test/ejb3/spec/global/jndi/Echo.java 2010-10-01 13:15:47 UTC (rev 108402)
@@ -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.test.ejb3.spec.global.jndi;
+
+/**
+ * Echo
+ *
+ * @author Jaikiran Pai
+ * @version $Revision: $
+ */
+public interface Echo
+{
+ String echo(String msg);
+}
Added: trunk/testsuite/src/main/org/jboss/test/ejb3/spec/global/jndi/Echo2xLocal.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/ejb3/spec/global/jndi/Echo2xLocal.java (rev 0)
+++ trunk/testsuite/src/main/org/jboss/test/ejb3/spec/global/jndi/Echo2xLocal.java 2010-10-01 13:15:47 UTC (rev 108402)
@@ -0,0 +1,35 @@
+/*
+ * 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.test.ejb3.spec.global.jndi;
+
+import javax.ejb.EJBLocalObject;
+
+/**
+ * Echo2xLocal
+ *
+ * @author Jaikiran Pai
+ * @version $Revision: $
+ */
+public interface Echo2xLocal extends Echo, EJBLocalObject
+{
+
+}
Added: trunk/testsuite/src/main/org/jboss/test/ejb3/spec/global/jndi/Echo2xRemote.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/ejb3/spec/global/jndi/Echo2xRemote.java (rev 0)
+++ trunk/testsuite/src/main/org/jboss/test/ejb3/spec/global/jndi/Echo2xRemote.java 2010-10-01 13:15:47 UTC (rev 108402)
@@ -0,0 +1,35 @@
+/*
+ * 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.test.ejb3.spec.global.jndi;
+
+import javax.ejb.EJBObject;
+
+/**
+ * Echo2xRemote
+ *
+ * @author Jaikiran Pai
+ * @version $Revision: $
+ */
+public interface Echo2xRemote extends Echo, EJBObject
+{
+
+}
Added: trunk/testsuite/src/main/org/jboss/test/ejb3/spec/global/jndi/EchoLocal.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/ejb3/spec/global/jndi/EchoLocal.java (rev 0)
+++ trunk/testsuite/src/main/org/jboss/test/ejb3/spec/global/jndi/EchoLocal.java 2010-10-01 13:15:47 UTC (rev 108402)
@@ -0,0 +1,34 @@
+/*
+ * 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.test.ejb3.spec.global.jndi;
+
+
+/**
+ * EchoLocal
+ *
+ * @author Jaikiran Pai
+ * @version $Revision: $
+ */
+public interface EchoLocal extends Echo
+{
+
+}
Added: trunk/testsuite/src/main/org/jboss/test/ejb3/spec/global/jndi/EchoRemote.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/ejb3/spec/global/jndi/EchoRemote.java (rev 0)
+++ trunk/testsuite/src/main/org/jboss/test/ejb3/spec/global/jndi/EchoRemote.java 2010-10-01 13:15:47 UTC (rev 108402)
@@ -0,0 +1,35 @@
+/*
+ * 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.test.ejb3.spec.global.jndi;
+
+import javax.ejb.EJBObject;
+
+/**
+ * EchoRemote
+ *
+ * @author Jaikiran Pai
+ * @version $Revision: $
+ */
+public interface EchoRemote extends Echo
+{
+
+}
Added: trunk/testsuite/src/main/org/jboss/test/ejb3/spec/global/jndi/JNDI30LookupBean.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/ejb3/spec/global/jndi/JNDI30LookupBean.java (rev 0)
+++ trunk/testsuite/src/main/org/jboss/test/ejb3/spec/global/jndi/JNDI30LookupBean.java 2010-10-01 13:15:47 UTC (rev 108402)
@@ -0,0 +1,62 @@
+/*
+ * 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.test.ejb3.spec.global.jndi;
+
+import javax.ejb.Remote;
+import javax.ejb.Stateless;
+import javax.naming.NamingException;
+
+import org.jboss.ejb3.annotation.RemoteBinding;
+
+/**
+ * JNDI30LookupBean
+ *
+ * @author Jaikiran Pai
+ * @version $Revision: $
+ */
+ at Stateless
+ at Remote(JNDILookup.class)
+ at RemoteBinding(jndiBinding = JNDI30LookupBean.JNDI_NAME)
+public class JNDI30LookupBean extends AbstractJNDILookup implements JNDILookup
+{
+ public static final String JNDI_NAME = "ejb30-spec-jndi-name-delegate-bean";
+
+
+ public JNDI30LookupBean()
+ {
+ this.moduleName = "ejb30-portable-jndi-names";
+ }
+
+ @Override
+ public void lookupPortableSFSBJNDINames() throws NamingException
+ {
+ this.lookupPortableJNDINames(SimpleSFSB.class, false, false);
+ }
+
+ @Override
+ public void lookupPortableSLSBJNDINames() throws NamingException
+ {
+ this.lookupPortableJNDINames(SimpleSLSB.class, false, false);
+ }
+
+
+}
Added: trunk/testsuite/src/main/org/jboss/test/ejb3/spec/global/jndi/JNDI31Lookup.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/ejb3/spec/global/jndi/JNDI31Lookup.java (rev 0)
+++ trunk/testsuite/src/main/org/jboss/test/ejb3/spec/global/jndi/JNDI31Lookup.java 2010-10-01 13:15:47 UTC (rev 108402)
@@ -0,0 +1,35 @@
+/*
+ * 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.test.ejb3.spec.global.jndi;
+
+import javax.naming.NamingException;
+
+/**
+ * JNDI31Lookup
+ *
+ * @author Jaikiran Pai
+ * @version $Revision: $
+ */
+public interface JNDI31Lookup extends JNDILookup
+{
+ void lookupPortableSingletonBeanJNDINames() throws NamingException;
+}
Added: trunk/testsuite/src/main/org/jboss/test/ejb3/spec/global/jndi/JNDI31LookupBean.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/ejb3/spec/global/jndi/JNDI31LookupBean.java (rev 0)
+++ trunk/testsuite/src/main/org/jboss/test/ejb3/spec/global/jndi/JNDI31LookupBean.java 2010-10-01 13:15:47 UTC (rev 108402)
@@ -0,0 +1,68 @@
+/*
+ * 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.test.ejb3.spec.global.jndi;
+
+import javax.ejb.Remote;
+import javax.ejb.Stateless;
+import javax.naming.NamingException;
+
+import org.jboss.ejb3.annotation.RemoteBinding;
+
+/**
+ * JNDILookupBean
+ *
+ * @author Jaikiran Pai
+ * @version $Revision: $
+ */
+ at Stateless
+ at Remote(JNDI31Lookup.class)
+ at RemoteBinding(jndiBinding = JNDI31LookupBean.JNDI_NAME)
+public class JNDI31LookupBean extends AbstractJNDILookup implements JNDI31Lookup
+{
+
+ public static final String JNDI_NAME = "ejb31-portable-jndi-name-delegate-bean";
+
+ public JNDI31LookupBean()
+ {
+ this.moduleName = "ejb31-portable-jndi-names";
+ }
+
+ @Override
+ public void lookupPortableSFSBJNDINames() throws NamingException
+ {
+ this.lookupPortableJNDINames(SimpleSFSB.class, false, true);
+ }
+
+ @Override
+ public void lookupPortableSLSBJNDINames() throws NamingException
+ {
+ this.lookupPortableJNDINames(SimpleSLSB.class, false, true);
+ }
+
+ @Override
+ public void lookupPortableSingletonBeanJNDINames() throws NamingException
+ {
+ this.lookupPortableJNDINames(SimpleSingleton.class, true, true);
+
+ }
+
+}
Added: trunk/testsuite/src/main/org/jboss/test/ejb3/spec/global/jndi/JNDILookup.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/ejb3/spec/global/jndi/JNDILookup.java (rev 0)
+++ trunk/testsuite/src/main/org/jboss/test/ejb3/spec/global/jndi/JNDILookup.java 2010-10-01 13:15:47 UTC (rev 108402)
@@ -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.test.ejb3.spec.global.jndi;
+
+import javax.naming.NamingException;
+
+/**
+ * JNDILookup
+ *
+ * @author Jaikiran Pai
+ * @version $Revision: $
+ */
+public interface JNDILookup
+{
+
+ void lookupPortableSLSBJNDINames() throws NamingException;
+
+ void lookupPortableSFSBJNDINames() throws NamingException;
+
+
+}
Added: trunk/testsuite/src/main/org/jboss/test/ejb3/spec/global/jndi/SimpleHome.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/ejb3/spec/global/jndi/SimpleHome.java (rev 0)
+++ trunk/testsuite/src/main/org/jboss/test/ejb3/spec/global/jndi/SimpleHome.java 2010-10-01 13:15:47 UTC (rev 108402)
@@ -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.test.ejb3.spec.global.jndi;
+
+import java.rmi.RemoteException;
+
+import javax.ejb.CreateException;
+import javax.ejb.EJBHome;
+
+/**
+ * SimpleHome
+ *
+ * @author Jaikiran Pai
+ * @version $Revision: $
+ */
+public interface SimpleHome extends EJBHome
+{
+ Echo2xRemote create() throws CreateException, RemoteException;
+}
Added: trunk/testsuite/src/main/org/jboss/test/ejb3/spec/global/jndi/SimpleLocalHome.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/ejb3/spec/global/jndi/SimpleLocalHome.java (rev 0)
+++ trunk/testsuite/src/main/org/jboss/test/ejb3/spec/global/jndi/SimpleLocalHome.java 2010-10-01 13:15:47 UTC (rev 108402)
@@ -0,0 +1,35 @@
+/*
+ * 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.test.ejb3.spec.global.jndi;
+
+import javax.ejb.EJBLocalHome;
+
+/**
+ * SimpleLocalHome
+ *
+ * @author Jaikiran Pai
+ * @version $Revision: $
+ */
+public interface SimpleLocalHome extends EJBLocalHome
+{
+ Echo2xLocal create();
+}
Added: trunk/testsuite/src/main/org/jboss/test/ejb3/spec/global/jndi/SimpleSFSB.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/ejb3/spec/global/jndi/SimpleSFSB.java (rev 0)
+++ trunk/testsuite/src/main/org/jboss/test/ejb3/spec/global/jndi/SimpleSFSB.java 2010-10-01 13:15:47 UTC (rev 108402)
@@ -0,0 +1,52 @@
+/*
+ * 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.test.ejb3.spec.global.jndi;
+
+import javax.ejb.Local;
+import javax.ejb.LocalBean;
+import javax.ejb.LocalHome;
+import javax.ejb.Remote;
+import javax.ejb.RemoteHome;
+import javax.ejb.Stateful;
+
+/**
+ * SimpleSFSB
+ *
+ * @author Jaikiran Pai
+ * @version $Revision: $
+ */
+ at Stateful
+ at Remote (EchoRemote.class)
+ at Local(EchoLocal.class)
+ at LocalBean
+ at LocalHome (SimpleLocalHome.class)
+ at RemoteHome (SimpleHome.class)
+public class SimpleSFSB implements Echo
+{
+
+ @Override
+ public String echo(String msg)
+ {
+ return msg;
+ }
+
+}
Added: trunk/testsuite/src/main/org/jboss/test/ejb3/spec/global/jndi/SimpleSLSB.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/ejb3/spec/global/jndi/SimpleSLSB.java (rev 0)
+++ trunk/testsuite/src/main/org/jboss/test/ejb3/spec/global/jndi/SimpleSLSB.java 2010-10-01 13:15:47 UTC (rev 108402)
@@ -0,0 +1,52 @@
+/*
+ * 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.test.ejb3.spec.global.jndi;
+
+import javax.ejb.Local;
+import javax.ejb.LocalBean;
+import javax.ejb.LocalHome;
+import javax.ejb.Remote;
+import javax.ejb.RemoteHome;
+import javax.ejb.Stateless;
+
+/**
+ * SimpleSLSB
+ *
+ * @author Jaikiran Pai
+ * @version $Revision: $
+ */
+ at Stateless
+ at Remote (EchoRemote.class)
+ at Local(EchoLocal.class)
+ at LocalBean
+ at LocalHome (SimpleLocalHome.class)
+ at RemoteHome (SimpleHome.class)
+public class SimpleSLSB implements Echo
+{
+
+ @Override
+ public String echo(String msg)
+ {
+ return msg;
+ }
+
+}
Added: trunk/testsuite/src/main/org/jboss/test/ejb3/spec/global/jndi/SimpleSingleton.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/ejb3/spec/global/jndi/SimpleSingleton.java (rev 0)
+++ trunk/testsuite/src/main/org/jboss/test/ejb3/spec/global/jndi/SimpleSingleton.java 2010-10-01 13:15:47 UTC (rev 108402)
@@ -0,0 +1,48 @@
+/*
+ * 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.test.ejb3.spec.global.jndi;
+
+import javax.ejb.Local;
+import javax.ejb.LocalBean;
+import javax.ejb.Remote;
+import javax.ejb.Singleton;
+
+/**
+ * SimpleSingleton
+ *
+ * @author Jaikiran Pai
+ * @version $Revision: $
+ */
+ at Singleton
+ at Remote (EchoRemote.class)
+ at Local(EchoLocal.class)
+ at LocalBean
+public class SimpleSingleton implements Echo
+{
+
+ @Override
+ public String echo(String msg)
+ {
+ return msg;
+ }
+
+}
Added: trunk/testsuite/src/main/org/jboss/test/ejb3/spec/global/jndi/unit/EJB30JNDINamingSpecUnitTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/ejb3/spec/global/jndi/unit/EJB30JNDINamingSpecUnitTestCase.java (rev 0)
+++ trunk/testsuite/src/main/org/jboss/test/ejb3/spec/global/jndi/unit/EJB30JNDINamingSpecUnitTestCase.java 2010-10-01 13:15:47 UTC (rev 108402)
@@ -0,0 +1,65 @@
+/*
+ * 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.test.ejb3.spec.global.jndi.unit;
+
+import junit.framework.Test;
+
+import org.jboss.test.JBossTestCase;
+import org.jboss.test.ejb3.spec.global.jndi.JNDI30LookupBean;
+import org.jboss.test.ejb3.spec.global.jndi.JNDILookup;
+
+/**
+ * EJB30JNDINamingSpecUnitTestCase
+ *
+ * @author Jaikiran Pai
+ * @version $Revision: $
+ */
+public class EJB30JNDINamingSpecUnitTestCase extends JBossTestCase
+{
+
+ public EJB30JNDINamingSpecUnitTestCase(String name)
+ {
+ super(name);
+ }
+
+ public static Test suite() throws Exception
+ {
+ return getDeploySetup(EJB30JNDINamingSpecUnitTestCase.class, "ejb30-portable-jndi-names.jar");
+ }
+
+ public void testJNDINamesForSLSB() throws Exception
+ {
+ JNDILookup delegateBean = (JNDILookup) this.getInitialContext().lookup(JNDI30LookupBean.JNDI_NAME);
+
+ delegateBean.lookupPortableSLSBJNDINames();
+
+ }
+
+ public void testJNDINamesForSFSB() throws Exception
+ {
+ JNDILookup delegateBean = (JNDILookup) this.getInitialContext().lookup(JNDI30LookupBean.JNDI_NAME);
+
+ delegateBean.lookupPortableSFSBJNDINames();
+
+ }
+
+}
Added: trunk/testsuite/src/main/org/jboss/test/ejb3/spec/global/jndi/unit/EJB31JNDINamingSpecUnitTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/ejb3/spec/global/jndi/unit/EJB31JNDINamingSpecUnitTestCase.java (rev 0)
+++ trunk/testsuite/src/main/org/jboss/test/ejb3/spec/global/jndi/unit/EJB31JNDINamingSpecUnitTestCase.java 2010-10-01 13:15:47 UTC (rev 108402)
@@ -0,0 +1,73 @@
+/*
+ * 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.test.ejb3.spec.global.jndi.unit;
+
+import junit.framework.Test;
+
+import org.jboss.test.JBossTestCase;
+import org.jboss.test.ejb3.spec.global.jndi.JNDI31Lookup;
+import org.jboss.test.ejb3.spec.global.jndi.JNDI31LookupBean;
+
+/**
+ * EJB31JNDINamingSpecUnitTestCase
+ *
+ * @author Jaikiran Pai
+ * @version $Revision: $
+ */
+public class EJB31JNDINamingSpecUnitTestCase extends JBossTestCase
+{
+
+ public EJB31JNDINamingSpecUnitTestCase(String name)
+ {
+ super(name);
+ }
+
+ public static Test suite() throws Exception
+ {
+ return getDeploySetup(EJB31JNDINamingSpecUnitTestCase.class, "ejb31-portable-jndi-names.jar");
+ }
+
+ public void testJNDINamesForSLSB() throws Exception
+ {
+ JNDI31Lookup delegateBean = (JNDI31Lookup) this.getInitialContext().lookup(JNDI31LookupBean.JNDI_NAME);
+
+ delegateBean.lookupPortableSLSBJNDINames();
+
+ }
+
+ public void testJNDINamesForSFSB() throws Exception
+ {
+ JNDI31Lookup delegateBean = (JNDI31Lookup) this.getInitialContext().lookup(JNDI31LookupBean.JNDI_NAME);
+
+ delegateBean.lookupPortableSFSBJNDINames();
+
+ }
+
+ public void testJNDINamesForSingleton() throws Exception
+ {
+ JNDI31Lookup delegateBean = (JNDI31Lookup) this.getInitialContext().lookup(JNDI31LookupBean.JNDI_NAME);
+
+ delegateBean.lookupPortableSingletonBeanJNDINames();
+
+ }
+
+}
Added: trunk/testsuite/src/resources/ejb3/spec/global/jndi/META-INF/ejb-jar.xml
===================================================================
--- trunk/testsuite/src/resources/ejb3/spec/global/jndi/META-INF/ejb-jar.xml (rev 0)
+++ trunk/testsuite/src/resources/ejb3/spec/global/jndi/META-INF/ejb-jar.xml 2010-10-01 13:15:47 UTC (rev 108402)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ejb-jar
+ 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://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd"
+ version="3.0">
+
+</ejb-jar>
\ No newline at end of file
More information about the jboss-cvs-commits
mailing list