Search in sources :

Example 1 with DemoResource

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

the class SingleResourceRegistration 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();
        DemoResource resource = new DemoResource();
        oa.objectIsReady(resource);
        Resource res = ResourceHelper.narrow(oa.corbaReference(resource));
        coordinator.register_resource(res);
    } catch (Exception e) {
        e.printStackTrace(System.err);
        throw new PerfTestException();
    }
}
Also used : DemoResource(org.jboss.jbossts.qa.performance.resources.DemoResource) OA(com.arjuna.orbportability.OA) Control(org.omg.CosTransactions.Control) DemoResource(org.jboss.jbossts.qa.performance.resources.DemoResource) Resource(org.omg.CosTransactions.Resource) Coordinator(org.omg.CosTransactions.Coordinator) ORB(com.arjuna.orbportability.ORB)

Aggregations

OA (com.arjuna.orbportability.OA)1 ORB (com.arjuna.orbportability.ORB)1 DemoResource (org.jboss.jbossts.qa.performance.resources.DemoResource)1 Control (org.omg.CosTransactions.Control)1 Coordinator (org.omg.CosTransactions.Coordinator)1 Resource (org.omg.CosTransactions.Resource)1