use of org.omg.CosTransactions.ResourcePOATie in project narayana by jbosstm.
the class ServiceImpl01 method oper.
public void oper(ResourceBehavior[] resource_behaviors) {
_resourceImpl = new ResourceImpl01[resource_behaviors.length];
_resource = new Resource[resource_behaviors.length];
for (int index = 0; index < resource_behaviors.length; index++) {
try {
_resourceImpl[index] = new ResourceImpl01(_objectNumber, index, resource_behaviors[index]);
ResourcePOATie servant = new ResourcePOATie(_resourceImpl[index]);
OAInterface.objectIsReady(servant);
_resource[index] = ResourceHelper.narrow(OAInterface.corbaReference(servant));
OTS.current().get_control().get_coordinator().register_resource(_resource[index]);
} catch (Exception exception) {
System.err.println("ServiceImpl01.oper: " + exception);
exception.printStackTrace(System.err);
_isCorrect = false;
}
}
}
Aggregations