[jboss-cvs] JBossAS SVN: r102775 - in trunk/testsuite: src/main/org/jboss/test/ejb3 and 2 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Tue Mar 23 08:30:36 EDT 2010


Author: wolfc
Date: 2010-03-23 08:30:35 -0400 (Tue, 23 Mar 2010)
New Revision: 102775

Added:
   trunk/testsuite/src/main/org/jboss/test/ejb3/jbas7556/
   trunk/testsuite/src/main/org/jboss/test/ejb3/jbas7556/QueryNameSpaceBean.java
   trunk/testsuite/src/main/org/jboss/test/ejb3/jbas7556/QueryNameSpaceRemote.java
   trunk/testsuite/src/main/org/jboss/test/ejb3/jbas7556/unit/
   trunk/testsuite/src/main/org/jboss/test/ejb3/jbas7556/unit/QueryNameSpaceUnitTestCase.java
Modified:
   trunk/testsuite/imports/sections/ejb3.xml
Log:
JBAS-7556: query java:module/ModuleName test

Modified: trunk/testsuite/imports/sections/ejb3.xml
===================================================================
--- trunk/testsuite/imports/sections/ejb3.xml	2010-03-23 11:51:15 UTC (rev 102774)
+++ trunk/testsuite/imports/sections/ejb3.xml	2010-03-23 12:30:35 UTC (rev 102775)
@@ -36,6 +36,13 @@
       </jar>
    </target>
    
+   <target name="jbas7556" depends="compile">
+      <mkdir dir="${build.lib}" />
+      <jar destfile="${build.lib}/jbas7556.jar">
+         <fileset dir="${build.classes}" includes="org/jboss/test/ejb3/jbas7556/*"/>
+      </jar>
+   </target>
+
    <!-- This issue affected the ejb3 AS module -->
    <target name="ejbthree1597" depends="compile">
       <mkdir dir="${build.lib}"/>

Added: trunk/testsuite/src/main/org/jboss/test/ejb3/jbas7556/QueryNameSpaceBean.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/ejb3/jbas7556/QueryNameSpaceBean.java	                        (rev 0)
+++ trunk/testsuite/src/main/org/jboss/test/ejb3/jbas7556/QueryNameSpaceBean.java	2010-03-23 12:30:35 UTC (rev 102775)
@@ -0,0 +1,38 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright (c) 2010, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ejb3.jbas7556;
+
+import javax.ejb.Stateless;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+
+/**
+ * @author <a href="cdewolf at redhat.com">Carlo de Wolf</a>
+ */
+ at Stateless
+public class QueryNameSpaceBean implements QueryNameSpaceRemote
+{
+   public String query(String name) throws NamingException
+   {
+      return new InitialContext().lookup(name).toString();
+   }
+}


Property changes on: trunk/testsuite/src/main/org/jboss/test/ejb3/jbas7556/QueryNameSpaceBean.java
___________________________________________________________________
Name: svn:keywords
   + Author Date Id Revision
Name: svn:eol-style
   + native

Added: trunk/testsuite/src/main/org/jboss/test/ejb3/jbas7556/QueryNameSpaceRemote.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/ejb3/jbas7556/QueryNameSpaceRemote.java	                        (rev 0)
+++ trunk/testsuite/src/main/org/jboss/test/ejb3/jbas7556/QueryNameSpaceRemote.java	2010-03-23 12:30:35 UTC (rev 102775)
@@ -0,0 +1,34 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright (c) 2010, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ejb3.jbas7556;
+
+import javax.ejb.Remote;
+import javax.naming.NamingException;
+
+/**
+ * @author <a href="cdewolf at redhat.com">Carlo de Wolf</a>
+ */
+ at Remote
+public interface QueryNameSpaceRemote
+{
+   String query(String name) throws NamingException;
+}


Property changes on: trunk/testsuite/src/main/org/jboss/test/ejb3/jbas7556/QueryNameSpaceRemote.java
___________________________________________________________________
Name: svn:keywords
   + Author Date Id Revision
Name: svn:eol-style
   + native

Added: trunk/testsuite/src/main/org/jboss/test/ejb3/jbas7556/unit/QueryNameSpaceUnitTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/ejb3/jbas7556/unit/QueryNameSpaceUnitTestCase.java	                        (rev 0)
+++ trunk/testsuite/src/main/org/jboss/test/ejb3/jbas7556/unit/QueryNameSpaceUnitTestCase.java	2010-03-23 12:30:35 UTC (rev 102775)
@@ -0,0 +1,52 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright (c) 2010, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ejb3.jbas7556.unit;
+
+import junit.framework.Test;
+import org.jboss.test.JBossTestCase;
+import org.jboss.test.ejb3.jbas7556.QueryNameSpaceRemote;
+
+/**
+ * @author <a href="cdewolf at redhat.com">Carlo de Wolf</a>
+ */
+public class QueryNameSpaceUnitTestCase extends JBossTestCase
+{
+   public QueryNameSpaceUnitTestCase(String name)
+   {
+      super(name);
+   }
+
+   /**
+    * EE.5.15
+    */
+   public void testModuleName() throws Exception
+   {
+      QueryNameSpaceRemote bean = (QueryNameSpaceRemote) getInitialContext().lookup("QueryNameSpaceBean/remote");
+      String result = bean.query("java:module/ModuleName");
+      assertEquals("jbas7556", result);
+   }
+
+   public static Test suite() throws Exception
+   {
+      return getDeploySetup(QueryNameSpaceUnitTestCase.class, "jbas7556.jar");
+   }
+}


Property changes on: trunk/testsuite/src/main/org/jboss/test/ejb3/jbas7556/unit/QueryNameSpaceUnitTestCase.java
___________________________________________________________________
Name: svn:keywords
   + Author Date Id Revision
Name: svn:eol-style
   + native




More information about the jboss-cvs-commits mailing list