[jboss-cvs] JBossAS SVN: r74072 - in projects/ejb3/trunk/proxy/src/test: java/org/jboss/ejb3/test/proxy/common/ejb/slsb and 2 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Wed Jun 4 00:21:30 EDT 2008
Author: ALRubinger
Date: 2008-06-04 00:21:30 -0400 (Wed, 04 Jun 2008)
New Revision: 74072
Added:
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/common/ejb/sfsb/MyStateful2xOnlyBean.java
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/common/ejb/sfsb/MyStateful30OnlyBean.java
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/common/ejb/sfsb/MyStatefulBeanBase.java
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/common/ejb/slsb/MyStateless2xOnlyBean.java
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/common/ejb/slsb/MyStateless30OnlyBean.java
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/session/unit/ProxyStatefulSession2xOnlyTestCase.java
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/session/unit/ProxyStatefulSession30OnlyTestCase.java
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/session/unit/ProxyStatelessSession2xOnlyTestCase.java
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/session/unit/ProxyStatelessSession30OnlyTestCase.java
projects/ejb3/trunk/proxy/src/test/resources/org/jboss/ejb3/test/proxy/session/unit/ProxyStatefulSession2xOnlyTestCase-beans.xml
projects/ejb3/trunk/proxy/src/test/resources/org/jboss/ejb3/test/proxy/session/unit/ProxyStatefulSession30OnlyTestCase-beans.xml
projects/ejb3/trunk/proxy/src/test/resources/org/jboss/ejb3/test/proxy/session/unit/ProxyStatelessSession2xOnlyTestCase-beans.xml
projects/ejb3/trunk/proxy/src/test/resources/org/jboss/ejb3/test/proxy/session/unit/ProxyStatelessSession30OnlyTestCase-beans.xml
Modified:
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/common/ejb/sfsb/MyStatefulBean.java
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/common/ejb/sfsb/MyStatefulLocalBusiness.java
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/common/ejb/sfsb/MyStatefulRemoteBusiness.java
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/common/ejb/slsb/MyStatelessBean.java
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/common/ejb/slsb/MyStatelessLocal.java
projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/common/ejb/slsb/MyStatelessRemote.java
Log:
[EJBTHREE-1398] Added Tests for EJB3-Only and EJB2.x-Only Views
Added: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/common/ejb/sfsb/MyStateful2xOnlyBean.java
===================================================================
--- projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/common/ejb/sfsb/MyStateful2xOnlyBean.java (rev 0)
+++ projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/common/ejb/sfsb/MyStateful2xOnlyBean.java 2008-06-04 04:21:30 UTC (rev 74072)
@@ -0,0 +1,45 @@
+/*
+ * 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.proxy.common.ejb.sfsb;
+
+import javax.ejb.LocalHome;
+import javax.ejb.RemoteHome;
+import javax.ejb.Stateful;
+
+/**
+ * MyStatefulBean
+ *
+ * A Mock SFSB with only EJB2.x Views
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+ at Stateful
+ at LocalHome(MyStatefulLocalHome.class)
+ at RemoteHome(MyStatefulRemoteHome.class)
+public class MyStateful2xOnlyBean extends MyStatefulBeanBase
+ implements
+ MyStatefulLocalBusiness,
+ MyStatefulRemoteBusiness
+{
+ // Business Logic in Base
+}
Added: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/common/ejb/sfsb/MyStateful30OnlyBean.java
===================================================================
--- projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/common/ejb/sfsb/MyStateful30OnlyBean.java (rev 0)
+++ projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/common/ejb/sfsb/MyStateful30OnlyBean.java 2008-06-04 04:21:30 UTC (rev 74072)
@@ -0,0 +1,45 @@
+/*
+ * 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.proxy.common.ejb.sfsb;
+
+import javax.ejb.Local;
+import javax.ejb.Remote;
+import javax.ejb.Stateful;
+
+/**
+ * MyStatefulBean
+ *
+ * A Mock SFSB with only EJB3 Views
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+ at Stateful
+ at Local(MyStatefulLocalBusiness.class)
+ at Remote(MyStatefulRemoteBusiness.class)
+public class MyStateful30OnlyBean extends MyStatefulBeanBase
+ implements
+ MyStatefulLocalBusiness,
+ MyStatefulRemoteBusiness
+{
+ // Business Logic in Base
+}
Modified: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/common/ejb/sfsb/MyStatefulBean.java
===================================================================
--- projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/common/ejb/sfsb/MyStatefulBean.java 2008-06-04 04:10:43 UTC (rev 74071)
+++ projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/common/ejb/sfsb/MyStatefulBean.java 2008-06-04 04:21:30 UTC (rev 74072)
@@ -21,7 +21,9 @@
*/
package org.jboss.ejb3.test.proxy.common.ejb.sfsb;
+import javax.ejb.Local;
import javax.ejb.LocalHome;
+import javax.ejb.Remote;
import javax.ejb.RemoteHome;
import javax.ejb.Stateful;
@@ -36,30 +38,9 @@
@Stateful
@LocalHome(MyStatefulLocalHome.class)
@RemoteHome(MyStatefulRemoteHome.class)
-public class MyStatefulBean implements MyStatefulLocalBusiness, MyStatefulRemoteBusiness
+ at Local(MyStatefulLocalBusiness.class)
+ at Remote(MyStatefulRemoteBusiness.class)
+public class MyStatefulBean extends MyStatefulBeanBase implements MyStatefulLocalBusiness, MyStatefulRemoteBusiness
{
- // --------------------------------------------------------------------------------||
- // Instance Members ---------------------------------------------------------------||
- // --------------------------------------------------------------------------------||
-
- /**
- * The internal counter
- */
- private int counter = 0;
-
- // --------------------------------------------------------------------------------||
- // Required Implementations -------------------------------------------------------||
- // --------------------------------------------------------------------------------||
-
- /**
- * Returns the next number in the counter. The first
- * invocation will return 0, and every subsequent invocation
- * will increment the internal counter by 1.
- *
- * @return
- */
- public int getNextCounter()
- {
- return this.counter++;
- }
+ // Business Logic in Base
}
Added: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/common/ejb/sfsb/MyStatefulBeanBase.java
===================================================================
--- projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/common/ejb/sfsb/MyStatefulBeanBase.java (rev 0)
+++ projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/common/ejb/sfsb/MyStatefulBeanBase.java 2008-06-04 04:21:30 UTC (rev 74072)
@@ -0,0 +1,58 @@
+/*
+ * 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.proxy.common.ejb.sfsb;
+
+/**
+ * MyStatefulBeanBase
+ *
+ * Base containing business logic for the Mock SFSB
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+public class MyStatefulBeanBase implements MyStatefulLocalBusiness, MyStatefulRemoteBusiness
+{
+ // --------------------------------------------------------------------------------||
+ // Instance Members ---------------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ /**
+ * The internal counter
+ */
+ private int counter = 0;
+
+ // --------------------------------------------------------------------------------||
+ // Required Implementations -------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ /**
+ * Returns the next number in the counter. The first
+ * invocation will return 0, and every subsequent invocation
+ * will increment the internal counter by 1.
+ *
+ * @return
+ */
+ public int getNextCounter()
+ {
+ return this.counter++;
+ }
+}
Modified: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/common/ejb/sfsb/MyStatefulLocalBusiness.java
===================================================================
--- projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/common/ejb/sfsb/MyStatefulLocalBusiness.java 2008-06-04 04:10:43 UTC (rev 74071)
+++ projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/common/ejb/sfsb/MyStatefulLocalBusiness.java 2008-06-04 04:21:30 UTC (rev 74072)
@@ -21,15 +21,12 @@
*/
package org.jboss.ejb3.test.proxy.common.ejb.sfsb;
-import javax.ejb.Local;
-
/**
* MyStatefulLocalBusiness
*
* @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
* @version $Revision: $
*/
- at Local
public interface MyStatefulLocalBusiness extends MyStateful
{
Modified: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/common/ejb/sfsb/MyStatefulRemoteBusiness.java
===================================================================
--- projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/common/ejb/sfsb/MyStatefulRemoteBusiness.java 2008-06-04 04:10:43 UTC (rev 74071)
+++ projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/common/ejb/sfsb/MyStatefulRemoteBusiness.java 2008-06-04 04:21:30 UTC (rev 74072)
@@ -21,16 +21,12 @@
*/
package org.jboss.ejb3.test.proxy.common.ejb.sfsb;
-import javax.ejb.Remote;
-
-
/**
* MyStatefulRemoteBusiness
*
* @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
* @version $Revision: $
*/
- at Remote
public interface MyStatefulRemoteBusiness extends MyStateful
{
Added: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/common/ejb/slsb/MyStateless2xOnlyBean.java
===================================================================
--- projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/common/ejb/slsb/MyStateless2xOnlyBean.java (rev 0)
+++ projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/common/ejb/slsb/MyStateless2xOnlyBean.java 2008-06-04 04:21:30 UTC (rev 74072)
@@ -0,0 +1,43 @@
+/*
+ * 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.proxy.common.ejb.slsb;
+
+import javax.ejb.LocalHome;
+import javax.ejb.RemoteHome;
+import javax.ejb.Stateless;
+
+/**
+ * SLSB with only EJB2.x Views
+ *
+ * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
+ * @version $Revision: $
+ */
+ at Stateless
+ at LocalHome(MyStatelessLocalHome.class)
+ at RemoteHome(MyStatelessRemoteHome.class)
+public class MyStateless2xOnlyBean implements MyStatelessLocal, MyStatelessRemote
+{
+ public String sayHi(String name)
+ {
+ return "Hi " + name;
+ }
+}
Added: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/common/ejb/slsb/MyStateless30OnlyBean.java
===================================================================
--- projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/common/ejb/slsb/MyStateless30OnlyBean.java (rev 0)
+++ projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/common/ejb/slsb/MyStateless30OnlyBean.java 2008-06-04 04:21:30 UTC (rev 74072)
@@ -0,0 +1,43 @@
+/*
+ * 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.proxy.common.ejb.slsb;
+
+import javax.ejb.Local;
+import javax.ejb.Remote;
+import javax.ejb.Stateless;
+
+/**
+ * SLSB with only EJB3 Views
+ *
+ * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
+ * @version $Revision: $
+ */
+ at Stateless
+ at Local(MyStatelessLocal.class)
+ at Remote(MyStatelessRemote.class)
+public class MyStateless30OnlyBean implements MyStatelessLocal, MyStatelessRemote
+{
+ public String sayHi(String name)
+ {
+ return "Hi " + name;
+ }
+}
Modified: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/common/ejb/slsb/MyStatelessBean.java
===================================================================
--- projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/common/ejb/slsb/MyStatelessBean.java 2008-06-04 04:10:43 UTC (rev 74071)
+++ projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/common/ejb/slsb/MyStatelessBean.java 2008-06-04 04:21:30 UTC (rev 74072)
@@ -21,7 +21,9 @@
*/
package org.jboss.ejb3.test.proxy.common.ejb.slsb;
+import javax.ejb.Local;
import javax.ejb.LocalHome;
+import javax.ejb.Remote;
import javax.ejb.RemoteHome;
import javax.ejb.Stateless;
@@ -32,6 +34,8 @@
@Stateless
@LocalHome(MyStatelessLocalHome.class)
@RemoteHome(MyStatelessRemoteHome.class)
+ at Local(MyStatelessLocal.class)
+ at Remote(MyStatelessRemote.class)
public class MyStatelessBean implements MyStatelessLocal, MyStatelessRemote
{
public String sayHi(String name)
Modified: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/common/ejb/slsb/MyStatelessLocal.java
===================================================================
--- projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/common/ejb/slsb/MyStatelessLocal.java 2008-06-04 04:10:43 UTC (rev 74071)
+++ projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/common/ejb/slsb/MyStatelessLocal.java 2008-06-04 04:21:30 UTC (rev 74072)
@@ -21,13 +21,10 @@
*/
package org.jboss.ejb3.test.proxy.common.ejb.slsb;
-import javax.ejb.Local;
-
/**
* @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
* @version $Revision: $
*/
- at Local
public interface MyStatelessLocal extends MyStateless
{
Modified: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/common/ejb/slsb/MyStatelessRemote.java
===================================================================
--- projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/common/ejb/slsb/MyStatelessRemote.java 2008-06-04 04:10:43 UTC (rev 74071)
+++ projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/common/ejb/slsb/MyStatelessRemote.java 2008-06-04 04:21:30 UTC (rev 74072)
@@ -21,13 +21,10 @@
*/
package org.jboss.ejb3.test.proxy.common.ejb.slsb;
-import javax.ejb.Remote;
-
/**
* @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
* @version $Revision: $
*/
- at Remote
public interface MyStatelessRemote extends MyStateless
{
Added: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/session/unit/ProxyStatefulSession2xOnlyTestCase.java
===================================================================
--- projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/session/unit/ProxyStatefulSession2xOnlyTestCase.java (rev 0)
+++ projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/session/unit/ProxyStatefulSession2xOnlyTestCase.java 2008-06-04 04:21:30 UTC (rev 74072)
@@ -0,0 +1,124 @@
+/*
+ * 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.proxy.session.unit;
+
+import static org.junit.Assert.assertTrue;
+
+import javax.naming.Context;
+import javax.naming.InitialContext;
+
+import org.jboss.ejb3.common.registrar.spi.Ejb3RegistrarLocator;
+import org.jboss.ejb3.test.proxy.common.Utils;
+import org.jboss.ejb3.test.proxy.common.container.StatefulContainer;
+import org.jboss.ejb3.test.proxy.common.ejb.sfsb.MyStateful2xOnlyBean;
+import org.jboss.ejb3.test.proxy.common.ejb.sfsb.MyStatefulLocalHome;
+import org.jboss.ejb3.test.proxy.common.ejb.sfsb.MyStatefulRemoteHome;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * ProxyStatefulSessionTestCase
+ *
+ * Test Cases to ensure proper invocation of SFSBs with
+ * only EJB2.x Views exposed
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+public class ProxyStatefulSession2xOnlyTestCase extends ProxySessionTestCaseBase
+{
+
+ // --------------------------------------------------------------------------------||
+ // Class Members ------------------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ /**
+ * JNDI Context
+ */
+ private static Context context;
+
+ // --------------------------------------------------------------------------------||
+ // Tests --------------------------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ /**
+ * Test Local Home Binding
+ *
+ * @throws Exception
+ */
+ @Test
+ public void testLocalHome() throws Exception
+ {
+ Object bean = ProxyStatefulSession2xOnlyTestCase.context.lookup("MyStateful2xOnlyBean/localHome");
+ assertTrue(bean instanceof MyStatefulLocalHome);
+ }
+
+ /**
+ * Test Remote Home Binding
+ *
+ * @throws Exception
+ */
+ @Test
+ public void testRemoteHome() throws Exception
+ {
+ Object bean = ProxyStatefulSession2xOnlyTestCase.context.lookup("MyStateful2xOnlyBean/home");
+ assertTrue(bean instanceof MyStatefulRemoteHome);
+ }
+
+ // --------------------------------------------------------------------------------||
+ // Lifecycle Methods --------------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ /**
+ * Perform setup before any tests
+ *
+ * @throws Throwable
+ */
+ @BeforeClass
+ public static void setUpBeforeClass() throws Throwable
+ {
+ // Create Bootstrap
+ ProxySessionTestCaseBase.setUpBeforeClass();
+
+ // Deploy MC Beans
+ ProxyStatefulSession2xOnlyTestCase.bootstrap.deploy(ProxyStatefulSession2xOnlyTestCase.class);
+
+ // Create a SLSB
+ StatefulContainer container = Utils.createSfsb(MyStateful2xOnlyBean.class);
+
+ // Install
+ Ejb3RegistrarLocator.locateRegistrar().bind(container.getName(), container);
+
+ // Create JNDI Context
+ ProxyStatefulSession2xOnlyTestCase.context = new InitialContext(); // Props from CP jndi.properties
+
+ }
+
+ @AfterClass
+ public static void tearDownAfterClass() throws Exception
+ {
+ if (bootstrap != null)
+ bootstrap.shutdown();
+ bootstrap = null;
+ }
+}
Added: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/session/unit/ProxyStatefulSession30OnlyTestCase.java
===================================================================
--- projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/session/unit/ProxyStatefulSession30OnlyTestCase.java (rev 0)
+++ projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/session/unit/ProxyStatefulSession30OnlyTestCase.java 2008-06-04 04:21:30 UTC (rev 74072)
@@ -0,0 +1,207 @@
+/*
+ * 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.proxy.session.unit;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import javax.naming.Context;
+import javax.naming.InitialContext;
+
+import junit.framework.TestCase;
+
+import org.jboss.ejb3.common.registrar.spi.Ejb3RegistrarLocator;
+import org.jboss.ejb3.test.proxy.common.Utils;
+import org.jboss.ejb3.test.proxy.common.container.StatefulContainer;
+import org.jboss.ejb3.test.proxy.common.ejb.sfsb.MyStateful30OnlyBean;
+import org.jboss.ejb3.test.proxy.common.ejb.sfsb.MyStatefulLocalBusiness;
+import org.jboss.ejb3.test.proxy.common.ejb.sfsb.MyStatefulRemoteBusiness;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * ProxyStatefulSession30OnlyTestCase
+ *
+ * Test Cases to ensure proper invocation of SFSBs with
+ * only EJB3 Views exposed
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+public class ProxyStatefulSession30OnlyTestCase extends ProxySessionTestCaseBase
+{
+
+ // --------------------------------------------------------------------------------||
+ // Class Members ------------------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ /**
+ * JNDI Context
+ */
+ private static Context context;
+
+ // --------------------------------------------------------------------------------||
+ // Tests --------------------------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ /**
+ * Test Local Business Binding and Invocation
+ *
+ * @throws Exception
+ */
+ @Test
+ public void testLocalBusiness() throws Exception
+ {
+ // Obtain the Proxy
+ Object bean = ProxyStatefulSession30OnlyTestCase.context.lookup("MyStateful30OnlyBean/local");
+ assertTrue("Bean must be assignable to " + MyStatefulLocalBusiness.class.getSimpleName() + " but was instead "
+ + bean.getClass(), bean instanceof MyStatefulLocalBusiness);
+
+ // Invoke and Test Result
+ int result = ((MyStatefulLocalBusiness) bean).getNextCounter();
+ assertEquals(result, 0);
+ }
+
+ /**
+ * Test Local Business Binding and Invocation
+ * to a specific interface
+ *
+ * @throws Exception
+ */
+ @Test
+ public void testLocalBusinessSpecificInterface() throws Exception
+ {
+ // Obtain the Proxy
+ Object bean = ProxyStatefulSession30OnlyTestCase.context.lookup("MyStateful30OnlyBean/local-"
+ + MyStatefulLocalBusiness.class.getName());
+ assertTrue("Bean must be assignable to " + MyStatefulLocalBusiness.class.getSimpleName() + " but was instead "
+ + bean.getClass(), bean instanceof MyStatefulLocalBusiness);
+
+ // Invoke and Test Result
+ int result = ((MyStatefulLocalBusiness) bean).getNextCounter();
+ assertEquals(result, 0);
+ }
+
+ /**
+ * Test Remote Business Binding and Invocation
+ *
+ * @throws Exception
+ */
+ @Test
+ public void testRemoteBusiness() throws Exception
+ {
+ // Obtain the Proxy
+ Object bean = ProxyStatefulSession30OnlyTestCase.context.lookup("MyStateful30OnlyBean/remote");
+ assertTrue("Bean must be assignable to " + MyStatefulRemoteBusiness.class.getSimpleName() + " but was instead "
+ + bean.getClass(), bean instanceof MyStatefulRemoteBusiness);
+
+ // Invoke and Test Result
+ int result = ((MyStatefulRemoteBusiness) bean).getNextCounter();
+ assertEquals(result, 0);
+ }
+
+ /**
+ * Test Remote Business Binding and Invocation
+ * to a specific interface
+ *
+ * @throws Exception
+ */
+ @Test
+ public void testRemoteBusinessSpecificInterface() throws Exception
+ {
+ // Obtain the Proxy
+ Object bean = ProxyStatefulSession30OnlyTestCase.context.lookup("MyStateful30OnlyBean/remote-"
+ + MyStatefulRemoteBusiness.class.getName());
+ assertTrue("Bean must be assignable to " + MyStatefulRemoteBusiness.class.getSimpleName() + " but was instead "
+ + bean.getClass(), bean instanceof MyStatefulRemoteBusiness);
+
+ // Invoke and Test Result
+ int result = ((MyStatefulRemoteBusiness) bean).getNextCounter();
+ assertEquals(result, 0);
+ }
+
+ /**
+ * Tests that SFSB Proxies invoke within
+ * the scope of their own session only
+ *
+ * @throws Exception
+ */
+ @Test
+ public void testSessionScoping() throws Exception
+ {
+ // Lookup 2 Instances
+ MyStatefulLocalBusiness bean1 = (MyStatefulLocalBusiness) ProxyStatefulSession30OnlyTestCase.context
+ .lookup("MyStateful30OnlyBean/local");
+ MyStatefulLocalBusiness bean2 = (MyStatefulLocalBusiness) ProxyStatefulSession30OnlyTestCase.context
+ .lookup("MyStateful30OnlyBean/local");
+
+ // Invoke continuously on instance one 10 times to ensure that the SFSB counter increments properly
+ for (int counter = 0; counter < 10; counter++)
+ {
+ // Invoke
+ int result = bean1.getNextCounter();
+ TestCase.assertEquals("SFSB invocations should have memory of the session", counter, result);
+ }
+
+ // Invoke once on instance two to ensure its scope is separate from that of instance one
+ TestCase
+ .assertEquals("SFSB Session Scopes must not be shared between Proxy instances", 0, bean2.getNextCounter());
+ }
+
+ // --------------------------------------------------------------------------------||
+ // Lifecycle Methods --------------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ /**
+ * Perform setup before any tests
+ *
+ * @throws Throwable
+ */
+ @BeforeClass
+ public static void setUpBeforeClass() throws Throwable
+ {
+ // Create Bootstrap
+ ProxySessionTestCaseBase.setUpBeforeClass();
+
+ // Deploy MC Beans
+ ProxyStatefulSession30OnlyTestCase.bootstrap.deploy(ProxyStatefulSession30OnlyTestCase.class);
+
+ // Create a SLSB
+ StatefulContainer container = Utils.createSfsb(MyStateful30OnlyBean.class);
+
+ // Install
+ Ejb3RegistrarLocator.locateRegistrar().bind(container.getName(), container);
+
+ // Create JNDI Context
+ ProxyStatefulSession30OnlyTestCase.context = new InitialContext(); // Props from CP jndi.properties
+
+ }
+
+ @AfterClass
+ public static void tearDownAfterClass() throws Exception
+ {
+ if (bootstrap != null)
+ bootstrap.shutdown();
+ bootstrap = null;
+ }
+}
Added: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/session/unit/ProxyStatelessSession2xOnlyTestCase.java
===================================================================
--- projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/session/unit/ProxyStatelessSession2xOnlyTestCase.java (rev 0)
+++ projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/session/unit/ProxyStatelessSession2xOnlyTestCase.java 2008-06-04 04:21:30 UTC (rev 74072)
@@ -0,0 +1,100 @@
+/*
+ * 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.proxy.session.unit;
+
+import static org.junit.Assert.assertTrue;
+
+import javax.naming.InitialContext;
+
+import org.jboss.ejb3.common.registrar.spi.Ejb3RegistrarLocator;
+import org.jboss.ejb3.test.proxy.common.Utils;
+import org.jboss.ejb3.test.proxy.common.container.StatelessContainer;
+import org.jboss.ejb3.test.proxy.common.ejb.slsb.MyStateless2xOnlyBean;
+import org.jboss.ejb3.test.proxy.common.ejb.slsb.MyStatelessLocalHome;
+import org.jboss.ejb3.test.proxy.common.ejb.slsb.MyStatelessRemoteHome;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
+ * @version $Revision: $
+ */
+public class ProxyStatelessSession2xOnlyTestCase extends ProxySessionTestCaseBase
+{
+
+ // --------------------------------------------------------------------------------||
+ // Tests --------------------------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ @Test
+ public void testLocalHome() throws Exception
+ {
+ InitialContext ctx = new InitialContext();
+
+ Object bean = ctx.lookup("MyStateless2xOnlyBean/localHome");
+ assertTrue(bean instanceof MyStatelessLocalHome);
+ }
+
+ @Test
+ public void testRemoteHome() throws Exception
+ {
+ InitialContext ctx = new InitialContext();
+
+ Object bean = ctx.lookup("MyStateless2xOnlyBean/home");
+ assertTrue(bean instanceof MyStatelessRemoteHome);
+ }
+
+ // --------------------------------------------------------------------------------||
+ // Lifecycle Methods --------------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ /**
+ * Perform setup before any tests
+ *
+ * @throws Throwable
+ */
+ @BeforeClass
+ public static void setUpBeforeClass() throws Throwable
+ {
+ // Create Bootstrap and Deploy
+ ProxySessionTestCaseBase.setUpBeforeClass();
+
+ // Deploy MC Beans
+ ProxyStatelessSession2xOnlyTestCase.bootstrap.deploy(ProxyStatelessSession2xOnlyTestCase.class);
+
+ // Create a SLSB
+ StatelessContainer container = Utils.createSlsb(MyStateless2xOnlyBean.class);
+
+ // Install
+ Ejb3RegistrarLocator.locateRegistrar().bind(container.getName(), container);
+
+ }
+
+ @AfterClass
+ public static void tearDownAfterClass() throws Exception
+ {
+ if (bootstrap != null)
+ bootstrap.shutdown();
+ bootstrap = null;
+ }
+}
Added: projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/session/unit/ProxyStatelessSession30OnlyTestCase.java
===================================================================
--- projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/session/unit/ProxyStatelessSession30OnlyTestCase.java (rev 0)
+++ projects/ejb3/trunk/proxy/src/test/java/org/jboss/ejb3/test/proxy/session/unit/ProxyStatelessSession30OnlyTestCase.java 2008-06-04 04:21:30 UTC (rev 74072)
@@ -0,0 +1,131 @@
+/*
+ * 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.proxy.session.unit;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import javax.naming.InitialContext;
+
+import org.jboss.ejb3.common.registrar.spi.Ejb3RegistrarLocator;
+import org.jboss.ejb3.test.proxy.common.Utils;
+import org.jboss.ejb3.test.proxy.common.container.StatelessContainer;
+import org.jboss.ejb3.test.proxy.common.ejb.slsb.MyStateless30OnlyBean;
+import org.jboss.ejb3.test.proxy.common.ejb.slsb.MyStatelessLocal;
+import org.jboss.ejb3.test.proxy.common.ejb.slsb.MyStatelessRemote;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
+ * @version $Revision: $
+ */
+public class ProxyStatelessSession30OnlyTestCase extends ProxySessionTestCaseBase
+{
+
+ // --------------------------------------------------------------------------------||
+ // Tests --------------------------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ @Test
+ public void testLocal() throws Exception
+ {
+ InitialContext ctx = new InitialContext();
+
+ Object bean = ctx.lookup("MyStateless30OnlyBean/local");
+ assertTrue(bean instanceof MyStatelessLocal);
+
+ String result = ((MyStatelessLocal) bean).sayHi("testLocal");
+ assertEquals("Hi testLocal", result);
+ }
+
+ @Test
+ public void testLocalSpecificInterface() throws Exception
+ {
+ InitialContext ctx = new InitialContext();
+
+ Object bean = ctx.lookup("MyStateless30OnlyBean/local-" + MyStatelessLocal.class.getName());
+ assertTrue(bean instanceof MyStatelessLocal);
+
+ String result = ((MyStatelessLocal) bean).sayHi("testLocal");
+ assertEquals("Hi testLocal", result);
+ }
+
+ @Test
+ public void testRemote() throws Exception
+ {
+ InitialContext ctx = new InitialContext();
+
+ Object bean = ctx.lookup("MyStateless30OnlyBean/remote");
+ assertTrue(bean instanceof MyStatelessRemote);
+
+ String result = ((MyStatelessRemote) bean).sayHi("testRemote");
+ assertEquals("Hi testRemote", result);
+ }
+
+ @Test
+ public void testRemoteSpecificInterface() throws Exception
+ {
+ InitialContext ctx = new InitialContext();
+
+ Object bean = ctx.lookup("MyStateless30OnlyBean/remote-" + MyStatelessRemote.class.getName());
+ assertTrue(bean instanceof MyStatelessRemote);
+
+ String result = ((MyStatelessRemote) bean).sayHi("testRemote");
+ assertEquals("Hi testRemote", result);
+ }
+
+ // --------------------------------------------------------------------------------||
+ // Lifecycle Methods --------------------------------------------------------------||
+ // --------------------------------------------------------------------------------||
+
+ /**
+ * Perform setup before any tests
+ *
+ * @throws Throwable
+ */
+ @BeforeClass
+ public static void setUpBeforeClass() throws Throwable
+ {
+ // Create Bootstrap and Deploy
+ ProxySessionTestCaseBase.setUpBeforeClass();
+
+ // Deploy MC Beans
+ ProxyStatelessSession30OnlyTestCase.bootstrap.deploy(ProxyStatelessSession30OnlyTestCase.class);
+
+ // Create a SLSB
+ StatelessContainer container = Utils.createSlsb(MyStateless30OnlyBean.class);
+
+ // Install
+ Ejb3RegistrarLocator.locateRegistrar().bind(container.getName(), container);
+
+ }
+
+ @AfterClass
+ public static void tearDownAfterClass() throws Exception
+ {
+ if (bootstrap != null)
+ bootstrap.shutdown();
+ bootstrap = null;
+ }
+}
Added: projects/ejb3/trunk/proxy/src/test/resources/org/jboss/ejb3/test/proxy/session/unit/ProxyStatefulSession2xOnlyTestCase-beans.xml
===================================================================
--- projects/ejb3/trunk/proxy/src/test/resources/org/jboss/ejb3/test/proxy/session/unit/ProxyStatefulSession2xOnlyTestCase-beans.xml (rev 0)
+++ projects/ejb3/trunk/proxy/src/test/resources/org/jboss/ejb3/test/proxy/session/unit/ProxyStatefulSession2xOnlyTestCase-beans.xml 2008-06-04 04:21:30 UTC (rev 74072)
@@ -0,0 +1,77 @@
+<deployment xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="urn:jboss:bean-deployer:2.0 bean-deployer_2_0.xsd"
+ xmlns="urn:jboss:bean-deployer:2.0">
+
+ <!--
+
+ JNDI
+
+ The requisite Naming Server
+
+ -->
+ <bean name="NameServer" class="org.jnp.server.SingletonNamingServer" />
+
+ <!--
+
+ JNDI Registrars
+
+
+ The JNDI Registrar is responsible for all JNDI Bindings for
+ an EJB. Its constructor takes the following arguments, in order:
+
+ javax.naming.Context (JNDI Context into which to bind objects)
+ org.jboss.ejb3.proxy.spi.registry.ProxyFactoryRegistry (Implementation of ProxyFactoryRegistry)
+ String statelessSessionProxyObjectFactoryType The JNDI ObjectFactory implementation to use for SLSB
+ ...more later when SFSB, @Service, MDB Implemented
+
+ -->
+
+ <!-- SFSB JNDI Registrar -->
+ <bean name="org.jboss.ejb3.JndiRegistrar.Session.SFSBJndiRegistrar"
+ class="org.jboss.ejb3.proxy.jndiregistrar.JndiStatefulSessionRegistrar">
+ <constructor>
+ <parameter>
+ <inject bean="org.jboss.ejb3.JndiContext" />
+ </parameter>
+ <parameter>
+ org.jboss.ejb3.proxy.objectfactory.session.stateful.StatefulSessionProxyObjectFactory
+ </parameter>
+ </constructor>
+ <depends>NameServer</depends>
+ </bean>
+
+ <!-- JNDI Registrar Configuration -->
+ <bean name="org.jboss.ejb3.JndiContext"
+ class="javax.naming.InitialContext" />
+
+ <!--
+
+ Remoting
+
+ -->
+
+ <!-- Remoting Configuration -->
+ <bean name="ServerConfiguration"
+ class="org.jboss.remoting.ServerConfiguration">
+ <property name="invocationHandlers">
+ <map keyClass="java.lang.String" valueClass="java.lang.String">
+ <entry>
+ <key>AOP</key>
+ <value>
+ org.jboss.aspects.remoting.AOPRemotingInvocationHandler
+ </value>
+ </entry>
+ </map>
+ </property>
+ </bean>
+
+ <!-- Remoting Connector -->
+ <bean name="Connector"
+ class="org.jboss.remoting.transport.Connector">
+ <property name="invokerLocator">socket://0.0.0.0:3874</property>
+ <property name="serverConfiguration">
+ <inject bean="ServerConfiguration" />
+ </property>
+ </bean>
+
+</deployment>
\ No newline at end of file
Added: projects/ejb3/trunk/proxy/src/test/resources/org/jboss/ejb3/test/proxy/session/unit/ProxyStatefulSession30OnlyTestCase-beans.xml
===================================================================
--- projects/ejb3/trunk/proxy/src/test/resources/org/jboss/ejb3/test/proxy/session/unit/ProxyStatefulSession30OnlyTestCase-beans.xml (rev 0)
+++ projects/ejb3/trunk/proxy/src/test/resources/org/jboss/ejb3/test/proxy/session/unit/ProxyStatefulSession30OnlyTestCase-beans.xml 2008-06-04 04:21:30 UTC (rev 74072)
@@ -0,0 +1,77 @@
+<deployment xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="urn:jboss:bean-deployer:2.0 bean-deployer_2_0.xsd"
+ xmlns="urn:jboss:bean-deployer:2.0">
+
+ <!--
+
+ JNDI
+
+ The requisite Naming Server
+
+ -->
+ <bean name="NameServer" class="org.jnp.server.SingletonNamingServer" />
+
+ <!--
+
+ JNDI Registrars
+
+
+ The JNDI Registrar is responsible for all JNDI Bindings for
+ an EJB. Its constructor takes the following arguments, in order:
+
+ javax.naming.Context (JNDI Context into which to bind objects)
+ org.jboss.ejb3.proxy.spi.registry.ProxyFactoryRegistry (Implementation of ProxyFactoryRegistry)
+ String statelessSessionProxyObjectFactoryType The JNDI ObjectFactory implementation to use for SLSB
+ ...more later when SFSB, @Service, MDB Implemented
+
+ -->
+
+ <!-- SFSB JNDI Registrar -->
+ <bean name="org.jboss.ejb3.JndiRegistrar.Session.SFSBJndiRegistrar"
+ class="org.jboss.ejb3.proxy.jndiregistrar.JndiStatefulSessionRegistrar">
+ <constructor>
+ <parameter>
+ <inject bean="org.jboss.ejb3.JndiContext" />
+ </parameter>
+ <parameter>
+ org.jboss.ejb3.proxy.objectfactory.session.stateful.StatefulSessionProxyObjectFactory
+ </parameter>
+ </constructor>
+ <depends>NameServer</depends>
+ </bean>
+
+ <!-- JNDI Registrar Configuration -->
+ <bean name="org.jboss.ejb3.JndiContext"
+ class="javax.naming.InitialContext" />
+
+ <!--
+
+ Remoting
+
+ -->
+
+ <!-- Remoting Configuration -->
+ <bean name="ServerConfiguration"
+ class="org.jboss.remoting.ServerConfiguration">
+ <property name="invocationHandlers">
+ <map keyClass="java.lang.String" valueClass="java.lang.String">
+ <entry>
+ <key>AOP</key>
+ <value>
+ org.jboss.aspects.remoting.AOPRemotingInvocationHandler
+ </value>
+ </entry>
+ </map>
+ </property>
+ </bean>
+
+ <!-- Remoting Connector -->
+ <bean name="Connector"
+ class="org.jboss.remoting.transport.Connector">
+ <property name="invokerLocator">socket://0.0.0.0:3874</property>
+ <property name="serverConfiguration">
+ <inject bean="ServerConfiguration" />
+ </property>
+ </bean>
+
+</deployment>
\ No newline at end of file
Added: projects/ejb3/trunk/proxy/src/test/resources/org/jboss/ejb3/test/proxy/session/unit/ProxyStatelessSession2xOnlyTestCase-beans.xml
===================================================================
--- projects/ejb3/trunk/proxy/src/test/resources/org/jboss/ejb3/test/proxy/session/unit/ProxyStatelessSession2xOnlyTestCase-beans.xml (rev 0)
+++ projects/ejb3/trunk/proxy/src/test/resources/org/jboss/ejb3/test/proxy/session/unit/ProxyStatelessSession2xOnlyTestCase-beans.xml 2008-06-04 04:21:30 UTC (rev 74072)
@@ -0,0 +1,77 @@
+<deployment xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="urn:jboss:bean-deployer:2.0 bean-deployer_2_0.xsd"
+ xmlns="urn:jboss:bean-deployer:2.0">
+
+ <!--
+
+ JNDI
+
+ The requisite Naming Server
+
+ -->
+ <bean name="NameServer" class="org.jnp.server.SingletonNamingServer" />
+
+ <!--
+
+ JNDI Registrars
+
+
+ The JNDI Registrar is responsible for all JNDI Bindings for
+ an EJB. Its constructor takes the following arguments, in order:
+
+ javax.naming.Context (JNDI Context into which to bind objects)
+ org.jboss.ejb3.proxy.spi.registry.ProxyFactoryRegistry (Implementation of ProxyFactoryRegistry)
+ String statelessSessionProxyObjectFactoryType The JNDI ObjectFactory implementation to use for SLSB
+ ...more later when SFSB, @Service, MDB Implemented
+
+ -->
+
+ <!-- SLSB JNDI Registrar -->
+ <bean name="org.jboss.ejb3.JndiRegistrar.Session.SLSBJndiRegistrar"
+ class="org.jboss.ejb3.proxy.jndiregistrar.JndiStatelessSessionRegistrar">
+ <constructor>
+ <parameter>
+ <inject bean="org.jboss.ejb3.JndiContext" />
+ </parameter>
+ <parameter>
+ org.jboss.ejb3.proxy.objectfactory.session.stateless.StatelessSessionProxyObjectFactory
+ </parameter>
+ </constructor>
+ <depends>NameServer</depends>
+ </bean>
+
+ <!-- JNDI Registrar Configuration -->
+ <bean name="org.jboss.ejb3.JndiContext"
+ class="javax.naming.InitialContext" />
+
+ <!--
+
+ Remoting
+
+ -->
+
+ <!-- Remoting Configuration -->
+ <bean name="ServerConfiguration"
+ class="org.jboss.remoting.ServerConfiguration">
+ <property name="invocationHandlers">
+ <map keyClass="java.lang.String" valueClass="java.lang.String">
+ <entry>
+ <key>AOP</key>
+ <value>
+ org.jboss.aspects.remoting.AOPRemotingInvocationHandler
+ </value>
+ </entry>
+ </map>
+ </property>
+ </bean>
+
+ <!-- Remoting Connector -->
+ <bean name="Connector"
+ class="org.jboss.remoting.transport.Connector">
+ <property name="invokerLocator">socket://0.0.0.0:3874</property>
+ <property name="serverConfiguration">
+ <inject bean="ServerConfiguration" />
+ </property>
+ </bean>
+
+</deployment>
\ No newline at end of file
Added: projects/ejb3/trunk/proxy/src/test/resources/org/jboss/ejb3/test/proxy/session/unit/ProxyStatelessSession30OnlyTestCase-beans.xml
===================================================================
--- projects/ejb3/trunk/proxy/src/test/resources/org/jboss/ejb3/test/proxy/session/unit/ProxyStatelessSession30OnlyTestCase-beans.xml (rev 0)
+++ projects/ejb3/trunk/proxy/src/test/resources/org/jboss/ejb3/test/proxy/session/unit/ProxyStatelessSession30OnlyTestCase-beans.xml 2008-06-04 04:21:30 UTC (rev 74072)
@@ -0,0 +1,77 @@
+<deployment xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="urn:jboss:bean-deployer:2.0 bean-deployer_2_0.xsd"
+ xmlns="urn:jboss:bean-deployer:2.0">
+
+ <!--
+
+ JNDI
+
+ The requisite Naming Server
+
+ -->
+ <bean name="NameServer" class="org.jnp.server.SingletonNamingServer" />
+
+ <!--
+
+ JNDI Registrars
+
+
+ The JNDI Registrar is responsible for all JNDI Bindings for
+ an EJB. Its constructor takes the following arguments, in order:
+
+ javax.naming.Context (JNDI Context into which to bind objects)
+ org.jboss.ejb3.proxy.spi.registry.ProxyFactoryRegistry (Implementation of ProxyFactoryRegistry)
+ String statelessSessionProxyObjectFactoryType The JNDI ObjectFactory implementation to use for SLSB
+ ...more later when SFSB, @Service, MDB Implemented
+
+ -->
+
+ <!-- SLSB JNDI Registrar -->
+ <bean name="org.jboss.ejb3.JndiRegistrar.Session.SLSBJndiRegistrar"
+ class="org.jboss.ejb3.proxy.jndiregistrar.JndiStatelessSessionRegistrar">
+ <constructor>
+ <parameter>
+ <inject bean="org.jboss.ejb3.JndiContext" />
+ </parameter>
+ <parameter>
+ org.jboss.ejb3.proxy.objectfactory.session.stateless.StatelessSessionProxyObjectFactory
+ </parameter>
+ </constructor>
+ <depends>NameServer</depends>
+ </bean>
+
+ <!-- JNDI Registrar Configuration -->
+ <bean name="org.jboss.ejb3.JndiContext"
+ class="javax.naming.InitialContext" />
+
+ <!--
+
+ Remoting
+
+ -->
+
+ <!-- Remoting Configuration -->
+ <bean name="ServerConfiguration"
+ class="org.jboss.remoting.ServerConfiguration">
+ <property name="invocationHandlers">
+ <map keyClass="java.lang.String" valueClass="java.lang.String">
+ <entry>
+ <key>AOP</key>
+ <value>
+ org.jboss.aspects.remoting.AOPRemotingInvocationHandler
+ </value>
+ </entry>
+ </map>
+ </property>
+ </bean>
+
+ <!-- Remoting Connector -->
+ <bean name="Connector"
+ class="org.jboss.remoting.transport.Connector">
+ <property name="invokerLocator">socket://0.0.0.0:3874</property>
+ <property name="serverConfiguration">
+ <inject bean="ServerConfiguration" />
+ </property>
+ </bean>
+
+</deployment>
\ No newline at end of file
More information about the jboss-cvs-commits
mailing list