- public void onReceive(Object message) throws Exception {
- log.debug("Received message {}", message);
-
- if (message instanceof ReadData) {
- readData((ReadData) message);
- } else if (message instanceof WriteData) {
- writeData((WriteData) message);
- } else if (message instanceof MergeData) {
- mergeData((MergeData) message);
- } else if (message instanceof DeleteData) {
- deleteData((DeleteData) message);
- } else if (message instanceof ReadyTransaction) {
- readyTransaction((ReadyTransaction) message);
- } else if (message instanceof CloseTransaction) {
- closeTransaction((CloseTransaction) message);
+ public void handleReceive(Object message) throws Exception {
+ if (message.getClass().equals(CloseTransaction.SERIALIZABLE_CLASS)) {
+ closeTransaction(true);