Skip to content

Commit

Permalink
JBTM-1854 Don't initialise two orbs
Browse files Browse the repository at this point in the history
  • Loading branch information
mmusgrov committed Sep 30, 2015
1 parent 4551ce6 commit 9321cc2
Show file tree
Hide file tree
Showing 22 changed files with 141 additions and 265 deletions.
Expand Up @@ -36,9 +36,8 @@
import org.junit.Test;
import org.omg.CosTransactions.Current;

import com.arjuna.ats.internal.jts.ORBManager;
import com.hp.mwtests.ts.jts.utils.ServerORB;
import com.arjuna.ats.jts.OTSManager;
import com.arjuna.orbportability.OA;
import com.arjuna.orbportability.ORB;
import com.arjuna.orbportability.RootOA;
import com.hp.mwtests.ts.jts.orbspecific.resources.DemoResource;
Expand All @@ -52,17 +51,9 @@ public void test() throws Exception
boolean errorp = false;
boolean errorc = false;

ORB myORB = null;
RootOA myOA = null;

myORB = ORB.getInstance("test");
myOA = OA.getRootOA(myORB);

myORB.initORB(new String[] {}, null);
myOA.initOA();

ORBManager.setORB(myORB);
ORBManager.setPOA(myOA);
ServerORB orb = new ServerORB();
ORB myORB = orb.getORB();
RootOA myOA = orb.getOA();

try {

Expand Down Expand Up @@ -121,4 +112,4 @@ public static void main (String[] args)
ex.printStackTrace();
}
}
}
}
Expand Up @@ -41,9 +41,8 @@
import org.omg.CosTransactions.Coordinator;
import org.omg.CosTransactions.Status;

import com.arjuna.ats.internal.jts.ORBManager;
import com.hp.mwtests.ts.jts.utils.ServerORB;
import com.arjuna.ats.jts.OTSManager;
import com.arjuna.orbportability.OA;
import com.arjuna.orbportability.ORB;
import com.arjuna.orbportability.RootOA;
import com.hp.mwtests.ts.jts.orbspecific.resources.demosync;
Expand All @@ -62,15 +61,10 @@ public void test()

try
{
myORB = ORB.getInstance("test");
ServerORB orb = new ServerORB();

myOA = OA.getRootOA(myORB);

myORB.initORB(new String[] {}, null);
myOA.initOA();

ORBManager.setORB(myORB);
ORBManager.setPOA(myOA);
myORB = orb.getORB();
myOA = orb.getOA();

Control myControl = null;
org.omg.CosTransactions.Current current = OTSManager.get_current();
Expand Down Expand Up @@ -135,4 +129,4 @@ public static void main (String[] args)

obj.test();
}
}
}
Expand Up @@ -34,10 +34,9 @@
import org.omg.CORBA.IntHolder;
import org.omg.CosTransactions.Control;

