01: /*
02: * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright
03: * notice. All rights reserved.
04: */
05: package com.tc.objectserver.handler;
06:
07: import com.tc.async.api.AbstractEventHandler;
08: import com.tc.async.api.ConfigurationContext;
09: import com.tc.async.api.EventContext;
10: import com.tc.object.msg.AcknowledgeTransactionMessage;
11: import com.tc.objectserver.core.api.ServerConfigurationContext;
12: import com.tc.objectserver.tx.ServerTransactionManager;
13:
14: public class TransactionAcknowledgementHandler extends
15: AbstractEventHandler {
16: private ServerTransactionManager transactionManager;
17:
18: public void handleEvent(EventContext context) {
19: AcknowledgeTransactionMessage atm = (AcknowledgeTransactionMessage) context;
20: transactionManager.acknowledgement(atm.getRequesterID(), atm
21: .getRequestID(), atm.getClientID());
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: }
|