diff options
| author | Steven Shaw <steshaw@apache.org> | 2006-11-28 23:56:14 +0000 |
|---|---|---|
| committer | Steven Shaw <steshaw@apache.org> | 2006-11-28 23:56:14 +0000 |
| commit | 975b51a533e161e12eaafa5e4702d4a74a5db2e6 (patch) | |
| tree | 1c451c5b9e328f08ba406a26df569cc80780125d /qpid/dotnet/Qpid.Client | |
| parent | 90218314a8ad1ed4bfb7c6dd1cbb23ee67bd502c (diff) | |
| download | qpid-python-975b51a533e161e12eaafa5e4702d4a74a5db2e6.tar.gz | |
QPID-135 Added Rollback support
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@480293 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/dotnet/Qpid.Client')
| -rw-r--r-- | qpid/dotnet/Qpid.Client/Client/AmqChannel.cs | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/qpid/dotnet/Qpid.Client/Client/AmqChannel.cs b/qpid/dotnet/Qpid.Client/Client/AmqChannel.cs index b7c8b1857e..48d87d8f90 100644 --- a/qpid/dotnet/Qpid.Client/Client/AmqChannel.cs +++ b/qpid/dotnet/Qpid.Client/Client/AmqChannel.cs @@ -300,20 +300,15 @@ namespace Qpid.Client CheckNotClosed(); CheckTransacted(); // throws IllegalOperationException if not a transacted session - /*Channel.Rollback frame = new Channel.Rollback(); - frame.channelId = _channelId; - frame.confirmTag = 1;*/ - - // try - // { - // _connection.getProtocolHandler().writeCommandFrameAndWaitForReply(frame, new ChannelReplyListener(_channelId)); - // } - // catch (AMQException e) - // { - // throw new JMSException("Error rolling back session: " + e); - // } - throw new NotImplementedException(); - //_logger.Info("Transaction rolled back on channel " + _channelId); + try + { + _connection.ConvenientProtocolWriter.SyncWrite( + TxRollbackBody.CreateAMQFrame(_channelId), typeof(TxRollbackOkBody)); + } + catch (AMQException e) + { + throw new QpidException("Failed to rollback", e); + } } public override void Close() |
