dain 2005/03/23 03:23:16
Modified: modules/core/src/java/org/openejb/client EJBRequest.java
Log:
Extracted a simple ORBRef interface from the CORBABean
Added ORBRef to EJBRequest so incoming corba objects can be attached to the
local orb
The ORBRef object is optional, and if null the stubs are not attached
Revision Changes Path
1.6 +11 -9
openejb/modules/core/src/java/org/openejb/client/EJBRequest.java
Index: EJBRequest.java
===================================================================
RCS file:
/home/projects/openejb/scm/openejb/modules/core/src/java/org/openejb/client/EJBRequest.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- EJBRequest.java 17 Mar 2005 23:56:31 -0000 1.5
+++ EJBRequest.java 23 Mar 2005 08:23:16 -0000 1.6
@@ -58,14 +58,13 @@
import javax.rmi.CORBA.Stub;
import org.omg.CORBA.ORB;
-import org.openejb.corba.util.Util;
-
+import org.openejb.corba.ORBRef;
/**
- *
* @since 11/25/2001
*/
public class EJBRequest implements Request {
+ private transient ORBRef orbRef;
private transient int requestMethod;
private transient int deploymentCode = 0;
@@ -91,7 +90,10 @@
public EJBRequest() {
+ }
+ public EJBRequest(ORBRef orbRef) {
+ this.orbRef = orbRef;
}
public EJBRequest(int requestMethod) {
@@ -482,11 +484,11 @@
case L:
clazz = (Class) in.readObject();
obj = in.readObject();
-// if (obj instanceof Stub) {
-// Stub stub = (Stub)obj;
-// ORB orb = Util.getORB();
-// stub.connect(orb);
-// }
+ if (obj instanceof Stub && orbRef != null) {
+ Stub stub = (Stub)obj;
+ ORB orb = orbRef.getORB();
+ stub.connect(orb);
+ }
break;
default:
throw new IOException("Unkown data type: " + type);