Search in sources :

Example 1 with ExplicitStackImple

use of com.hp.mwtests.ts.jts.orbspecific.resources.ExplicitStackImple in project narayana by jbosstm.

the class ExplicitStackServer method main.

public static void main(String[] args) throws Exception {
    ServerORB orb = new ServerORB();
    ORB myORB = orb.getORB();
    RootOA myOA = orb.getOA();
    String refFile = args[0];
    ExplicitStackPOATie theObject = new ExplicitStackPOATie(new ExplicitStackImple());
    myOA.objectIsReady(theObject);
    Services serv = new Services(myORB);
    try {
        TestUtility.registerService(refFile, myORB.orb().object_to_string(myOA.corbaReference(theObject)));
        System.out.println("Ready");
        myOA.run();
    } catch (Exception e) {
        e.printStackTrace();
    }
    myOA.shutdownObject(theObject);
    System.out.println("**ExplicitStackServer exiting**");
}
Also used : ServerORB(com.hp.mwtests.ts.jts.utils.ServerORB) ExplicitStackImple(com.hp.mwtests.ts.jts.orbspecific.resources.ExplicitStackImple) Services(com.arjuna.orbportability.Services) RootOA(com.arjuna.orbportability.RootOA) ExplicitStackPOATie(com.hp.mwtests.ts.jts.TestModule.ExplicitStackPOATie) ServerORB(com.hp.mwtests.ts.jts.utils.ServerORB) ORB(com.arjuna.orbportability.ORB)

Example 2 with ExplicitStackImple

use of com.hp.mwtests.ts.jts.orbspecific.resources.ExplicitStackImple in project narayana by jbosstm.

the class ExplicitInterpositionUnitTest method test.

@Test
public void test() throws Exception {
    ExplicitStackImple stack = new ExplicitStackImple();
    OTSImpleManager.current().begin();
    assertEquals(stack.push(10, OTSImpleManager.current().get_control()), 0);
    OTSImpleManager.current().rollback();
    OTSImpleManager.current().begin();
    ExplicitInterposition inter = new ExplicitInterposition(OTSImpleManager.current().get_control().get_coordinator().get_txcontext(), true);
    inter.unregisterTransaction();
    OTSImpleManager.current().rollback();
}
Also used : ExplicitStackImple(com.hp.mwtests.ts.jts.orbspecific.resources.ExplicitStackImple) ExplicitInterposition(com.arjuna.ats.jts.ExplicitInterposition) Test(org.junit.Test)

Aggregations

ExplicitStackImple (com.hp.mwtests.ts.jts.orbspecific.resources.ExplicitStackImple)2 ExplicitInterposition (com.arjuna.ats.jts.ExplicitInterposition)1 ORB (com.arjuna.orbportability.ORB)1 RootOA (com.arjuna.orbportability.RootOA)1 Services (com.arjuna.orbportability.Services)1 ExplicitStackPOATie (com.hp.mwtests.ts.jts.TestModule.ExplicitStackPOATie)1 ServerORB (com.hp.mwtests.ts.jts.utils.ServerORB)1 Test (org.junit.Test)1