Search in sources :

Example 1 with DummyPerfTestImplementation

use of org.jboss.jbossts.qa.performance.implementations.perftestwork.DummyPerfTestImplementation in project narayana by jbosstm.

the class DummyImplServer method run.

/**
 * The main test method which must assert either a pass or a fail.
 */
public void run(String[] args) {
    try {
        String serviceName = args[args.length - 2];
        String serviceName2 = args[args.length - 1];
        /**
         * Retrieve ORB and OA references, intialise them
         * and then set the OTSManager ORB and OA properties
         */
        ORB orb = ORB.getInstance(PerformanceFramework.ORB_INSTANCE_NAME);
        OA oa = OA.getRootOA(orb);
        orb.initORB(args, null);
        oa.initOA(args);
        OTSManager.setORB(orb);
        OTSManager.setPOA(oa);
        DummyPerfTestImplementation obj1 = new DummyPerfTestImplementation();
        oa.objectIsReady(obj1);
        PerfTestInterface objRef1 = PerfTestInterfaceHelper.narrow(oa.corbaReference(obj1));
        ServerIORStore.storeIOR(serviceName, orb.orb().object_to_string(objRef1));
        DummyPerfTestImplementation obj2 = new DummyPerfTestImplementation();
        oa.objectIsReady(obj2);
        PerfTestInterface objRef2 = PerfTestInterfaceHelper.narrow(oa.corbaReference(obj2));
        ServerIORStore.storeIOR(serviceName2, orb.orb().object_to_string(objRef2));
        System.out.println("Ready");
        orb.orb().run();
    } catch (Exception e) {
        e.printStackTrace(System.err);
        System.out.println("Failed");
    }
}
Also used : OA(com.arjuna.orbportability.OA) DummyPerfTestImplementation(org.jboss.jbossts.qa.performance.implementations.perftestwork.DummyPerfTestImplementation) PerfTestInterface(org.jboss.jbossts.qa.performance.PerfTestInterface) ORB(com.arjuna.orbportability.ORB)

Example 2 with DummyPerfTestImplementation

use of org.jboss.jbossts.qa.performance.implementations.perftestwork.DummyPerfTestImplementation in project narayana by jbosstm.

the class NestedOnePhaseServer method run.

/**
 * The main test method which must assert either a pass or a fail.
 */
public void run(String[] args) {
    try {
        String serviceName = args[args.length - 2];
        String serviceName2 = args[args.length - 1];
        /**
         * Retrieve ORB and OA references, intialise them
         * and then set the OTSManager ORB and OA properties
         */
        ORB orb = ORB.getInstance(PerformanceFramework.ORB_INSTANCE_NAME);
        OA oa = OA.getRootOA(orb);
        orb.initORB(args, null);
        oa.initOA(args);
        OTSManager.setORB(orb);
        OTSManager.setPOA(oa);
        SingleResourceRegistration obj1 = new SingleResourceRegistration();
        oa.objectIsReady(obj1);
        PerfTestInterface objRef1 = PerfTestInterfaceHelper.narrow(oa.corbaReference(obj1));
        ServerIORStore.storeIOR(serviceName, orb.orb().object_to_string(objRef1));
        DummyPerfTestImplementation obj2 = new DummyPerfTestImplementation();
        oa.objectIsReady(obj2);
        PerfTestInterface objRef2 = PerfTestInterfaceHelper.narrow(oa.corbaReference(obj2));
        ServerIORStore.storeIOR(serviceName2, orb.orb().object_to_string(objRef2));
        System.out.println("Ready");
        orb.orb().run();
    } catch (Exception e) {
        e.printStackTrace(System.err);
        System.out.println("Failed");
    }
}
Also used : OA(com.arjuna.orbportability.OA) SingleResourceRegistration(org.jboss.jbossts.qa.performance.implementations.perftestwork.SingleResourceRegistration) DummyPerfTestImplementation(org.jboss.jbossts.qa.performance.implementations.perftestwork.DummyPerfTestImplementation) ORB(com.arjuna.orbportability.ORB)

Aggregations

OA (com.arjuna.orbportability.OA)2 ORB (com.arjuna.orbportability.ORB)2 DummyPerfTestImplementation (org.jboss.jbossts.qa.performance.implementations.perftestwork.DummyPerfTestImplementation)2 PerfTestInterface (org.jboss.jbossts.qa.performance.PerfTestInterface)1 SingleResourceRegistration (org.jboss.jbossts.qa.performance.implementations.perftestwork.SingleResourceRegistration)1