[jboss-cvs] JBossAS SVN: r68149 - in trunk/ejb3/src: test/org/jboss/ejb3/test/ejbthree963 and 1 other directory.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Tue Dec 11 16:47:30 EST 2007


Author: ALRubinger
Date: 2007-12-11 16:47:30 -0500 (Tue, 11 Dec 2007)
New Revision: 68149

Added:
   trunk/ejb3/src/test/org/jboss/ejb3/test/ejbthree963/MyStatefulHome.java
Modified:
   trunk/ejb3/src/resources/test/ejbthree963/META-INF/jboss.xml
   trunk/ejb3/src/test/org/jboss/ejb3/test/ejbthree963/MyStateful.java
   trunk/ejb3/src/test/org/jboss/ejb3/test/ejbthree963/MyStatefulBean.java
Log:
[EJBTHREE-963] Home interface is required for 2.1 View

Modified: trunk/ejb3/src/resources/test/ejbthree963/META-INF/jboss.xml
===================================================================
--- trunk/ejb3/src/resources/test/ejbthree963/META-INF/jboss.xml	2007-12-11 21:31:34 UTC (rev 68148)
+++ trunk/ejb3/src/resources/test/ejbthree963/META-INF/jboss.xml	2007-12-11 21:47:30 UTC (rev 68149)
@@ -8,7 +8,6 @@
    <enterprise-beans>
       <session>
          <ejb-name>MyStatefulBean</ejb-name>
-         <jndi-name>MyStatefulBean</jndi-name>
       </session>
    </enterprise-beans>
 </jboss>
\ No newline at end of file

Modified: trunk/ejb3/src/test/org/jboss/ejb3/test/ejbthree963/MyStateful.java
===================================================================
--- trunk/ejb3/src/test/org/jboss/ejb3/test/ejbthree963/MyStateful.java	2007-12-11 21:31:34 UTC (rev 68148)
+++ trunk/ejb3/src/test/org/jboss/ejb3/test/ejbthree963/MyStateful.java	2007-12-11 21:47:30 UTC (rev 68149)
@@ -21,20 +21,19 @@
  */
 package org.jboss.ejb3.test.ejbthree963;
 
-import java.rmi.Remote;
 import java.rmi.RemoteException;
 
-import org.jboss.ejb3.annotation.RemoteBinding;
+import javax.ejb.EJBObject;
 
 /**
  * @author carlo
  *
  */
- at javax.ejb.Remote
- at RemoteBinding(jndiBinding=MyStateful.JNDI_NAME)
-public interface MyStateful extends Remote
+public interface MyStateful extends EJBObject
 {
    String JNDI_NAME = "MyStatefulBean/remote";
+
    String sayHi() throws RemoteException;
+
    void setName(String name) throws RemoteException;
 }

Modified: trunk/ejb3/src/test/org/jboss/ejb3/test/ejbthree963/MyStatefulBean.java
===================================================================
--- trunk/ejb3/src/test/org/jboss/ejb3/test/ejbthree963/MyStatefulBean.java	2007-12-11 21:31:34 UTC (rev 68148)
+++ trunk/ejb3/src/test/org/jboss/ejb3/test/ejbthree963/MyStatefulBean.java	2007-12-11 21:47:30 UTC (rev 68149)
@@ -24,25 +24,35 @@
 import java.rmi.RemoteException;
 
 import javax.ejb.EJBException;
+import javax.ejb.Remote;
+import javax.ejb.RemoteHome;
 import javax.ejb.SessionBean;
 import javax.ejb.SessionContext;
 import javax.ejb.Stateful;
 
+import org.jboss.ejb3.annotation.RemoteBinding;
+import org.jboss.ejb3.annotation.RemoteHomeBinding;
+
 /**
  * @author carlo
  *
  */
 @Stateful
-public class MyStatefulBean implements MyStateful, SessionBean
+ at RemoteHome(MyStatefulHome.class)
+ at Remote(MyStateful.class)
+ at RemoteBinding(jndiBinding = MyStateful.JNDI_NAME)
+ at RemoteHomeBinding(jndiBinding = MyStatefulHome.JNDI_NAME)
+public class MyStatefulBean implements SessionBean
 {
    private static final long serialVersionUID = 1L;
-   
+
    private SessionContext ctx;
+
    private String name;
 
    public String sayHi() throws RemoteException
    {
-      if(ctx == null)
+      if (ctx == null)
          throw new IllegalStateException("ctx is null");
       return "Hi " + name;
    }
@@ -53,10 +63,10 @@
    }
 
    // this one is optional
-//   public void ejbCreate() //throws EJBException, RemoteException
-//   {
-//   }
-   
+   //   public void ejbCreate() //throws EJBException, RemoteException
+   //   {
+   //   }
+
    public void ejbActivate() //throws EJBException, RemoteException
    {
    }

Added: trunk/ejb3/src/test/org/jboss/ejb3/test/ejbthree963/MyStatefulHome.java
===================================================================
--- trunk/ejb3/src/test/org/jboss/ejb3/test/ejbthree963/MyStatefulHome.java	                        (rev 0)
+++ trunk/ejb3/src/test/org/jboss/ejb3/test/ejbthree963/MyStatefulHome.java	2007-12-11 21:47:30 UTC (rev 68149)
@@ -0,0 +1,41 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2007, Red Hat Middleware LLC, 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.ejbthree963;
+
+import java.rmi.RemoteException;
+
+import javax.ejb.CreateException;
+import javax.ejb.EJBHome;
+
+/**
+ * EJB 2.1 Home 
+ *  
+ * @author <a href="mailto:andrew.rubinger at redhat.com">ALR</a>
+ * @version $Revision: $
+ */
+public interface MyStatefulHome extends EJBHome
+{
+   String JNDI_NAME = "MyStatefulBean/remoteHome";
+
+   public MyStateful create() throws RemoteException, CreateException;
+
+}


Property changes on: trunk/ejb3/src/test/org/jboss/ejb3/test/ejbthree963/MyStatefulHome.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain




More information about the jboss-cvs-commits mailing list