geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rickmcgu...@apache.org
Subject svn commit: r677243 - /geronimo/server/trunk/plugins/corba/geronimo-corba/src/main/java/org/apache/geronimo/corba/util/UtilDelegateImpl.java
Date Wed, 16 Jul 2008 11:26:35 GMT
Author: rickmcguire
Date: Wed Jul 16 04:26:35 2008
New Revision: 677243

URL: http://svn.apache.org/viewvc?rev=677243&view=rev
Log:
Fix for TCK regressions

Modified:
    geronimo/server/trunk/plugins/corba/geronimo-corba/src/main/java/org/apache/geronimo/corba/util/UtilDelegateImpl.java

Modified: geronimo/server/trunk/plugins/corba/geronimo-corba/src/main/java/org/apache/geronimo/corba/util/UtilDelegateImpl.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/corba/geronimo-corba/src/main/java/org/apache/geronimo/corba/util/UtilDelegateImpl.java?rev=677243&r1=677242&r2=677243&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/corba/geronimo-corba/src/main/java/org/apache/geronimo/corba/util/UtilDelegateImpl.java
(original)
+++ geronimo/server/trunk/plugins/corba/geronimo-corba/src/main/java/org/apache/geronimo/corba/util/UtilDelegateImpl.java
Wed Jul 16 04:26:35 2008
@@ -16,13 +16,16 @@
  */
 package org.apache.geronimo.corba.util;
 
+import java.lang.reflect.InvocationHandler;
+import java.lang.reflect.Proxy;
 import java.rmi.AccessException;
 import java.rmi.MarshalException;
 import java.rmi.NoSuchObjectException;
 import java.rmi.Remote;
 import java.rmi.RemoteException;
-import java.lang.reflect.Proxy;
-import java.lang.reflect.InvocationHandler;
+
+import javax.ejb.EJBHome;
+import javax.ejb.EJBObject;
 import javax.rmi.CORBA.Stub;
 import javax.rmi.CORBA.Tie;
 import javax.rmi.CORBA.UtilDelegate;
@@ -30,11 +33,18 @@
 import javax.transaction.InvalidTransactionException;
 import javax.transaction.TransactionRequiredException;
 import javax.transaction.TransactionRolledbackException;
-import javax.ejb.EJBHome;
-import javax.ejb.EJBObject;
 
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+import org.apache.geronimo.corba.AdapterWrapper;
+import org.apache.geronimo.corba.CORBAException;
+import org.apache.geronimo.corba.RefGenerator;
+import org.apache.geronimo.corba.StandardServant;
+import org.apache.openejb.BeanType;
+import org.apache.openejb.InterfaceType;
+import org.apache.openejb.core.CoreDeploymentInfo;
+import org.apache.openejb.core.ivm.BaseEjbProxyHandler;
+import org.apache.openejb.core.ivm.EjbObjectProxyHandler;
+import org.apache.openejb.core.stateful.StatefulEjbObjectHandler;
+import org.apache.openejb.core.stateful.StatefulEjbObjectHandler.RegistryId;
 import org.omg.CORBA.CompletionStatus;
 import org.omg.CORBA.INVALID_TRANSACTION;
 import org.omg.CORBA.MARSHAL;
@@ -47,15 +57,8 @@
 import org.omg.CORBA.UNKNOWN;
 import org.omg.CORBA.portable.InputStream;
 import org.omg.CORBA.portable.OutputStream;
-
-import org.apache.geronimo.corba.AdapterWrapper;
-import org.apache.geronimo.corba.CORBAException;
-import org.apache.geronimo.corba.RefGenerator;
-import org.apache.geronimo.corba.StandardServant;
-import org.apache.openejb.InterfaceType;
-import org.apache.openejb.BeanType;
-import org.apache.openejb.core.ivm.BaseEjbProxyHandler;
-import org.apache.openejb.core.CoreDeploymentInfo;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * @version $Revision: 451417 $ $Date: 2006-09-29 13:13:22 -0700 (Fri, 29 Sep 2006) $
@@ -247,7 +250,11 @@
                 return refGenerator.genHomeReference();
             } else if (proxy instanceof EJBObject) {
                 Object primaryKey = null;
-                if (deploymentInfo.getComponentType() != BeanType.STATELESS) {
+                if (deploymentInfo.getComponentType() == BeanType.STATEFUL) {
+                    RegistryId id = (RegistryId)((EjbObjectProxyHandler)ejbProxyHandler).getRegistryId();

+                    primaryKey = id.getPrimaryKey(); 
+                }
+                else if (deploymentInfo.getComponentType() != BeanType.STATELESS) {
                     EJBObject ejbObject = (EJBObject) proxy;
                     primaryKey = ejbObject.getPrimaryKey();
                 }



Mime
View raw message