[Jboss-cvs] JBossAS SVN: r55120 - trunk/ejb3/src/test/org/jboss/ejb3/test/iiop

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Thu Aug 3 13:54:51 EDT 2006


Author: wolfc
Date: 2006-08-03 13:54:47 -0400 (Thu, 03 Aug 2006)
New Revision: 55120

Added:
   trunk/ejb3/src/test/org/jboss/ejb3/test/iiop/HomedStatelessBean.java
   trunk/ejb3/src/test/org/jboss/ejb3/test/iiop/HomedStatelessHome.java
Log:
EJBTHREE-667: passing basic unit tests after refactoring invocation of EJB beans

Added: trunk/ejb3/src/test/org/jboss/ejb3/test/iiop/HomedStatelessBean.java
===================================================================
--- trunk/ejb3/src/test/org/jboss/ejb3/test/iiop/HomedStatelessBean.java	2006-08-03 17:47:51 UTC (rev 55119)
+++ trunk/ejb3/src/test/org/jboss/ejb3/test/iiop/HomedStatelessBean.java	2006-08-03 17:54:47 UTC (rev 55120)
@@ -0,0 +1,58 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt 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.iiop;
+
+import javax.annotation.Resource;
+import javax.annotation.security.RolesAllowed;
+import javax.ejb.Remote;
+import javax.ejb.RemoteHome;
+import javax.ejb.SessionContext;
+import javax.ejb.Stateless;
+
+import org.jboss.annotation.ejb.RemoteBinding;
+import org.jboss.ejb3.iiop.IORFactory;
+
+/**
+ * Comment
+ *
+ * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
+ * @version $Revision: $
+ */
+ at Stateless
+ at Remote(MySession.class)
+ at RemoteHome(HomedStatelessHome.class)
+ at RemoteBinding(factory=IORFactory.class)
+public class HomedStatelessBean
+{
+   @Resource SessionContext ctx;
+   
+   @RolesAllowed({"user"})
+   public String getWhoAmI()
+   {
+      return ctx.getCallerPrincipal().getName();
+   }
+   
+   public String sayHelloTo(String name)
+   {
+      return "Hi " + name;
+   }
+}

Added: trunk/ejb3/src/test/org/jboss/ejb3/test/iiop/HomedStatelessHome.java
===================================================================
--- trunk/ejb3/src/test/org/jboss/ejb3/test/iiop/HomedStatelessHome.java	2006-08-03 17:47:51 UTC (rev 55119)
+++ trunk/ejb3/src/test/org/jboss/ejb3/test/iiop/HomedStatelessHome.java	2006-08-03 17:54:47 UTC (rev 55120)
@@ -0,0 +1,38 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt 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.iiop;
+
+import java.rmi.RemoteException;
+
+import javax.ejb.CreateException;
+import javax.ejb.EJBHome;
+
+/**
+ * Comment
+ *
+ * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
+ * @version $Revision: $
+ */
+public interface HomedStatelessHome extends EJBHome
+{
+   MySession create() throws CreateException, RemoteException;
+}




More information about the jboss-cvs-commits mailing list