Search in sources :

Example 56 with IntHolder

use of org.omg.CORBA.IntHolder in project narayana by jbosstm.

the class Client03a method main.

public static void main(String[] args) {
    try {
        ORBInterface.initORB(args, null);
        OAInterface.initOA();
        String serviceIOR1 = ServerIORStore.loadIOR(args[args.length - 2]);
        Service service1 = ServiceHelper.narrow(ORBInterface.orb().string_to_object(serviceIOR1));
        String serviceIOR2 = ServerIORStore.loadIOR(args[args.length - 1]);
        Service service2 = ServiceHelper.narrow(ORBInterface.orb().string_to_object(serviceIOR2));
        CrashRecoveryDelays.awaitRecoveryCR10();
        boolean correct = true;
        OTS.current().begin();
        IntHolder valueHolder1 = new IntHolder();
        IntHolder valueHolder2 = new IntHolder();
        service1.get(OTS.get_current().get_control(), valueHolder1);
        service2.get(OTS.get_current().get_control(), valueHolder2);
        correct = correct && (valueHolder1.value == 1);
        correct = correct && (valueHolder2.value == 1);
        OTS.current().commit(true);
        if (correct) {
            System.out.println("Passed");
        } else {
            System.out.println("Failed");
        }
    } catch (Exception exception) {
        System.out.println("Failed");
        System.err.println("Client03a.main: " + exception);
        exception.printStackTrace(System.err);
    }
    try {
        OAInterface.shutdownOA();
        ORBInterface.shutdownORB();
    } catch (Exception exception) {
        System.err.println("Client03a.main: " + exception);
        exception.printStackTrace(System.err);
    }
}
Also used : IntHolder(org.omg.CORBA.IntHolder)

Example 57 with IntHolder

use of org.omg.CORBA.IntHolder in project narayana by jbosstm.

the class Client04a method main.

public static void main(String[] args) {
    try {
        ORBInterface.initORB(args, null);
        OAInterface.initOA();
        String serviceIOR1 = ServerIORStore.loadIOR(args[args.length - 2]);
        Service service1 = ServiceHelper.narrow(ORBInterface.orb().string_to_object(serviceIOR1));
        String serviceIOR2 = ServerIORStore.loadIOR(args[args.length - 1]);
        Service service2 = ServiceHelper.narrow(ORBInterface.orb().string_to_object(serviceIOR2));
        CrashRecoveryDelays.awaitRecoveryCR10();
        boolean correct = true;
        OTS.current().begin();
        IntHolder valueHolder1 = new IntHolder();
        IntHolder valueHolder2 = new IntHolder();
        service1.get(OTS.current().get_control(), valueHolder1);
        service2.get(OTS.current().get_control(), valueHolder2);
        correct = correct && (valueHolder1.value == 0);
        correct = correct && (valueHolder2.value == 0);
        OTS.current().commit(true);
        if (correct) {
            System.out.println("Passed");
        } else {
            System.out.println("Failed");
        }
    } catch (Exception exception) {
        System.out.println("Failed");
        System.err.println("Client04a.main: " + exception);
        exception.printStackTrace(System.err);
    }
    try {
        OAInterface.shutdownOA();
        ORBInterface.shutdownORB();
    } catch (Exception exception) {
        System.err.println("Client04a.main: " + exception);
        exception.printStackTrace(System.err);
    }
}
Also used : IntHolder(org.omg.CORBA.IntHolder)

Example 58 with IntHolder

use of org.omg.CORBA.IntHolder in project narayana by jbosstm.

the class Client02a method main.

public static void main(String[] args) {
    try {
        ORBInterface.initORB(args, null);
        OAInterface.initOA();
        String serviceIOR = ServerIORStore.loadIOR(args[args.length - 1]);
        Service service = ServiceHelper.narrow(ORBInterface.orb().string_to_object(serviceIOR));
        CrashRecoveryDelays.awaitRecoveryCR09();
        boolean correct = true;
        OTS.current().begin();
        IntHolder valueHolder = new IntHolder();
        service.get(valueHolder);
        correct = correct && (valueHolder.value == 0);
        OTS.current().commit(true);
        if (correct) {
            System.out.println("Passed");
        } else {
            System.out.println("Failed");
        }
    } catch (Exception exception) {
        System.out.println("Failed");
        System.err.println("Client02a.main: " + exception);
        exception.printStackTrace(System.err);
    }
    try {
        OAInterface.shutdownOA();
        ORBInterface.shutdownORB();
    } catch (Exception exception) {
        System.err.println("Client02a.main: " + exception);
        exception.printStackTrace(System.err);
    }
}
Also used : IntHolder(org.omg.CORBA.IntHolder)

