Search in sources :

Example 1 with JacOrbRCServiceInit

use of com.arjuna.ats.internal.jts.orbspecific.jacorb.recoverycoordinators.JacOrbRCServiceInit in project narayana by jbosstm.

the class JacORBRecoveryUnitTest method testInit.

@Test
public void testInit() throws Exception {
    JacOrbRCServiceInit init = new JacOrbRCServiceInit();
    assertFalse(init.startRCservice());
    JacOrbRCServiceInit.shutdownRCService();
    assertTrue(JacOrbRCServiceInit.type() != null);
}
Also used : JacOrbRCServiceInit(com.arjuna.ats.internal.jts.orbspecific.jacorb.recoverycoordinators.JacOrbRCServiceInit) Test(org.junit.Test)

Example 2 with JacOrbRCServiceInit

use of com.arjuna.ats.internal.jts.orbspecific.jacorb.recoverycoordinators.JacOrbRCServiceInit in project narayana by jbosstm.

the class JacORBRecoveryUnitTest method testRecoveryInit.

@Test
public void testRecoveryInit() throws Exception {
    JacOrbRCServiceInit init = new JacOrbRCServiceInit();
    assertFalse(init.startRCservice());
    JacOrbRecoveryInit rinit = new JacOrbRecoveryInit();
    JacOrbRCServiceInit.shutdownRCService();
}
Also used : JacOrbRCServiceInit(com.arjuna.ats.internal.jts.orbspecific.jacorb.recoverycoordinators.JacOrbRCServiceInit) JacOrbRecoveryInit(com.arjuna.ats.internal.jts.orbspecific.jacorb.recoverycoordinators.JacOrbRecoveryInit) Test(org.junit.Test)

Example 3 with JacOrbRCServiceInit

use of com.arjuna.ats.internal.jts.orbspecific.jacorb.recoverycoordinators.JacOrbRCServiceInit in project narayana by jbosstm.

the class JacORBGenericRecoveryCreatorFailureUnitTest method testFail.

@Test
public void testFail() throws Exception {
    JacOrbRCServiceInit init = new JacOrbRCServiceInit();
    JacOrbRecoveryInit rinit = new JacOrbRecoveryInit();
    init.startRCservice();
    RecoveryCreator creator = RecoveryCreator.getCreator();
    GenericRecoveryCreator generic = null;
    if (creator instanceof GenericRecoveryCreator)
        generic = (GenericRecoveryCreator) creator;
    assertTrue(generic != null);
    DemoResource demo = new DemoResource();
    assertTrue(generic.create(demo.getResource(), null) == null);
    JacOrbRCServiceInit.shutdownRCService();
}
Also used : DemoResource(com.hp.mwtests.ts.jts.orbspecific.resources.DemoResource) JacOrbRCServiceInit(com.arjuna.ats.internal.jts.orbspecific.jacorb.recoverycoordinators.JacOrbRCServiceInit) JacOrbRecoveryInit(com.arjuna.ats.internal.jts.orbspecific.jacorb.recoverycoordinators.JacOrbRecoveryInit) RecoveryCreator(com.arjuna.ats.internal.jts.recovery.RecoveryCreator) GenericRecoveryCreator(com.arjuna.ats.internal.jts.recovery.recoverycoordinators.GenericRecoveryCreator) GenericRecoveryCreator(com.arjuna.ats.internal.jts.recovery.recoverycoordinators.GenericRecoveryCreator) Test(org.junit.Test)

Example 4 with JacOrbRCServiceInit

use of com.arjuna.ats.internal.jts.orbspecific.jacorb.recoverycoordinators.JacOrbRCServiceInit in project narayana by jbosstm.

the class JacORBGenericRecoveryCreatorSuccessUnitTest method testSuccess.

@Test
public void testSuccess() throws Exception {
    JacOrbRCServiceInit init = new JacOrbRCServiceInit();
    JacOrbRecoveryInit rinit = new JacOrbRecoveryInit();
    init.startRCservice();
    RecoveryCreator creator = RecoveryCreator.getCreator();
    GenericRecoveryCreator generic = null;
    if (creator instanceof GenericRecoveryCreator)
        generic = (GenericRecoveryCreator) creator;
    assertTrue(generic != null);
    DemoResource demo = new DemoResource();
    ArjunaTransactionImple tx = new ArjunaTransactionImple(null);
    Object[] params = new Object[1];
    params[0] = tx;
    RecoveryCoordinator rc = generic.create(demo.getResource(), params);
    assertTrue(rc != null);
    generic.destroy(rc);
    generic.destroyAll(params);
    JacOrbRCServiceInit.shutdownRCService();
}
Also used : DemoResource(com.hp.mwtests.ts.jts.orbspecific.resources.DemoResource) JacOrbRCServiceInit(com.arjuna.ats.internal.jts.orbspecific.jacorb.recoverycoordinators.JacOrbRCServiceInit) JacOrbRecoveryInit(com.arjuna.ats.internal.jts.orbspecific.jacorb.recoverycoordinators.JacOrbRecoveryInit) ArjunaTransactionImple(com.arjuna.ats.internal.jts.orbspecific.coordinator.ArjunaTransactionImple) RecoveryCoordinator(org.omg.CosTransactions.RecoveryCoordinator) RecoveryCreator(com.arjuna.ats.internal.jts.recovery.RecoveryCreator) GenericRecoveryCreator(com.arjuna.ats.internal.jts.recovery.recoverycoordinators.GenericRecoveryCreator) GenericRecoveryCreator(com.arjuna.ats.internal.jts.recovery.recoverycoordinators.GenericRecoveryCreator) Test(org.junit.Test)

Aggregations

JacOrbRCServiceInit (com.arjuna.ats.internal.jts.orbspecific.jacorb.recoverycoordinators.JacOrbRCServiceInit)4 Test (org.junit.Test)4 JacOrbRecoveryInit (com.arjuna.ats.internal.jts.orbspecific.jacorb.recoverycoordinators.JacOrbRecoveryInit)3 RecoveryCreator (com.arjuna.ats.internal.jts.recovery.RecoveryCreator)2 GenericRecoveryCreator (com.arjuna.ats.internal.jts.recovery.recoverycoordinators.GenericRecoveryCreator)2 DemoResource (com.hp.mwtests.ts.jts.orbspecific.resources.DemoResource)2 ArjunaTransactionImple (com.arjuna.ats.internal.jts.orbspecific.coordinator.ArjunaTransactionImple)1 RecoveryCoordinator (org.omg.CosTransactions.RecoveryCoordinator)1