import com.arjuna.ats.internal.jts.ORBManager;
import com.hp.mwtests.ts.jts.utils.ServerORB;
import com.arjuna.ats.internal.jts.OTSImpleManager;
import com.arjuna.ats.internal.jts.orbspecific.CurrentImple;
import com.arjuna.orbportability.OA;
import com.arjuna.orbportability.ORB;
import com.arjuna.orbportability.RootOA;
import com.hp.mwtests.ts.jts.TestModule.ExplicitStack;
Expand All @@ -48,17 +47,9 @@ public class ExplicitArjunaClient
{
public static void main(String[] args) throws Exception
{
ORB myORB = null;
RootOA myOA = null;

myORB = ORB.getInstance("test");
myOA = OA.getRootOA(myORB);

myORB.initORB(new String[] {}, null);
myOA.initOA();

ORBManager.setORB(myORB);
ORBManager.setPOA(myOA);
ServerORB orb = new ServerORB();
ORB myORB = orb.getORB();
RootOA myOA = orb.getOA();

CurrentImple current = OTSImpleManager.current();
String refFile = args[0];
Expand Down
Expand Up @@ -33,10 +33,9 @@

import org.omg.CORBA.IntHolder;

import com.arjuna.ats.internal.jts.ORBManager;
import com.hp.mwtests.ts.jts.utils.ServerORB;
import com.arjuna.ats.internal.jts.OTSImpleManager;
import com.arjuna.ats.internal.jts.orbspecific.CurrentImple;
import com.arjuna.orbportability.OA;
import com.arjuna.orbportability.ORB;
import com.arjuna.orbportability.RootOA;
import com.arjuna.orbportability.Services;
Expand All @@ -48,17 +47,9 @@ public class ImplicitArjunaClient
{
public static void main(String[] args) throws Exception
{
ORB myORB = null;
RootOA myOA = null;

myORB = ORB.getInstance("test");
myOA = OA.getRootOA(myORB);

myORB.initORB(new String[] {}, null);
myOA.initOA();

ORBManager.setORB(myORB);
ORBManager.setPOA(myOA);
ServerORB orb = new ServerORB();
ORB myORB = orb.getORB();
RootOA myOA = orb.getOA();

String refFile = args[0];
CurrentImple current = OTSImpleManager.current();
Expand Down
Expand Up @@ -33,10 +33,9 @@

import org.omg.CosTransactions.Control;

import com.arjuna.ats.internal.jts.ORBManager;
import com.hp.mwtests.ts.jts.utils.ServerORB;
import com.arjuna.ats.internal.jts.OTSImpleManager;
import com.arjuna.ats.internal.jts.orbspecific.CurrentImple;
import com.arjuna.orbportability.OA;
import com.arjuna.orbportability.ORB;
import com.arjuna.orbportability.RootOA;
import com.arjuna.orbportability.Services;
Expand All @@ -48,18 +47,9 @@ public class CurrentTest
{
public static void main(String[] args) throws Exception
{
ORB myORB = null;
RootOA myOA = null;

myORB = ORB.getInstance("test");
myOA = OA.getRootOA(myORB);

myORB.initORB(new String[] {}, null);
myOA.initOA();

ORBManager.setORB(myORB);
ORBManager.setPOA(myOA);

ServerORB orb = new ServerORB();
ORB myORB = orb.getORB();
RootOA myOA = orb.getOA();

CurrentImple current = OTSImpleManager.current();
Control myControl = null;
Expand Down
Expand Up @@ -33,10 +33,9 @@

import org.omg.CosTransactions.Control;

import com.arjuna.ats.internal.jts.ORBManager;
import com.hp.mwtests.ts.jts.utils.ServerORB;
import com.arjuna.ats.internal.jts.OTSImpleManager;
import com.arjuna.ats.internal.jts.orbspecific.CurrentImple;
import com.arjuna.orbportability.OA;
import com.arjuna.orbportability.ORB;
import com.arjuna.orbportability.RootOA;
import com.arjuna.orbportability.Services;
Expand All @@ -48,18 +47,9 @@ public class ExplicitInterClient
{
public static void main(String[] args) throws Exception
{
ORB myORB = null;
RootOA myOA = null;

myORB = ORB.getInstance("test");
myOA = OA.getRootOA(myORB);

myORB.initORB(new String[] {}, null);
myOA.initOA();

ORBManager.setORB(myORB);
ORBManager.setPOA(myOA);

ServerORB orb = new ServerORB();
ORB myORB = orb.getORB();
RootOA myOA = orb.getOA();

CurrentImple current = OTSImpleManager.current();
Control theControl = null;
Expand Down
Expand Up @@ -33,8 +33,7 @@

import org.omg.CORBA.IntHolder;

import com.arjuna.ats.internal.jts.ORBManager;
import com.arjuna.orbportability.OA;
import com.hp.mwtests.ts.jts.utils.ServerORB;
import com.arjuna.orbportability.ORB;
import com.arjuna.orbportability.RootOA;
import com.arjuna.orbportability.Services;
Expand All @@ -51,17 +50,9 @@ public class DistributedHammer1

public static void main(String[] args) throws Exception
{
ORB myORB = null;
RootOA myOA = null;

myORB = ORB.getInstance("test");
myOA = OA.getRootOA(myORB);

myORB.initORB(new String[] {}, null);
myOA.initOA();

ORBManager.setORB(myORB);
ORBManager.setPOA(myOA);
ServerORB orb = new ServerORB();
ORB myORB = orb.getORB();
RootOA myOA = orb.getOA();

String server1 = args[0];
String server2 = args[1];
Expand Down
Expand Up @@ -35,8 +35,7 @@
import com.hp.mwtests.ts.jts.utils.TaskProgress;
import org.omg.CORBA.IntHolder;

import com.arjuna.ats.internal.jts.ORBManager;
import com.arjuna.orbportability.OA;
import com.hp.mwtests.ts.jts.utils.ServerORB;
import com.arjuna.orbportability.ORB;
import com.arjuna.orbportability.RootOA;
import com.arjuna.orbportability.Services;
Expand All @@ -54,17 +53,9 @@ public class DistributedHammer2

public static void main(String[] args) throws Exception
{
ORB myORB = null;
RootOA myOA = null;

myORB = ORB.getInstance("test");
myOA = OA.getRootOA(myORB);

myORB.initORB(new String[] {}, null);
myOA.initOA();

ORBManager.setORB(myORB);
ORBManager.setPOA(myOA);
ServerORB orb = new ServerORB();
ORB myORB = orb.getORB();
RootOA myOA = orb.getOA();

String server1 = args[0];
String server2 = args[1];
Expand Down
Expand Up @@ -33,8 +33,7 @@

import org.omg.CORBA.IntHolder;

import com.arjuna.ats.internal.jts.ORBManager;
import com.arjuna.orbportability.OA;
import com.hp.mwtests.ts.jts.utils.ServerORB;
import com.arjuna.orbportability.ORB;
import com.arjuna.orbportability.RootOA;
import com.arjuna.orbportability.Services;
Expand All @@ -52,17 +51,9 @@ public class DistributedHammer3

public static void main(String[] args) throws Exception
{
ORB myORB = null;
RootOA myOA = null;

myORB = ORB.getInstance("test");
myOA = OA.getRootOA(myORB);

myORB.initORB(new String[] {}, null);
myOA.initOA();

ORBManager.setORB(myORB);
ORBManager.setPOA(myOA);
ServerORB orb = new ServerORB();
ORB myORB = orb.getORB();
RootOA myOA = orb.getOA();

String server1 = args[0];
String server2 = args[1];
Expand Down
Expand Up @@ -31,8 +31,7 @@

package com.hp.mwtests.ts.jts.remote.hammer;

import com.arjuna.ats.internal.jts.ORBManager;
import com.arjuna.orbportability.OA;
import com.hp.mwtests.ts.jts.utils.ServerORB;
import com.arjuna.orbportability.ORB;
import com.arjuna.orbportability.RootOA;
import io.narayana.perf.Measurement;
Expand All @@ -59,14 +58,9 @@ public static void main(String[] args) throws Exception
int batchSize = 100;
int warmUpCount = 0;

ORB myORB = ORB.getInstance("test");
RootOA myOA = OA.getRootOA(myORB);

myORB.initORB(new String[] {}, null);
myOA.initOA();

ORBManager.setORB(myORB);
ORBManager.setPOA(myOA);
ServerORB orb = new ServerORB();
ORB myORB = orb.getORB();
RootOA myOA = orb.getOA();

String metricName = "JTSRemote_PerfTest_PerfHammer_" + System.getProperty("org.omg.CORBA.ORBClass",
myORB.orb().getClass().getName());
Expand Down
Expand Up @@ -31,10 +31,9 @@

package com.hp.mwtests.ts.jts.remote.implicit;

import com.arjuna.ats.internal.jts.ORBManager;
import com.hp.mwtests.ts.jts.utils.ServerORB;
import com.arjuna.ats.internal.jts.OTSImpleManager;
import com.arjuna.ats.internal.jts.orbspecific.CurrentImple;
import com.arjuna.orbportability.OA;
import com.arjuna.orbportability.ORB;
import com.arjuna.orbportability.RootOA;
import com.arjuna.orbportability.Services;
Expand All @@ -46,17 +45,9 @@ public class ImplicitClient
{
public static void main(String[] args) throws Exception
{
ORB myORB = null;
RootOA myOA = null;

myORB = ORB.getInstance("test");
myOA = OA.getRootOA(myORB);

myORB.initORB(new String[] {}, null);
myOA.initOA();

ORBManager.setORB(myORB);
ORBManager.setPOA(myOA);
ServerORB orb = new ServerORB();
ORB myORB = orb.getORB();
RootOA myOA = orb.getOA();

String refFile = args[0];

Expand Down

0 comments on commit 9321cc2

Please sign in to comment.