[jboss-cvs] JBossAS SVN: r67510 - in branches/JBPAPP_4_2_0_GA_CP/ejb3/src: main/org/jboss/ejb3/stateful and 2 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Tue Nov 27 15:42:42 EST 2007


Author: bdecoste
Date: 2007-11-27 15:42:42 -0500 (Tue, 27 Nov 2007)
New Revision: 67510

Modified:
   branches/JBPAPP_4_2_0_GA_CP/ejb3/src/main/org/jboss/ejb3/LocalProxy.java
   branches/JBPAPP_4_2_0_GA_CP/ejb3/src/main/org/jboss/ejb3/stateful/StatefulLocalHomeProxy.java
   branches/JBPAPP_4_2_0_GA_CP/ejb3/src/main/org/jboss/ejb3/stateless/StatelessLocalProxyFactory.java
   branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/localfromremote/unit/LocalTestCase.java
Log:
[JBPAPP-335] fix invoking local home remotely

Modified: branches/JBPAPP_4_2_0_GA_CP/ejb3/src/main/org/jboss/ejb3/LocalProxy.java
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP/ejb3/src/main/org/jboss/ejb3/LocalProxy.java	2007-11-27 20:25:40 UTC (rev 67509)
+++ branches/JBPAPP_4_2_0_GA_CP/ejb3/src/main/org/jboss/ejb3/LocalProxy.java	2007-11-27 20:42:42 UTC (rev 67510)
@@ -45,7 +45,7 @@
    protected String containerGuid;
    protected String proxyName;
 
-   protected LocalProxy()
+   public LocalProxy()
    {
    }
 

Modified: branches/JBPAPP_4_2_0_GA_CP/ejb3/src/main/org/jboss/ejb3/stateful/StatefulLocalHomeProxy.java
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP/ejb3/src/main/org/jboss/ejb3/stateful/StatefulLocalHomeProxy.java	2007-11-27 20:25:40 UTC (rev 67509)
+++ branches/JBPAPP_4_2_0_GA_CP/ejb3/src/main/org/jboss/ejb3/stateful/StatefulLocalHomeProxy.java	2007-11-27 20:42:42 UTC (rev 67510)
@@ -35,8 +35,9 @@
 {
    private static final long serialVersionUID = -9026021347498876589L;
 
-   protected StatefulLocalHomeProxy()
+   public StatefulLocalHomeProxy()
    {
+      super();
    }
 
    public StatefulLocalHomeProxy(Container container)

Modified: branches/JBPAPP_4_2_0_GA_CP/ejb3/src/main/org/jboss/ejb3/stateless/StatelessLocalProxyFactory.java
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP/ejb3/src/main/org/jboss/ejb3/stateless/StatelessLocalProxyFactory.java	2007-11-27 20:25:40 UTC (rev 67509)
+++ branches/JBPAPP_4_2_0_GA_CP/ejb3/src/main/org/jboss/ejb3/stateless/StatelessLocalProxyFactory.java	2007-11-27 20:42:42 UTC (rev 67510)
@@ -21,18 +21,18 @@
  */
 package org.jboss.ejb3.stateless;
 
-import java.lang.reflect.InvocationTargetException;
 import javax.ejb.LocalHome;
 
 import org.jboss.annotation.ejb.LocalBinding;
 import org.jboss.aop.Advisor;
 import org.jboss.ejb3.EJBContainer;
 import org.jboss.ejb3.JBossProxy;
-import org.jboss.ejb3.NonSerializableFactory;
 import org.jboss.ejb3.ProxyFactoryHelper;
 import org.jboss.logging.Logger;
 
+import org.jboss.naming.Util;
 
+
 /**
  * Comment
  *
@@ -92,7 +92,7 @@
          Class[] interfaces = {localHome.value()};
          Object homeProxy = java.lang.reflect.Proxy.newProxyInstance(getContainer().getBeanClass().getClassLoader(),
                                                                      interfaces, new StatelessLocalProxy(getContainer()));
-         NonSerializableFactory.rebind(getContainer().getInitialContext(), ProxyFactoryHelper.getLocalHomeJndiName(getContainer()), homeProxy);
+         Util.rebind(getContainer().getInitialContext(), ProxyFactoryHelper.getLocalHomeJndiName(getContainer()), homeProxy);
       }
    }
 
@@ -104,7 +104,7 @@
       LocalHome localHome = (LocalHome) statelessContainer.resolveAnnotation(LocalHome.class);
       if (localHome != null && !bindHomeAndBusinessTogether(statelessContainer))
       {
-         NonSerializableFactory.unbind(getContainer().getInitialContext(), ProxyFactoryHelper.getLocalHomeJndiName(getContainer()));
+         Util.unbind(getContainer().getInitialContext(), ProxyFactoryHelper.getLocalHomeJndiName(getContainer()));
       }
    }
 

Modified: branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/localfromremote/unit/LocalTestCase.java
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/localfromremote/unit/LocalTestCase.java	2007-11-27 20:25:40 UTC (rev 67509)
+++ branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/localfromremote/unit/LocalTestCase.java	2007-11-27 20:42:42 UTC (rev 67510)
@@ -142,10 +142,8 @@
          bean.localHomeCall();
          fail("should not be allowed to call local interface remotely");
       }
-      catch (javax.naming.NamingException e)
+      catch (javax.ejb.EJBException e)
       {
-         if (e.getCause() == null || !(e.getCause() instanceof javax.ejb.EJBException))
-            fail("should not be allowed to call local interface remotely");
       }
    }
    




More information about the jboss-cvs-commits mailing list