Search in sources :

Example 6 with ResourcePOATie

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;
        }
    }
}
Also used : ResourcePOATie(org.omg.CosTransactions.ResourcePOATie)

Aggregations

ResourcePOATie (org.omg.CosTransactions.ResourcePOATie)6 TRANSACTION_ROLLEDBACK (org.omg.CORBA.TRANSACTION_ROLLEDBACK)2 RecoveryCoordinator (org.omg.CosTransactions.RecoveryCoordinator)1 Resource (org.omg.CosTransactions.Resource)1