@Override public void handleEvent(EventContext context) { final BroadcastTransactionMessageImpl btm = (BroadcastTransactionMessageImpl) context; final GlobalTransactionID lowWaterMark = btm.getLowGlobalTransactionIDWatermark(); if (!lowWaterMark.isNull()) { this.gtxManager.setLowWatermark(lowWaterMark, btm.getSourceNodeID()); } if (this.gtxManager.startApply(btm.getCommitterID(), btm.getTransactionID(), btm.getGlobalTransactionID(), btm.getSourceNodeID())) { final Collection changes = btm.getObjectChanges(); if (changes.size() > 0 || btm.getNewRoots().size() > 0) { try { this.txManager.apply(btm.getTransactionType(), btm.getLockIDs(), changes, btm.getNewRoots()); } catch (TCClassNotFoundException cnfe) { logger.warn("transaction apply failed for " + btm.getTransactionID(), cnfe); // Do not ignore, re-throw to kill this L1 throw cnfe; } catch (TCNotRunningException tcnre) { // Catch and ignore, since we are shutting down anyway; ack should be sent below though, to prevent blockage // when this is an echo broadcast (for new root creation, for instance) logger.debug("ignoring transaction apply failure for " + btm.getTransactionID() + " due to " + tcnre); } } notifyLogicalChangeResultsReceived(btm); sendServerEvents(btm); } notifyLockManager(btm); sendAck(btm); btm.recycle(); }
@Override public void handleEvent(EventContext context) { final BroadcastTransactionMessageImpl btm = (BroadcastTransactionMessageImpl) context; List dmis = btm.getDmiDescriptors(); + btm.getCommitterID() + ", " + btm.getTransactionID() + btm.getGlobalTransactionID() + ", notified: " + btm.addNotifiesTo(new LinkedList())); Assert.eval(btm.getLockIDs().size() > 0); GlobalTransactionID lowWaterMark = btm.getLowGlobalTransactionIDWatermark(); if (!lowWaterMark.isNull()) { this.gtxManager.setLowWatermark(lowWaterMark, btm.getSourceNodeID()); if (this.gtxManager.startApply(btm.getCommitterID(), btm.getTransactionID(), btm.getGlobalTransactionID(), btm.getSourceNodeID())) { Collection changes = btm.getObjectChanges(); if (changes.size() > 0 || btm.getNewRoots().size() > 0) { System.err.println(this.cidProvider.getClientID() + " Applying - committer=" + btm.getCommitterID() + " , " + btm.getTransactionID() + " , " + btm.getGlobalTransactionID()); this.txManager.apply(btm.getTransactionType(), btm.getLockIDs(), changes, btm.getNewRoots()); } catch (TCClassNotFoundException cnfe) { logger.warn("transaction apply failed for " + btm.getTransactionID(), cnfe); Collection notifies = btm.addNotifiesTo(new LinkedList()); for (Iterator i = notifies.iterator(); i.hasNext();) { ClientServerExchangeLockContext lc = (ClientServerExchangeLockContext) i.next(); if (this.sessionManager.isCurrentSession(btm.getSourceNodeID(), btm.getLocalSessionID())) {
@Override public void handleEvent(EventContext context) { final BroadcastTransactionMessageImpl btm = (BroadcastTransactionMessageImpl) context; final GlobalTransactionID lowWaterMark = btm.getLowGlobalTransactionIDWatermark(); if (!lowWaterMark.isNull()) { this.gtxManager.setLowWatermark(lowWaterMark, btm.getSourceNodeID()); } if (this.gtxManager.startApply(btm.getCommitterID(), btm.getTransactionID(), btm.getGlobalTransactionID(), btm.getSourceNodeID())) { final Collection changes = btm.getObjectChanges(); if (changes.size() > 0 || btm.getNewRoots().size() > 0) { try { this.txManager.apply(btm.getTransactionType(), btm.getLockIDs(), changes, btm.getNewRoots()); } catch (TCClassNotFoundException cnfe) { logger.warn("transaction apply failed for " + btm.getTransactionID(), cnfe); // Do not ignore, re-throw to kill this L1 throw cnfe; } catch (TCNotRunningException tcnre) { // Catch and ignore, since we are shutting down anyway; ack should be sent below though, to prevent blockage // when this is an echo broadcast (for new root creation, for instance) logger.debug("ignoring transaction apply failure for " + btm.getTransactionID() + " due to " + tcnre); } } notifyLogicalChangeResultsReceived(btm); sendServerEvents(btm); } notifyLockManager(btm); sendAck(btm); btm.recycle(); }