djencks 2005/12/05 16:31:12
Modified: modules/core/src/java/org/openejb/corba Adapter.java
AdapterEntity.java AdapterStateful.java
AdapterStateless.java StandardServant.java
Log:
GERONIMO-1145 make sure the right orb is used.
Revision Changes Path
1.13 +9 -3 openejb/modules/core/src/java/org/openejb/
corba/Adapter.java
Index: Adapter.java
===================================================================
RCS file: /home/projects/openejb/scm/openejb/modules/core/src/
java/org/openejb/corba/Adapter.java,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- Adapter.java 13 Jul 2005 20:49:28 -0000 1.12
+++ Adapter.java 5 Dec 2005 21:31:12 -0000 1.13
@@ -70,6 +70,7 @@
public abstract class Adapter implements RefGenerator {
private final EJBContainer container;
protected final POA homePOA;
+ protected final ORB orb;
private final NamingContextExt initialContext;
private final byte[] home_id;
private final org.omg.CORBA.Object homeReference;
@@ -77,6 +78,7 @@
protected Adapter(EJBContainer container, ORB orb, POA
parentPOA, Policy securityPolicy) throws CORBAException {
this.container = container;
this.home_id = container.getContainerID().toString
().getBytes();
+ this.orb = orb;
Any any = orb.create_any();
any.insert_Value(container.getHomeTxPolicyConfig());
@@ -95,7 +97,7 @@
homePOA.the_POAManager().activate();
- StandardServant servant = new StandardServant
(EJBInterfaceType.HOME, container);
+ StandardServant servant = new StandardServant(orb,
EJBInterfaceType.HOME, container);
homePOA.activate_object_with_id(home_id, servant);
homeReference = homePOA.servant_to_reference(servant);
@@ -135,6 +137,10 @@
public org.omg.CORBA.Object getHomeReference() {
return homeReference;
+ }
+
+ public ORB getOrb() {
+ return orb;
}
public void stop() throws CORBAException {
1.13 +4 -4 openejb/modules/core/src/java/org/openejb/
corba/AdapterEntity.java
Index: AdapterEntity.java
===================================================================
RCS file: /home/projects/openejb/scm/openejb/modules/core/src/
java/org/openejb/corba/AdapterEntity.java,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- AdapterEntity.java 13 Jul 2005 20:49:28 -0000 1.12
+++ AdapterEntity.java 5 Dec 2005 21:31:12 -0000 1.13
@@ -101,7 +101,7 @@
poa.the_POAManager().activate();
- StandardServant servant = new StandardServant
(EJBInterfaceType.REMOTE, container);
+ StandardServant servant = new StandardServant(orb,
EJBInterfaceType.REMOTE, container);
referenceInterface = servant._all_interfaces(null,
null)[0];
} catch (Exception e) {
throw new CORBAException(e);
@@ -147,7 +147,7 @@
is.close();
EJBContainer container = getContainer();
- StandardServant servant = new StandardServant
(EJBInterfaceType.REMOTE, container, pk);
+ StandardServant servant = new StandardServant
(getOrb(), EJBInterfaceType.REMOTE, container, pk);
return servant;
} catch (IOException e) {
// if we can't deserialize, then this object
can't exist in this process
1.13 +4 -4 openejb/modules/core/src/java/org/openejb/
corba/AdapterStateful.java
Index: AdapterStateful.java
===================================================================
RCS file: /home/projects/openejb/scm/openejb/modules/core/src/
java/org/openejb/corba/AdapterStateful.java,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- AdapterStateful.java 13 Jul 2005 20:49:28 -0000 1.12
+++ AdapterStateful.java 5 Dec 2005 21:31:12 -0000 1.13
@@ -101,7 +101,7 @@
poa.the_POAManager().activate();
- StandardServant servant = new StandardServant
(EJBInterfaceType.REMOTE, container);
+ StandardServant servant = new StandardServant(orb,
EJBInterfaceType.REMOTE, container);
referenceInterface = servant._all_interfaces(null,
null)[0];
} catch (Exception e) {
throw new CORBAException(e);
@@ -147,7 +147,7 @@
is.close();
EJBContainer container = getContainer();
- StandardServant servant = new StandardServant
(EJBInterfaceType.REMOTE, container, pk);
+ StandardServant servant = new StandardServant
(getOrb(), EJBInterfaceType.REMOTE, container, pk);
return servant;
} catch (IOException e) {
// if we can't deserialize, then this object
can't exist in this process
1.13 +3 -3 openejb/modules/core/src/java/org/openejb/
corba/AdapterStateless.java
Index: AdapterStateless.java
===================================================================
RCS file: /home/projects/openejb/scm/openejb/modules/core/src/
java/org/openejb/corba/AdapterStateless.java,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- AdapterStateless.java 13 Jul 2005 20:49:28 -0000 1.12
+++ AdapterStateless.java 5 Dec 2005 21:31:12 -0000 1.13
@@ -86,7 +86,7 @@
poa.the_POAManager().activate();
- StandardServant servant = new StandardServant
(EJBInterfaceType.REMOTE, container);
+ StandardServant servant = new StandardServant(orb,
EJBInterfaceType.REMOTE, container);
poa.activate_object_with_id(object_id =
container.getContainerID().toString().getBytes(), servant);
objectReference = poa.servant_to_reference(servant);
1.13 +6 -5 openejb/modules/core/src/java/org/openejb/
corba/StandardServant.java
Index: StandardServant.java
===================================================================
RCS file: /home/projects/openejb/scm/openejb/modules/core/src/
java/org/openejb/corba/StandardServant.java,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- StandardServant.java 18 Nov 2005 00:42:05 -0000 1.12
+++ StandardServant.java 5 Dec 2005 21:31:12 -0000 1.13
@@ -66,6 +66,7 @@
import org.apache.geronimo.core.service.InvocationResult;
import org.apache.geronimo.naming.java.RootContext;
import org.apache.geronimo.naming.enc.EnterpriseNamingContext;
+import org.omg.CORBA.ORB;
import org.omg.CORBA.BAD_OPERATION;
import org.omg.CORBA.INVALID_TRANSACTION;
import org.omg.CORBA.MARSHAL;
@@ -111,11 +112,11 @@
private final Map operations;
private final Context enc;
- public StandardServant(EJBInterfaceType ejbInterfaceType,
EJBContainer ejbContainer) {
- this(ejbInterfaceType, ejbContainer, null);
+ public StandardServant(ORB orb, EJBInterfaceType
ejbInterfaceType, EJBContainer ejbContainer) {
+ this(orb, ejbInterfaceType, ejbContainer, null);
}
- public StandardServant(EJBInterfaceType ejbInterfaceType,
EJBContainer ejbContainer, Object primaryKey) {
+ public StandardServant(ORB orb, EJBInterfaceType
ejbInterfaceType, EJBContainer ejbContainer, Object primaryKey) {
this.ejbInterfaceType = ejbInterfaceType;
this.ejbContainer = ejbContainer;
this.primaryKey = primaryKey;