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();
}
}
Aggregations