diff options
author | Aidan Skinner <aidan@apache.org> | 2008-04-23 23:50:34 +0000 |
---|---|---|
committer | Aidan Skinner <aidan@apache.org> | 2008-04-23 23:50:34 +0000 |
commit | d947dab3de62830cbfb41dc989ec7a5ff6af8f55 (patch) | |
tree | 3116da8a78a41339f4eb584c71c1e50c13e5e6f1 /java/broker/src/main/java/org/apache/qpid/server/handler/TxRollbackHandler.java | |
parent | 046e1e70a0bed4689040324eaa7e4da10b7a0508 (diff) | |
download | qpid-python-d947dab3de62830cbfb41dc989ec7a5ff6af8f55.tar.gz |
Delete stuff that's just going to get synced from M2.x
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@651111 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/broker/src/main/java/org/apache/qpid/server/handler/TxRollbackHandler.java')
-rw-r--r-- | java/broker/src/main/java/org/apache/qpid/server/handler/TxRollbackHandler.java | 73 |
1 files changed, 0 insertions, 73 deletions
diff --git a/java/broker/src/main/java/org/apache/qpid/server/handler/TxRollbackHandler.java b/java/broker/src/main/java/org/apache/qpid/server/handler/TxRollbackHandler.java deleted file mode 100644 index f747f7a840..0000000000 --- a/java/broker/src/main/java/org/apache/qpid/server/handler/TxRollbackHandler.java +++ /dev/null @@ -1,73 +0,0 @@ -/* - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * - */ -package org.apache.qpid.server.handler; - -import org.apache.qpid.AMQException; -import org.apache.qpid.framing.TxRollbackBody; -import org.apache.qpid.framing.TxRollbackOkBody; -import org.apache.qpid.protocol.AMQMethodEvent; -import org.apache.qpid.server.AMQChannel; -import org.apache.qpid.server.protocol.AMQProtocolSession; -import org.apache.qpid.server.state.AMQStateManager; -import org.apache.qpid.server.state.StateAwareMethodListener; - -public class TxRollbackHandler implements StateAwareMethodListener<TxRollbackBody> -{ - private static TxRollbackHandler _instance = new TxRollbackHandler(); - - public static TxRollbackHandler getInstance() - { - return _instance; - } - - private TxRollbackHandler() - { - } - - public void methodReceived(AMQStateManager stateManager, AMQMethodEvent<TxRollbackBody> evt) throws AMQException - { - AMQProtocolSession session = stateManager.getProtocolSession(); - - try - { - AMQChannel channel = session.getChannel(evt.getChannelId()); - - if (channel == null) - { - throw evt.getMethod().getChannelNotFoundException(evt.getChannelId()); - } - - channel.rollback(); - // AMQP version change: Hardwire the version to 0-8 (major=8, minor=0) - // TODO: Connect this to the session version obtained from ProtocolInitiation for this session. - // Be aware of possible changes to parameter order as versions change. - session.writeFrame(TxRollbackOkBody.createAMQFrame(evt.getChannelId(), (byte) 8, (byte) 0)); - //Now resend all the unacknowledged messages back to the original subscribers. - //(Must be done after the TxnRollback-ok response). - // Why, are we not allowed to send messages back to client before the ok method? - channel.resend(false); - } - catch (AMQException e) - { - throw evt.getMethod().getChannelException(e.getErrorCode(), "Failed to rollback: " + e.getMessage()); - } - } -} |