public synchronized void stop(final StopContext context) { if (inboundBridgeRecoveryManager != null) { try { inboundBridgeRecoveryManager.stop(); } catch (Exception e) { // ignore? } } } }
/** * Called by the RecoveryManager RECOVERY_BACKOFF_PERIOD seconds * after the completion of the first pass */ @Override public void periodicWorkSecondPass() { txbridgeLogger.logger.trace("InboundBridgeRecoveryManager.periodicWorkSecondPass()"); cleanupRecoveredParticipants(); // the XTS recovery module is registered and hence run before us. Therefore by the time we get here // we know deserialize has been called for any BridgeDurableParticipant for which a log exists. // thus if it's not in our participantsAwaitingRecovery list by now, it's presumed rollback. orphanedXAResourcesAreIdentifiable = true; // Inbound tx may have a JCA tx log but no corresponding XTS Participant (i.e. BridgeDurableParticipant) log. // these can now be identified and rolled back. List<Xid> indoubtSubordinates = getIndoubtSubordinates(); for(Xid xid : indoubtSubordinates) { if(checkXid(xid) == XAResourceOrphanFilter.Vote.ROLLBACK) { txbridgeLogger.logger.trace("rolling back orphaned subordinate tx "+xid); try { xaTerminator.rollback(xid); } catch(XAException e) { txbridgeLogger.i18NLogger.error_ibrm_rollbackerr(XAHelper.xidToString(xid), e); } } } }
@Override public synchronized void start(final StartContext context) throws StartException { // XTS expects the TCCL to be set to something that will locate the XTS service implementation classes. final ClassLoader loader = TxBridgeInboundRecoveryService.class.getClassLoader(); WildFlySecurityManager.setCurrentContextClassLoaderPrivileged(loader); try { InboundBridgeRecoveryManager service = new InboundBridgeRecoveryManager(); try { service.start(); } catch (Exception e) { throw XtsAsLogger.ROOT_LOGGER.txBridgeInboundRecoveryServiceFailedToStart(); } inboundBridgeRecoveryManager = service; } finally { WildFlySecurityManager.setCurrentContextClassLoaderPrivileged((ClassLoader) null); } }
/** * MC lifecycle callback, used to unregister components from the recovery manager. */ public void stop() { txbridgeLogger.i18NLogger.info_ibrm_stop(); xtsATRecoveryManager.unregisterRecoveryModule(this); acRecoveryManager.removeModule(this, false); XARecoveryModule xaRecoveryModule = getXARecoveryModule(); xaRecoveryModule.removeXAResourceOrphanFilter(this); }
/** * MC lifecycle callback, used to register components with the recovery manager. */ public void start() { txbridgeLogger.i18NLogger.info_ibrm_start(); xtsATRecoveryManager.registerRecoveryModule(this); acRecoveryManager.addModule(this); XARecoveryModule xaRecoveryModule = getXARecoveryModule(); xaRecoveryModule.addXAResourceOrphanFilter(this); }