[jboss-cvs] JBossAS SVN: r65906 - in branches/Branch_4_2/ejb3/src/test/org/jboss/ejb3/test/stateful: unit and 1 other directory.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Mon Oct 8 06:40:25 EDT 2007


Author: wolfc
Date: 2007-10-08 06:40:25 -0400 (Mon, 08 Oct 2007)
New Revision: 65906

Added:
   branches/Branch_4_2/ejb3/src/test/org/jboss/ejb3/test/stateful/Stateful21.java
Modified:
   branches/Branch_4_2/ejb3/src/test/org/jboss/ejb3/test/stateful/StatefulBean.java
   branches/Branch_4_2/ejb3/src/test/org/jboss/ejb3/test/stateful/StatefulHome.java
   branches/Branch_4_2/ejb3/src/test/org/jboss/ejb3/test/stateful/unit/RemoteUnitTestCase.java
Log:
EJBTHREE-1059: returning a remote interface from create

Added: branches/Branch_4_2/ejb3/src/test/org/jboss/ejb3/test/stateful/Stateful21.java
===================================================================
--- branches/Branch_4_2/ejb3/src/test/org/jboss/ejb3/test/stateful/Stateful21.java	                        (rev 0)
+++ branches/Branch_4_2/ejb3/src/test/org/jboss/ejb3/test/stateful/Stateful21.java	2007-10-08 10:40:25 UTC (rev 65906)
@@ -0,0 +1,35 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2007, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+  *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ejb3.test.stateful;
+
+import javax.ejb.EJBObject;
+
+/**
+ * A remote interface for a stateful bean.
+ * 
+ * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
+ * @version $Revision: $
+ */
+public interface Stateful21 extends Stateful, EJBObject
+{
+
+}


Property changes on: branches/Branch_4_2/ejb3/src/test/org/jboss/ejb3/test/stateful/Stateful21.java
___________________________________________________________________
Name: svn:keywords
   + Author Date Id Revision
Name: svn:eol-style
   + native

Modified: branches/Branch_4_2/ejb3/src/test/org/jboss/ejb3/test/stateful/StatefulBean.java
===================================================================
--- branches/Branch_4_2/ejb3/src/test/org/jboss/ejb3/test/stateful/StatefulBean.java	2007-10-08 03:59:34 UTC (rev 65905)
+++ branches/Branch_4_2/ejb3/src/test/org/jboss/ejb3/test/stateful/StatefulBean.java	2007-10-08 10:40:25 UTC (rev 65906)
@@ -55,7 +55,7 @@
  * @version $Revision$
  */
 @Stateful(name="StatefulBean")
