[jboss-cvs] JBossAS SVN: r67630 - in trunk/ejb3: src/test/org/jboss/ejb3/test and 2 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Thu Nov 29 16:53:19 EST 2007
Author: ALRubinger
Date: 2007-11-29 16:53:19 -0500 (Thu, 29 Nov 2007)
New Revision: 67630
Added:
trunk/ejb3/src/test/org/jboss/ejb3/test/ejbthree1119/
trunk/ejb3/src/test/org/jboss/ejb3/test/ejbthree1119/TestBean.java
trunk/ejb3/src/test/org/jboss/ejb3/test/ejbthree1119/TestRemoteBusiness.java
trunk/ejb3/src/test/org/jboss/ejb3/test/ejbthree1119/unit/
trunk/ejb3/src/test/org/jboss/ejb3/test/ejbthree1119/unit/EmptyPoolValueUnitTestCase.java
Modified:
trunk/ejb3/build-test.xml
Log:
[EJBTHREE-1119] Added Unit Test
Modified: trunk/ejb3/build-test.xml
===================================================================
--- trunk/ejb3/build-test.xml 2007-11-29 21:16:11 UTC (rev 67629)
+++ trunk/ejb3/build-test.xml 2007-11-29 21:53:19 UTC (rev 67630)
@@ -2200,6 +2200,10 @@
<target name="ejbthree1082" depends="compile-classes">
<build-simple-jar name="ejbthree1082"/>
</target>
+
+ <target name="ejbthree1119" depends="compile-classes">
+ <build-simple-jar name="ejbthree1119"/>
+ </target>
<target name="ejbthree1122" depends="compile-classes">
<build-simple-jar name="ejbthree1122"/>
@@ -3737,7 +3741,7 @@
ejbthree989, ejbthree1020, ejbthree1023, ejbthree1025, ejbthree1040,
ejbthree1057, ejbthree1060,
ejbthree1062,
- ejbthree1066, ejbthree1071, ejbthree1075, ejbthree1082, ejbthree1122,
+ ejbthree1066, ejbthree1071, ejbthree1075, ejbthree1082, ejbthree1119, ejbthree1122,
jaxws,
aspectdomain, ejbcontext, schema, mail, scopedclassloader, dependency,
securitydomain, enventry, security5,
@@ -4709,6 +4713,9 @@
<param name="test" value="ejbthree1082"/>
</antcall>
<antcall target="test" inheritRefs="true">
+ <param name="test" value="ejbthree1119"/>
+ </antcall>
+ <antcall target="test" inheritRefs="true">
<param name="test" value="ejbthree1122"/>
</antcall>
<antcall target="test" inheritRefs="true">
Added: trunk/ejb3/src/test/org/jboss/ejb3/test/ejbthree1119/TestBean.java
===================================================================
--- trunk/ejb3/src/test/org/jboss/ejb3/test/ejbthree1119/TestBean.java (rev 0)
+++ trunk/ejb3/src/test/org/jboss/ejb3/test/ejbthree1119/TestBean.java 2007-11-29 21:53:19 UTC (rev 67630)
@@ -0,0 +1,47 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2007, 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.ejbthree1119;
+
+import javax.ejb.Remote;
+import javax.ejb.Stateless;
+
+import org.jboss.ejb3.annotation.Pool;
+import org.jboss.ejb3.annotation.RemoteBinding;
+
+/**
+ * A Test EJB for EJBTHREE-1119
+ *
+ * @author <a href="mailto:andrew.rubinger at redhat.com">ALR</a>
+ * @version $Revision: $
+ */
+ at Stateless
+ at Remote(TestRemoteBusiness.class)
+ at RemoteBinding(jndiBinding = TestRemoteBusiness.JNDI_NAME)
+// Test this case for valid deployment, empty or null "value" on @Pool
+ at Pool(value = "")
+public class TestBean implements TestRemoteBusiness
+{
+ // Required Implementations
+ public void test()
+ {
+ }
+}
Property changes on: trunk/ejb3/src/test/org/jboss/ejb3/test/ejbthree1119/TestBean.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/ejb3/src/test/org/jboss/ejb3/test/ejbthree1119/TestRemoteBusiness.java
===================================================================
--- trunk/ejb3/src/test/org/jboss/ejb3/test/ejbthree1119/TestRemoteBusiness.java (rev 0)
+++ trunk/ejb3/src/test/org/jboss/ejb3/test/ejbthree1119/TestRemoteBusiness.java 2007-11-29 21:53:19 UTC (rev 67630)
@@ -0,0 +1,35 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2007, 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.ejbthree1119;
+
+/**
+ * Test Remote Business Interfaces for EJBTHREE-1119
+ *
+ * @author <a href="mailto:andrew.rubinger at redhat.com">ALR</a>
+ * @version $Revision: $
+ */
+public interface TestRemoteBusiness
+{
+ String JNDI_NAME = "TestBean/remote";;
+
+ void test();
+}
Property changes on: trunk/ejb3/src/test/org/jboss/ejb3/test/ejbthree1119/TestRemoteBusiness.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/ejb3/src/test/org/jboss/ejb3/test/ejbthree1119/unit/EmptyPoolValueUnitTestCase.java
===================================================================
--- trunk/ejb3/src/test/org/jboss/ejb3/test/ejbthree1119/unit/EmptyPoolValueUnitTestCase.java (rev 0)
+++ trunk/ejb3/src/test/org/jboss/ejb3/test/ejbthree1119/unit/EmptyPoolValueUnitTestCase.java 2007-11-29 21:53:19 UTC (rev 67630)
@@ -0,0 +1,85 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2007, 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.ejbthree1119.unit;
+
+import junit.framework.Test;
+
+import org.jboss.ejb3.test.ejbthree1119.TestRemoteBusiness;
+import org.jboss.test.JBossTestCase;
+
+/**
+ * Tests to ensure that a bean with the unspecified "value"
+ * attribute on @Pool is properly handled by the container and
+ * does not result in a Deployment Exception
+ *
+ * @author <a href="mailto:andrew.rubinger at redhat.com">ALR</a>
+ * @version $Revision: $
+ */
+public class EmptyPoolValueUnitTestCase extends JBossTestCase
+{
+ // Constructor
+ public EmptyPoolValueUnitTestCase(String name)
+ {
+ super(name);
+ }
+
+ // Suite
+ public static Test suite() throws Exception
+ {
+ return getDeploySetup(EmptyPoolValueUnitTestCase.class, "ejbthree1119.jar");
+ }
+
+ // Tests
+
+ /**
+ * Test the EJB
+ */
+ public void testEmptyPoolValue() throws Exception
+ {
+ // Initialize
+ TestRemoteBusiness test = null;
+
+ // Lookup
+ try
+ {
+ test = (TestRemoteBusiness) this.getInitialContext().lookup(TestRemoteBusiness.JNDI_NAME);
+ }
+ catch (Throwable t)
+ {
+ log.error(t);
+ JBossTestCase.fail(t.getMessage());
+ }
+ // Ensure lookup succeeds; bean is deployed
+ JBossTestCase.assertNotNull(test);
+
+ // Invoke
+ try
+ {
+ test.test();
+ }
+ catch (Throwable t)
+ {
+ log.error(t);
+ JBossTestCase.fail("Invocation failed: " + t.getMessage());
+ }
+ }
+}
Property changes on: trunk/ejb3/src/test/org/jboss/ejb3/test/ejbthree1119/unit/EmptyPoolValueUnitTestCase.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
More information about the jboss-cvs-commits
mailing list