[jboss-cvs] JBossAS SVN: r66388 - trunk/iiop/src/main/org/jboss/proxy/ejb.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Wed Oct 24 11:10:48 EDT 2007


Author: sguilhen at redhat.com
Date: 2007-10-24 11:10:47 -0400 (Wed, 24 Oct 2007)
New Revision: 66388

Modified:
   trunk/iiop/src/main/org/jboss/proxy/ejb/EjbObjectCorbaServant.java
   trunk/iiop/src/main/org/jboss/proxy/ejb/IORFactory.java
Log:
JBCTS-660: Added a narrow operation before creating the HandleImplIIOP and HomeHandleImplIIOP classes.



Modified: trunk/iiop/src/main/org/jboss/proxy/ejb/EjbObjectCorbaServant.java
===================================================================
--- trunk/iiop/src/main/org/jboss/proxy/ejb/EjbObjectCorbaServant.java	2007-10-24 14:19:14 UTC (rev 66387)
+++ trunk/iiop/src/main/org/jboss/proxy/ejb/EjbObjectCorbaServant.java	2007-10-24 15:10:47 UTC (rev 66388)
@@ -253,7 +253,9 @@
 
             if (opName.equals("_get_handle"))
             {
-               retVal = new HandleImplIIOP(_this_object());
+               javax.ejb.EJBObject obj = 
+                  (javax.ejb.EJBObject)javax.rmi.PortableRemoteObject.narrow(_this_object(), javax.ejb.EJBObject.class);
+               retVal = new HandleImplIIOP(obj); 
             }
             else
             {

Modified: trunk/iiop/src/main/org/jboss/proxy/ejb/IORFactory.java
===================================================================
--- trunk/iiop/src/main/org/jboss/proxy/ejb/IORFactory.java	2007-10-24 14:19:14 UTC (rev 66387)
+++ trunk/iiop/src/main/org/jboss/proxy/ejb/IORFactory.java	2007-10-24 15:10:47 UTC (rev 66388)
@@ -490,9 +490,9 @@
 
       org.omg.CORBA.Object corbaRef =
          homeReferenceFactory.createReference(homeRepositoryIds[0]);
+      ejbHome = (EJBHome)PortableRemoteObject.narrow(corbaRef, EJBHome.class);
       ((EjbHomeCorbaServant)homeServant).setHomeHandle(
-                                             new HomeHandleImplIIOP(corbaRef));
-      ejbHome = (EJBHome)PortableRemoteObject.narrow(corbaRef, EJBHome.class);
+                                             new HomeHandleImplIIOP(ejbHome));
 
       // Initialize beanPOA and create metadata depending on the kind of bean
       if (container.getBeanMetaData() instanceof EntityMetaData) {




More information about the jboss-cvs-commits mailing list