[jboss-cvs] JBossAS SVN: r71334 - in projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1059: local and 2 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Thu Mar 27 01:09:42 EDT 2008
Author: ALRubinger
Date: 2008-03-27 01:09:42 -0400 (Thu, 27 Mar 2008)
New Revision: 71334
Added:
projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1059/local/
projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1059/local/AccessBean.java
projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1059/local/AccessRemoteBusiness.java
projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1059/local/TestBean.java
projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1059/local/TestLocal.java
projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1059/local/TestLocalBusiness.java
projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1059/local/TestLocalHome.java
projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1059/remote/
projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1059/remote/TestBean.java
projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1059/remote/TestRemote.java
projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1059/remote/TestRemoteBusiness.java
projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1059/remote/TestRemoteHome.java
Removed:
projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1059/AccessBean.java
projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1059/AccessRemoteBusiness.java
projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1059/TestBean.java
projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1059/TestLocal.java
projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1059/TestLocalBusiness.java
projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1059/TestLocalHome.java
projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1059/TestRemote.java
projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1059/TestRemoteBusiness.java
projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1059/TestRemoteHome.java
Modified:
projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1059/unit/NoBusinessInterfaceFromEjb21CreateUnitTestCase.java
Log:
[EJBTHREE-1059] Reworked Unit Tests for separate deployments, testing for failure of each
Deleted: projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1059/AccessBean.java
===================================================================
--- projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1059/AccessBean.java 2008-03-27 05:06:34 UTC (rev 71333)
+++ projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1059/AccessBean.java 2008-03-27 05:09:42 UTC (rev 71334)
@@ -1,87 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.ejb3.test.ejbthree1059;
-
-import javax.ejb.CreateException;
-import javax.ejb.EJB;
-import javax.ejb.EJBLocalHome;
-import javax.ejb.Remote;
-import javax.ejb.Stateless;
-
-import org.jboss.ejb3.annotation.RemoteBinding;
-
-/**
- * AccessBean
- *
- * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
- * @version $Revision: $
- */
- at Stateless
- at Remote(AccessRemoteBusiness.class)
- at RemoteBinding(jndiBinding = AccessRemoteBusiness.JNDI_NAME)
-public class AccessBean implements AccessRemoteBusiness
-{
-
- // Instance Members
- @EJB
- TestLocalHome localHome;
-
- // Required Implementations
-
- public void testValid()
- {
- // Obtain local instance
- TestLocal local = null;
- try
- {
- local = this.localHome.createValid();
- }
- catch (CreateException ce)
- {
- throw new RuntimeException(ce);
- }
-
- // Invoke
- local.test();
-
- }
-
- public void testInvalid()
- {
- // Attempt to create business interface from EJB21 create
- try
- {
- this.localHome.createInvalid();
- }
- catch (CreateException ce)
- {
- // Expected
- return;
- }
-
- // Invoke
- throw new RuntimeException("Business interface not have been created from " + EJBLocalHome.class.getName()
- + ".create<METHOD>()");
-
- }
-
-}
Deleted: projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1059/AccessRemoteBusiness.java
===================================================================
--- projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1059/AccessRemoteBusiness.java 2008-03-27 05:06:34 UTC (rev 71333)
+++ projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1059/AccessRemoteBusiness.java 2008-03-27 05:09:42 UTC (rev 71334)
@@ -1,37 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.ejb3.test.ejbthree1059;
-
-/**
- * AccessRemoteBusiness
- *
- * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
- * @version $Revision: $
- */
-public interface AccessRemoteBusiness
-{
- String JNDI_NAME = "Access/remote";
-
- void testValid();
-
- void testInvalid();
-}
Deleted: projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1059/TestBean.java
===================================================================
--- projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1059/TestBean.java 2008-03-27 05:06:34 UTC (rev 71333)
+++ projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1059/TestBean.java 2008-03-27 05:09:42 UTC (rev 71334)
@@ -1,60 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.ejb3.test.ejbthree1059;
-
-import javax.ejb.Local;
-import javax.ejb.LocalHome;
-import javax.ejb.Remote;
-import javax.ejb.RemoteHome;
-import javax.ejb.Stateful;
-
-import org.jboss.ejb3.annotation.LocalBinding;
-import org.jboss.ejb3.annotation.LocalHomeBinding;
-import org.jboss.ejb3.annotation.RemoteBinding;
-import org.jboss.ejb3.annotation.RemoteHomeBinding;
-
-/**
- * TestBean
- *
- * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
- * @version $Revision: $
- */
- at Stateful
- at Local(
-{TestLocal.class, TestLocalBusiness.class})
- at Remote(
-{TestRemote.class, TestRemoteBusiness.class})
- at LocalHome(TestLocalHome.class)
- at RemoteHome(TestRemoteHome.class)
- at LocalBinding(jndiBinding = TestLocalBusiness.JNDI_NAME)
- at RemoteBinding(jndiBinding = TestRemoteBusiness.JNDI_NAME)
- at LocalHomeBinding(jndiBinding = TestLocalHome.JNDI_NAME)
- at RemoteHomeBinding(jndiBinding = TestRemoteHome.JNDI_NAME)
-public class TestBean implements TestRemoteBusiness, TestLocalBusiness
-{
-
- // Required Implementations
- public void test()
- {
-
- }
-}
Deleted: projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1059/TestLocal.java
===================================================================
--- projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1059/TestLocal.java 2008-03-27 05:06:34 UTC (rev 71333)
+++ projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1059/TestLocal.java 2008-03-27 05:09:42 UTC (rev 71334)
@@ -1,35 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.ejb3.test.ejbthree1059;
-
-import javax.ejb.EJBLocalObject;
-
-/**
- * TestLocal
- *
- * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
- * @version $Revision: $
- */
-public interface TestLocal extends EJBLocalObject
-{
- void test();
-}
Deleted: projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1059/TestLocalBusiness.java
===================================================================
--- projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1059/TestLocalBusiness.java 2008-03-27 05:06:34 UTC (rev 71333)
+++ projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1059/TestLocalBusiness.java 2008-03-27 05:09:42 UTC (rev 71334)
@@ -1,35 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.ejb3.test.ejbthree1059;
-
-/**
- * TestLocalBusiness
- *
- * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
- * @version $Revision: $
- */
-public interface TestLocalBusiness
-{
- String JNDI_NAME = "Test/local";
-
- void test();
-}
Deleted: projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1059/TestLocalHome.java
===================================================================
--- projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1059/TestLocalHome.java 2008-03-27 05:06:34 UTC (rev 71333)
+++ projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1059/TestLocalHome.java 2008-03-27 05:09:42 UTC (rev 71334)
@@ -1,40 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.ejb3.test.ejbthree1059;
-
-import javax.ejb.CreateException;
-import javax.ejb.EJBLocalHome;
-
-/**
- * TestLocalHome
- *
- * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
- * @version $Revision: $
- */
-public interface TestLocalHome extends EJBLocalHome
-{
- String JNDI_NAME = "Test/localHome";
-
- TestLocal createValid() throws CreateException;
-
- TestLocalBusiness createInvalid() throws CreateException;
-}
Deleted: projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1059/TestRemote.java
===================================================================
--- projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1059/TestRemote.java 2008-03-27 05:06:34 UTC (rev 71333)
+++ projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1059/TestRemote.java 2008-03-27 05:09:42 UTC (rev 71334)
@@ -1,35 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.ejb3.test.ejbthree1059;
-
-import javax.ejb.EJBObject;
-
-/**
- * TestRemote
- *
- * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
- * @version $Revision: $
- */
-public interface TestRemote extends EJBObject
-{
- void test();
-}
Deleted: projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1059/TestRemoteBusiness.java
===================================================================
--- projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1059/TestRemoteBusiness.java 2008-03-27 05:06:34 UTC (rev 71333)
+++ projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1059/TestRemoteBusiness.java 2008-03-27 05:09:42 UTC (rev 71334)
@@ -1,35 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.ejb3.test.ejbthree1059;
-
-/**
- * TestRemoteBusiness
- *
- * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
- * @version $Revision: $
- */
-public interface TestRemoteBusiness
-{
- String JNDI_NAME = "Test/remote";
-
- void test();
-}
Deleted: projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1059/TestRemoteHome.java
===================================================================
--- projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1059/TestRemoteHome.java 2008-03-27 05:06:34 UTC (rev 71333)
+++ projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1059/TestRemoteHome.java 2008-03-27 05:09:42 UTC (rev 71334)
@@ -1,42 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.ejb3.test.ejbthree1059;
-
-import java.rmi.RemoteException;
-
-import javax.ejb.CreateException;
-import javax.ejb.EJBHome;
-
-/**
- * TestRemoteHome
- *
- * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
- * @version $Revision: $
- */
-public interface TestRemoteHome extends EJBHome
-{
- String JNDI_NAME = "Test/remoteHome";
-
- TestRemote createValid() throws RemoteException, CreateException;
-
- TestRemoteBusiness createInvalid() throws RemoteException, CreateException;
-}
Copied: projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1059/local/AccessBean.java (from rev 71326, projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1059/AccessBean.java)
===================================================================
--- projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1059/local/AccessBean.java (rev 0)
+++ projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1059/local/AccessBean.java 2008-03-27 05:09:42 UTC (rev 71334)
@@ -0,0 +1,87 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ejb3.test.ejbthree1059.local;
+
+import javax.ejb.CreateException;
+import javax.ejb.EJB;
+import javax.ejb.EJBLocalHome;
+import javax.ejb.Remote;
+import javax.ejb.Stateless;
+
+import org.jboss.ejb3.annotation.RemoteBinding;
+
+/**
+ * AccessBean
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+ at Stateless
+ at Remote(AccessRemoteBusiness.class)
+ at RemoteBinding(jndiBinding = AccessRemoteBusiness.JNDI_NAME)
+public class AccessBean implements AccessRemoteBusiness
+{
+
+ // Instance Members
+ @EJB
+ TestLocalHome localHome;
+
+ // Required Implementations
+
+ public void testValid()
+ {
+ // Obtain local instance
+ TestLocal local = null;
+ try
+ {
+ local = this.localHome.createValid();
+ }
+ catch (CreateException ce)
+ {
+ throw new RuntimeException(ce);
+ }
+
+ // Invoke
+ local.test();
+
+ }
+
+ public void testInvalid()
+ {
+ // Attempt to create business interface from EJB21 create
+ try
+ {
+ this.localHome.createInvalid();
+ }
+ catch (CreateException ce)
+ {
+ // Expected
+ return;
+ }
+
+ // Invoke
+ throw new RuntimeException("Business interface not have been created from " + EJBLocalHome.class.getName()
+ + ".create<METHOD>()");
+
+ }
+
+}
Property changes on: projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1059/local/AccessBean.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied: projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1059/local/AccessRemoteBusiness.java (from rev 71326, projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1059/AccessRemoteBusiness.java)
===================================================================
--- projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1059/local/AccessRemoteBusiness.java (rev 0)
+++ projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1059/local/AccessRemoteBusiness.java 2008-03-27 05:09:42 UTC (rev 71334)
@@ -0,0 +1,37 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ejb3.test.ejbthree1059.local;
+
+/**
+ * AccessRemoteBusiness
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+public interface AccessRemoteBusiness
+{
+ String JNDI_NAME = "Access/remote";
+
+ void testValid();
+
+ void testInvalid();
+}
Property changes on: projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1059/local/AccessRemoteBusiness.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied: projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1059/local/TestBean.java (from rev 71326, projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1059/TestBean.java)
===================================================================
--- projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1059/local/TestBean.java (rev 0)
+++ projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1059/local/TestBean.java 2008-03-27 05:09:42 UTC (rev 71334)
@@ -0,0 +1,51 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ejb3.test.ejbthree1059.local;
+
+import javax.ejb.Local;
+import javax.ejb.LocalHome;
+import javax.ejb.Stateful;
+
+import org.jboss.ejb3.annotation.LocalBinding;
+import org.jboss.ejb3.annotation.LocalHomeBinding;
+
+/**
+ * TestBean Local
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+ at Stateful
+ at Local(
+{TestLocal.class, TestLocalBusiness.class})
+ at LocalHome(TestLocalHome.class)
+ at LocalBinding(jndiBinding = TestLocalBusiness.JNDI_NAME)
+ at LocalHomeBinding(jndiBinding = TestLocalHome.JNDI_NAME)
+public class TestBean implements TestLocalBusiness
+{
+
+ // Required Implementations
+ public void test()
+ {
+
+ }
+}
Property changes on: projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1059/local/TestBean.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied: projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1059/local/TestLocal.java (from rev 71326, projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1059/TestLocal.java)
===================================================================
--- projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1059/local/TestLocal.java (rev 0)
+++ projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1059/local/TestLocal.java 2008-03-27 05:09:42 UTC (rev 71334)
@@ -0,0 +1,35 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ejb3.test.ejbthree1059.local;
+
+import javax.ejb.EJBLocalObject;
+
+/**
+ * TestLocal
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+public interface TestLocal extends EJBLocalObject
+{
+ void test();
+}
Property changes on: projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1059/local/TestLocal.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied: projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1059/local/TestLocalBusiness.java (from rev 71326, projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1059/TestLocalBusiness.java)
===================================================================
--- projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1059/local/TestLocalBusiness.java (rev 0)
+++ projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1059/local/TestLocalBusiness.java 2008-03-27 05:09:42 UTC (rev 71334)
@@ -0,0 +1,35 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ejb3.test.ejbthree1059.local;
+
+/**
+ * TestLocalBusiness
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+public interface TestLocalBusiness
+{
+ String JNDI_NAME = "Test/local";
+
+ void test();
+}
Property changes on: projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1059/local/TestLocalBusiness.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied: projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1059/local/TestLocalHome.java (from rev 71326, projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1059/TestLocalHome.java)
===================================================================
--- projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1059/local/TestLocalHome.java (rev 0)
+++ projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1059/local/TestLocalHome.java 2008-03-27 05:09:42 UTC (rev 71334)
@@ -0,0 +1,40 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ejb3.test.ejbthree1059.local;
+
+import javax.ejb.CreateException;
+import javax.ejb.EJBLocalHome;
+
+/**
+ * TestLocalHome
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+public interface TestLocalHome extends EJBLocalHome
+{
+ String JNDI_NAME = "Test/localHome";
+
+ TestLocal createValid() throws CreateException;
+
+ TestLocalBusiness createInvalid() throws CreateException;
+}
Property changes on: projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1059/local/TestLocalHome.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1059/remote/TestBean.java
===================================================================
--- projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1059/remote/TestBean.java (rev 0)
+++ projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1059/remote/TestBean.java 2008-03-27 05:09:42 UTC (rev 71334)
@@ -0,0 +1,51 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ejb3.test.ejbthree1059.remote;
+
+import javax.ejb.Remote;
+import javax.ejb.RemoteHome;
+import javax.ejb.Stateful;
+
+import org.jboss.ejb3.annotation.RemoteBinding;
+import org.jboss.ejb3.annotation.RemoteHomeBinding;
+
+/**
+ * TestBean Remote
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+ at Stateful
+ at Remote(
+{TestRemote.class, TestRemoteBusiness.class})
+ at RemoteHome(TestRemoteHome.class)
+ at RemoteBinding(jndiBinding = TestRemoteBusiness.JNDI_NAME)
+ at RemoteHomeBinding(jndiBinding = TestRemoteHome.JNDI_NAME)
+public class TestBean implements TestRemoteBusiness
+{
+
+ // Required Implementations
+ public void test()
+ {
+
+ }
+}
Property changes on: projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1059/remote/TestBean.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied: projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1059/remote/TestRemote.java (from rev 71326, projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1059/TestRemote.java)
===================================================================
--- projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1059/remote/TestRemote.java (rev 0)
+++ projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1059/remote/TestRemote.java 2008-03-27 05:09:42 UTC (rev 71334)
@@ -0,0 +1,35 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ejb3.test.ejbthree1059.remote;
+
+import javax.ejb.EJBObject;
+
+/**
+ * TestRemote
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+public interface TestRemote extends EJBObject
+{
+ void test();
+}
Property changes on: projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1059/remote/TestRemote.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied: projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1059/remote/TestRemoteBusiness.java (from rev 71326, projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1059/TestRemoteBusiness.java)
===================================================================
--- projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1059/remote/TestRemoteBusiness.java (rev 0)
+++ projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1059/remote/TestRemoteBusiness.java 2008-03-27 05:09:42 UTC (rev 71334)
@@ -0,0 +1,35 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ejb3.test.ejbthree1059.remote;
+
+/**
+ * TestRemoteBusiness
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+public interface TestRemoteBusiness
+{
+ String JNDI_NAME = "Test/remote";
+
+ void test();
+}
Property changes on: projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1059/remote/TestRemoteBusiness.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied: projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1059/remote/TestRemoteHome.java (from rev 71326, projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1059/TestRemoteHome.java)
===================================================================
--- projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1059/remote/TestRemoteHome.java (rev 0)
+++ projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1059/remote/TestRemoteHome.java 2008-03-27 05:09:42 UTC (rev 71334)
@@ -0,0 +1,42 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ejb3.test.ejbthree1059.remote;
+
+import java.rmi.RemoteException;
+
+import javax.ejb.CreateException;
+import javax.ejb.EJBHome;
+
+/**
+ * TestRemoteHome
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+public interface TestRemoteHome extends EJBHome
+{
+ String JNDI_NAME = "Test/remoteHome";
+
+ TestRemote createValid() throws RemoteException, CreateException;
+
+ TestRemoteBusiness createInvalid() throws RemoteException, CreateException;
+}
Property changes on: projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1059/remote/TestRemoteHome.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1059/unit/NoBusinessInterfaceFromEjb21CreateUnitTestCase.java
===================================================================
--- projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1059/unit/NoBusinessInterfaceFromEjb21CreateUnitTestCase.java 2008-03-27 05:06:34 UTC (rev 71333)
+++ projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1059/unit/NoBusinessInterfaceFromEjb21CreateUnitTestCase.java 2008-03-27 05:09:42 UTC (rev 71334)
@@ -21,12 +21,13 @@
*/
package org.jboss.ejb3.test.ejbthree1059.unit;
+import javax.naming.NameNotFoundException;
+
import junit.framework.Test;
import junit.framework.TestCase;
-import org.jboss.ejb3.test.ejbthree1059.AccessRemoteBusiness;
-import org.jboss.ejb3.test.ejbthree1059.TestRemoteBusiness;
-import org.jboss.ejb3.test.ejbthree1059.TestRemoteHome;
+import org.jboss.ejb3.test.ejbthree1059.local.AccessRemoteBusiness;
+import org.jboss.ejb3.test.ejbthree1059.remote.TestRemoteHome;
import org.jboss.test.JBossTestCase;
/**
@@ -45,37 +46,44 @@
public static Test suite() throws Exception
{
- return getDeploySetup(NoBusinessInterfaceFromEjb21CreateUnitTestCase.class, "ejbthree1059.jar");
+ return getDeploySetup(NoBusinessInterfaceFromEjb21CreateUnitTestCase.class,
+ "ejbthree1059-local.jar,ejbthree1059-remote.jar");
}
public void testRemoteBusinessFromEjb21CreateFails() throws Exception
{
- // Obtain Home
- TestRemoteHome home = (TestRemoteHome) this.getInitialContext().lookup(TestRemoteHome.JNDI_NAME);
+ // Attempt to obtain remote home to invalid remote deployment
+ try
+ {
+ this.getInitialContext().lookup(TestRemoteHome.JNDI_NAME);
+ }
+ // Expected
+ catch (NameNotFoundException nnfe)
+ {
+ return;
+ }
- // Attempt an invalid creation
- home.createInvalid();
+ TestCase.fail(NameNotFoundException.class.getName() + " expeced to be thrown");
}
public void testLocalBusinessFromEjb21CreateFails() throws Exception
{
- // Obtain access bean
- AccessRemoteBusiness access = (AccessRemoteBusiness) this.getInitialContext().lookup(
- AccessRemoteBusiness.JNDI_NAME);
-
- // Attempt invalid creation
+ // Attempt to obtain AccessBean to invalid local deployment
try
{
- access.testInvalid();
+ this.getInitialContext().lookup(AccessRemoteBusiness.JNDI_NAME);
}
- catch (Exception e)
+ // Expected
+ catch (NameNotFoundException nnfe)
{
- TestCase.fail(e.getMessage());
+ return;
}
+ TestCase.fail(NameNotFoundException.class.getName() + " expeced to be thrown");
+
}
}
More information about the jboss-cvs-commits
mailing list