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