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