use of com.arjuna.ats.arjuna.common.Uid in project narayana by jbosstm.
the class RecoveryManager method persistParticipantInformation.
public void persistParticipantInformation(final ParticipantInformation participantInformation) {
if (LOG.isTraceEnabled()) {
LOG.trace("RecoveryManager.persistParticipantInformation: participantInformation=" + participantInformation);
}
if (!isRecoverableParticipant(participantInformation.getParticipant())) {
if (LOG.isTraceEnabled()) {
LOG.trace("RecoveryManager.persistParticipantInformation: participant is not recoverable");
}
return;
}
try {
final RecoveryStore recoveryStore = StoreManager.getRecoveryStore();
final OutputObjectState state = getParticipantInformationOutputState(participantInformation);
final Uid uid = new Uid(participantInformation.getId());
recoveryStore.write_committed(uid, PARTICIPANT_INFORMATION_RECORD_TYPE, state);
} catch (Exception e) {
LOG.warn("Failure while persisting participant information.", e);
}
}
use of com.arjuna.ats.arjuna.common.Uid in project narayana by jbosstm.
the class AITServer02 method main.
public static void main(String[] args) {
try {
ORBInterface.initORB(args, null);
OAInterface.initOA();
Uid uid = ObjectUidStore.loadUid(args[args.length - 2]);
AITServiceImpl01 aitServiceImpl = new AITServiceImpl01(uid);
ServicePOATie servant = new ServicePOATie(aitServiceImpl);
OAInterface.objectIsReady(servant);
Service service = ServiceHelper.narrow(OAInterface.corbaReference(servant));
ServerIORStore.storeIOR(args[args.length - 1], ORBInterface.orb().object_to_string(service));
System.out.println("Ready");
ORBInterface.run();
} catch (Exception exception) {
System.err.println("AITServer02.main: " + exception);
exception.printStackTrace(System.err);
}
}
use of com.arjuna.ats.arjuna.common.Uid in project narayana by jbosstm.
the class AITServer02 method main.
public static void main(String[] args) {
try {
ORBInterface.initORB(args, null);
OAInterface.initOA();
Uid uid = ObjectUidStore.loadUid(args[args.length - 2]);
AITServiceImpl01 aitServiceImpl = new AITServiceImpl01(uid);
ServicePOATie servant = new ServicePOATie(aitServiceImpl);
OAInterface.objectIsReady(servant);
Service service = ServiceHelper.narrow(OAInterface.corbaReference(servant));
ServerIORStore.storeIOR(args[args.length - 1], ORBInterface.orb().object_to_string(service));
System.out.println("Ready");
ORBInterface.run();
} catch (Exception exception) {
System.err.println("AITServer02.main: " + exception);
exception.printStackTrace(System.err);
}
}
use of com.arjuna.ats.arjuna.common.Uid in project narayana by jbosstm.
the class AITServer04 method main.
public static void main(String[] args) {
try {
ORBInterface.initORB(args, null);
OAInterface.initOA();
Uid uid1 = ObjectUidStore.loadUid(args[args.length - 4]);
Uid uid2 = ObjectUidStore.loadUid(args[args.length - 3]);
AITServiceImpl01 aitServiceImpl1 = new AITServiceImpl01(uid1);
AITServiceImpl01 aitServiceImpl2 = new AITServiceImpl01(uid2);
ServicePOATie servant1 = new ServicePOATie(aitServiceImpl1);
ServicePOATie servant2 = new ServicePOATie(aitServiceImpl2);
OAInterface.objectIsReady(servant1);
Service service1 = ServiceHelper.narrow(OAInterface.corbaReference(servant1));
OAInterface.objectIsReady(servant2);
Service service2 = ServiceHelper.narrow(OAInterface.corbaReference(servant2));
ServerIORStore.storeIOR(args[args.length - 2], ORBInterface.orb().object_to_string(service1));
ServerIORStore.storeIOR(args[args.length - 1], ORBInterface.orb().object_to_string(service2));
System.out.println("Ready");
ORBInterface.run();
} catch (Exception exception) {
System.err.println("AITServer04.main: " + exception);
exception.printStackTrace(System.err);
}
}
use of com.arjuna.ats.arjuna.common.Uid in project narayana by jbosstm.
the class InboundBridgeRecoveryModule method periodicWorkSecondPass.
/**
* Called by the RecoveryManager RECOVERY_BACKOFF_PERIOD seconds after the completion of the first pass
*/
@Override
public void periodicWorkSecondPass() {
if (LOG.isTraceEnabled()) {
LOG.trace("InboundBridgeRecoveryModule.periodicWorkSecondPass");
}
recoveredBridges.clear();
final Set<Uid> uids = getUidsToRecover();
uids.retainAll(firstPassUids);
for (Uid uid : uids) {
try {
final SubordinateTransaction st = SubordinationManager.getTransactionImporter().recoverTransaction(uid);
} catch (XAException e) {
LOG.warn(e.getMessage(), e);
}
}
addBridgesToMapping();
}
Aggregations