Search in sources :

Example 1 with DemoSubTranResource

use of org.jboss.jbossts.qa.performance.resources.DemoSubTranResource in project narayana by jbosstm.

the class SingleSubtranAwareResourceRegistration method work.

public void work() throws PerfTestException {
    try {
        /**
         * Retrieve ORB and OA references
         */
        ORB orb = ORB.getInstance(PerformanceFramework.ORB_INSTANCE_NAME);
        OA oa = OA.getRootOA(orb);
        Control control = OTSManager.get_current().get_control();
        Coordinator coordinator = control.get_coordinator();
        DemoSubTranResource resource = new DemoSubTranResource();
        oa.objectIsReady(resource);
        SubtransactionAwareResource res = SubtransactionAwareResourceHelper.narrow(oa.corbaReference(resource));
        coordinator.register_resource(res);
    } catch (Exception e) {
        throw new PerfTestException();
    }
}
Also used : OA(com.arjuna.orbportability.OA) PerfTestInterfacePOA(org.jboss.jbossts.qa.performance.PerfTestInterfacePOA) Control(org.omg.CosTransactions.Control) SubtransactionAwareResource(org.omg.CosTransactions.SubtransactionAwareResource) DemoSubTranResource(org.jboss.jbossts.qa.performance.resources.DemoSubTranResource) PerfTestException(org.jboss.jbossts.qa.performance.PerfTestException) Coordinator(org.omg.CosTransactions.Coordinator) ORB(com.arjuna.orbportability.ORB) PerfTestException(org.jboss.jbossts.qa.performance.PerfTestException)

Aggregations

OA (com.arjuna.orbportability.OA)1 ORB (com.arjuna.orbportability.ORB)1 PerfTestException (org.jboss.jbossts.qa.performance.PerfTestException)1 PerfTestInterfacePOA (org.jboss.jbossts.qa.performance.PerfTestInterfacePOA)1 DemoSubTranResource (org.jboss.jbossts.qa.performance.resources.DemoSubTranResource)1 Control (org.omg.CosTransactions.Control)1 Coordinator (org.omg.CosTransactions.Coordinator)1 SubtransactionAwareResource (org.omg.CosTransactions.SubtransactionAwareResource)1