1 4 package com.tc.objectserver.handler; 5 6 import com.tc.async.api.AbstractEventHandler; 7 import com.tc.async.api.ConfigurationContext; 8 import com.tc.async.api.EventContext; 9 import com.tc.object.msg.AcknowledgeTransactionMessage; 10 import com.tc.objectserver.core.api.ServerConfigurationContext; 11 import com.tc.objectserver.tx.ServerTransactionManager; 12 13 16 public class TransactionAcknowledgementHandler extends AbstractEventHandler { 17 private ServerTransactionManager transactionManager; 18 19 public void handleEvent(EventContext context) { 20 AcknowledgeTransactionMessage atm = (AcknowledgeTransactionMessage) context; 21 transactionManager.acknowledgement(atm.getRequesterID(), atm.getRequestID(), atm.getChannelID()); 22 } 23 24 public void initialize(ConfigurationContext context) { 25 super.initialize(context); 26 ServerConfigurationContext scc = (ServerConfigurationContext) context; 27 this.transactionManager = scc.getTransactionManager(); 28 } 29 30 } | Popular Tags |