Example 59 with IntHolder

use of org.omg.CORBA.IntHolder in project narayana by jbosstm.

the class Client04a method main.

public static void main(String[] args) {
    try {
        ORBInterface.initORB(args, null);
        OAInterface.initOA();
        String serviceIOR1 = ServerIORStore.loadIOR(args[args.length - 2]);
        Service service1 = ServiceHelper.narrow(ORBInterface.orb().string_to_object(serviceIOR1));
        String serviceIOR2 = ServerIORStore.loadIOR(args[args.length - 1]);
        Service service2 = ServiceHelper.narrow(ORBInterface.orb().string_to_object(serviceIOR2));
        CrashRecoveryDelays.awaitRecoveryCR09();
        boolean correct = true;
        OTS.current().begin();
        IntHolder valueHolder1 = new IntHolder();
        IntHolder valueHolder2 = new IntHolder();
        service1.get(valueHolder1);
        service2.get(valueHolder2);
        correct = correct && (valueHolder1.value == 0);
        correct = correct && (valueHolder2.value == 0);
        OTS.current().commit(true);
        if (correct) {
            System.out.println("Passed");
        } else {
            System.out.println("Failed");
        }
    } catch (Exception exception) {
        System.out.println("Failed");
        System.err.println("Client04a.main: " + exception);
        exception.printStackTrace(System.err);
    }
    try {
        OAInterface.shutdownOA();
        ORBInterface.shutdownORB();
    } catch (Exception exception) {
        System.err.println("Client04a.main: " + exception);
        exception.printStackTrace(System.err);
    }
}
Also used : IntHolder(org.omg.CORBA.IntHolder)

Example 60 with IntHolder

use of org.omg.CORBA.IntHolder in project narayana by jbosstm.

the class Client01a method main.

public static void main(String[] args) {
    try {
        ORBInterface.initORB(args, null);
        OAInterface.initOA();
        String serviceIOR = ServerIORStore.loadIOR(args[args.length - 1]);
        Service service = ServiceHelper.narrow(ORBInterface.orb().string_to_object(serviceIOR));
        CrashRecoveryDelays.awaitRecoveryCR10();
        boolean correct = true;
        OTS.current().begin();
        IntHolder valueHolder = new IntHolder();
        service.get(OTS.get_current().get_control(), valueHolder);
        correct = correct && (valueHolder.value == 1);
        OTS.current().commit(true);
        if (correct) {
            System.out.println("Passed");
        } else {
            System.out.println("Failed");
        }
    } catch (Exception exception) {
        System.out.println("Failed");
        System.err.println("Client01a.main: " + exception);
        exception.printStackTrace(System.err);
    }
    try {
        OAInterface.shutdownOA();
        ORBInterface.shutdownORB();
    } catch (Exception exception) {
        System.err.println("Client01a.main: " + exception);
        exception.printStackTrace(System.err);
    }
}
Also used : IntHolder(org.omg.CORBA.IntHolder)

Aggregations

IntHolder (org.omg.CORBA.IntHolder)72 AtomicTransaction (com.arjuna.ats.jts.extensions.AtomicTransaction)12 Control (org.omg.CosTransactions.Control)10 ORB (com.arjuna.orbportability.ORB)6 RootOA (com.arjuna.orbportability.RootOA)6 HitCountRequest (org.codice.alliance.nsili.common.GIAS.HitCountRequest)6 Services (com.arjuna.orbportability.Services)5 ServerORB (com.hp.mwtests.ts.jts.utils.ServerORB)5 AcsJCORBAProblemEx (alma.ACSErrTypeCommon.wrappers.AcsJCORBAProblemEx)4 NameAlreadyUsed (gov.sandia.NotifyMonitoringExt.NameAlreadyUsed)3 NameMapError (gov.sandia.NotifyMonitoringExt.NameMapError)3 Test (org.junit.Test)3 BAD_PARAM (org.omg.CORBA.BAD_PARAM)3 AdminLimitExceeded (org.omg.CosNotifyChannelAdmin.AdminLimitExceeded)3 AcsJNarrowFailedEx (alma.ACSErrTypeCORBA.wrappers.AcsJNarrowFailedEx)2 CurrentImple (com.arjuna.ats.internal.jts.orbspecific.CurrentImple)2 SubmitQueryRequest (org.codice.alliance.nsili.common.GIAS.SubmitQueryRequest)2 DAGListHolder (org.codice.alliance.nsili.common.UCO.DAGListHolder)2 InvalidInputParameter (org.codice.alliance.nsili.common.UCO.InvalidInputParameter)2 ProcessingFault (org.codice.alliance.nsili.common.UCO.ProcessingFault)2