User: peter
Date: 01/01/15 19:10:36
Modified: src/main/org/jboss/test/cts/ejb StatelessSessionBean.java
Log:
Added files back that were mistakenly deleted.
Revision Changes Path
1.2 +45 -0
jbosstest/src/main/org/jboss/test/cts/ejb/StatelessSessionBean.java
Index: StatelessSessionBean.java
===================================================================
RCS file:
/products/cvs/ejboss/jbosstest/src/main/org/jboss/test/cts/ejb/StatelessSessionBean.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- StatelessSessionBean.java 2001/01/11 03:55:46 1.1
+++ StatelessSessionBean.java 2001/01/16 03:10:35 1.2
@@ -2,6 +2,7 @@
import org.jboss.test.util.ejb.*;
import java.util.*;
+import javax.naming.*;
import javax.ejb.*;
import org.jboss.test.cts.interfaces.*;
import org.jboss.test.util.ejb.SessionSupport;
@@ -45,6 +46,50 @@
public String method1 (String msg)
{
return msg;
+ }
+
+ /**
+ * Method loopbackTest
+ *
+ *
+ */
+
+ public void loopbackTest ()
+ throws java.rmi.RemoteException
+ {
+ try
+ {
+ Context ctx = new InitialContext();
+ StatelessSessionHome home =
+ ( StatelessSessionHome ) ctx.lookup("ejbcts/StatelessSessionBean");
+ StatelessSession sessionBean = home.create();
+ sessionBean.loopbackTest(sessionCtx.getEJBObject());
+ }
+ catch( javax.naming.NamingException nex )
+ {
+ System.out.println( "Could not locate bean instance" );
+ }
+
+ }
+
+ /**
+ * Method loopbackTest
+ *
+ *
+ * @param obj
+ *
+ * @throws java.rmi.RemoteException
+ *
+ */
+
+ public void loopbackTest (EJBObject obj)
+ throws java.rmi.RemoteException
+ {
+
+ // This should throw an exception.
+ StatelessSession bean = ( StatelessSession ) obj;
+
+ bean.method1("Hello");
}
}