- at Remote(org.jboss.ejb3.test.stateful.Stateful.class)
+ at Remote({org.jboss.ejb3.test.stateful.Stateful.class, Stateful21.class})
 @Local(org.jboss.ejb3.test.stateful.StatefulLocal.class)
 @RemoteBinding(jndiBinding = "Stateful",
                interceptorStack="RemoteBindingStatefulSessionClientInterceptors",
@@ -79,7 +79,6 @@
    private StatefulLocal localStateful;
 
    private String state;
-   private int stuff;
    private boolean wasPassivated = false;
    
    public void lookupStateful() throws Exception

Modified: branches/Branch_4_2/ejb3/src/test/org/jboss/ejb3/test/stateful/StatefulHome.java
===================================================================
--- branches/Branch_4_2/ejb3/src/test/org/jboss/ejb3/test/stateful/StatefulHome.java	2007-10-08 03:59:34 UTC (rev 65905)
+++ branches/Branch_4_2/ejb3/src/test/org/jboss/ejb3/test/stateful/StatefulHome.java	2007-10-08 10:40:25 UTC (rev 65906)
@@ -21,8 +21,7 @@
  */
 package org.jboss.ejb3.test.stateful;
 
-import javax.ejb.*;
-import java.rmi.*;
+import javax.ejb.EJBHome;
 
 /**
  * @version <tt>$Revision$</tt>
@@ -30,8 +29,8 @@
  */
 public interface StatefulHome extends EJBHome {
     
-  public Stateful create() throws java.rmi.RemoteException, javax.ejb.CreateException;
+  public Stateful21 create() throws java.rmi.RemoteException, javax.ejb.CreateException;
   
-  public Stateful create(State state) throws java.rmi.RemoteException, javax.ejb.CreateException;
+  public Stateful21 create(State state) throws java.rmi.RemoteException, javax.ejb.CreateException;
 } 
 

Modified: branches/Branch_4_2/ejb3/src/test/org/jboss/ejb3/test/stateful/unit/RemoteUnitTestCase.java
===================================================================
--- branches/Branch_4_2/ejb3/src/test/org/jboss/ejb3/test/stateful/unit/RemoteUnitTestCase.java	2007-10-08 03:59:34 UTC (rev 65905)
+++ branches/Branch_4_2/ejb3/src/test/org/jboss/ejb3/test/stateful/unit/RemoteUnitTestCase.java	2007-10-08 10:40:25 UTC (rev 65906)
@@ -29,33 +29,33 @@
 import javax.management.ObjectName;
 import javax.naming.InitialContext;
 
+import junit.framework.Test;
+
 import org.jboss.ejb3.ClientKernelAbstraction;
 import org.jboss.ejb3.KernelAbstractionFactory;
 import org.jboss.ejb3.test.stateful.ClusteredStateful;
 import org.jboss.ejb3.test.stateful.ConcurrentStateful;
 import org.jboss.ejb3.test.stateful.Entity;
 import org.jboss.ejb3.test.stateful.EntityFacade;
+import org.jboss.ejb3.test.stateful.ExtendedState;
+import org.jboss.ejb3.test.stateful.ProxyFactoryInterface;
+import org.jboss.ejb3.test.stateful.RemoteBindingInterceptor;
 import org.jboss.ejb3.test.stateful.ServiceRemote;
 import org.jboss.ejb3.test.stateful.SmallCacheStateful;
+import org.jboss.ejb3.test.stateful.State;
 import org.jboss.ejb3.test.stateful.Stateful;
+import org.jboss.ejb3.test.stateful.StatefulHome;
 import org.jboss.ejb3.test.stateful.StatefulInvoker;
 import org.jboss.ejb3.test.stateful.StatefulLocal;
 import org.jboss.ejb3.test.stateful.StatefulTimeout;
 import org.jboss.ejb3.test.stateful.StatefulTx;
-import org.jboss.ejb3.test.stateful.ProxyFactoryInterface;
-import org.jboss.ejb3.test.stateful.RemoteBindingInterceptor;
-import org.jboss.ejb3.test.stateful.State;
-import org.jboss.ejb3.test.stateful.StatefulHome;
 import org.jboss.ejb3.test.stateful.Stateless;
-import org.jboss.ejb3.test.stateful.ExtendedState;
 import org.jboss.ejb3.test.stateful.Tester;
 import org.jboss.logging.Logger;
+import org.jboss.security.SecurityAssociation;
+import org.jboss.security.SimplePrincipal;
 import org.jboss.test.JBossTestCase;
-import junit.framework.Test;
 
-import org.jboss.security.SimplePrincipal;
-import org.jboss.security.SecurityAssociation;
-
 /**
  * Sample client for the jboss container.
  *
@@ -66,6 +66,7 @@
 public class RemoteUnitTestCase
 extends JBossTestCase
 {
+   @SuppressWarnings("unused")
    private static final Logger log = Logger.getLogger(RemoteUnitTestCase.class);
 
    static boolean deployed = false;
@@ -314,7 +315,7 @@
       try
       {
          stateful.testThrownException();
-         this.fail("no exception caught");
+         fail("no exception caught");
       } 
       catch (Exception e)
       {
@@ -334,7 +335,7 @@
       try
       {
          stateful.testExceptionCause();
-         this.fail("no exception caught");
+         fail("no exception caught");
       } 
       catch (Exception e)
       {
@@ -422,7 +423,7 @@
       ObjectName objectName = new ObjectName("jboss.jca:service=CachedConnectionManager");
       Object[] params = {};
       String[] sig = {};
-      Map result = (Map)server.invoke(objectName, "listInUseConnections", params, sig);
+      Map<?, ?> result = (Map<?, ?>)server.invoke(objectName, "listInUseConnections", params, sig);
       System.out.println(result);
       
       objectName = new ObjectName("jboss:service=TransactionManager");




More information about the jboss-cvs-commits mailing list