use of com.arjuna.orbportability.OA in project wildfly by wildfly.
the class Util method presetOrb.
public static void presetOrb() throws InvalidName, SystemException {
Properties properties = new Properties();
properties.setProperty(ORBConstants.PERSISTENT_SERVER_PORT_PROPERTY, "15151");
properties.setProperty(ORBConstants.ORB_SERVER_ID_PROPERTY, "1");
new ContextPropagationManager();
org.omg.CORBA.ORB sunOrb = org.omg.CORBA.ORB.init(new String[0], properties);
orb = com.arjuna.orbportability.ORB.getInstance("ClientSide");
orb.setOrb(sunOrb);
OA oa = OA.getRootOA(orb);
org.omg.PortableServer.POA rootPOA = org.omg.PortableServer.POAHelper.narrow(sunOrb.resolve_initial_references("RootPOA"));
oa.setPOA(rootPOA);
oa.initOA();
ORBManager.setORB(orb);
ORBManager.setPOA(oa);
// Recovery manager has to be started on client when we want recovery
// and we start the transaction on client
recoveryManagerPool = Executors.newFixedThreadPool(1);
recoveryManagerPool.submit(new Callable<String>() {
@Override
public String call() throws Exception {
RecoveryManager.main(new String[] { "-test" });
return "Running recovery manager";
}
});
}
Aggregations