public class AmqpTransactionContext extends Object implements AmqpResourceParent
Constructor and Description |
---|
AmqpTransactionContext(AmqpSession session,
JmsSessionInfo resourceInfo)
Creates a new AmqpTransactionContext instance.
|
Modifier and Type | Method and Description |
---|---|
void |
addChildResource(AmqpResource resource)
Adds the given resource as a child of this resource so that it's
lifetime becomes managed by that of its parent.
|
void |
begin(JmsTransactionId txId,
AsyncResult request) |
void |
commit(JmsTransactionInfo transactionInfo,
AsyncResult request) |
org.apache.qpid.proton.amqp.Binary |
getAmqpTransactionId() |
AmqpProvider |
getProvider() |
AmqpSession |
getSession() |
JmsTransactionId |
getTransactionId() |
boolean |
isTransactionFailed() |
void |
registerTxConsumer(AmqpConsumer consumer) |
void |
removeChildResource(AmqpResource resource)
Removes the given resource from the registered child resources
managed by this one.
|
void |
rollback(JmsTransactionInfo transactionInfo,
AsyncResult request) |
String |
toString() |
public AmqpTransactionContext(AmqpSession session, JmsSessionInfo resourceInfo)
session
- The session that owns this transaction context.resourceInfo
- The resourceInfo that defines this transaction context.public void begin(JmsTransactionId txId, AsyncResult request) throws Exception
Exception
public void commit(JmsTransactionInfo transactionInfo, AsyncResult request) throws Exception
Exception
public void rollback(JmsTransactionInfo transactionInfo, AsyncResult request) throws Exception
Exception
public void registerTxConsumer(AmqpConsumer consumer)
public AmqpSession getSession()
public JmsTransactionId getTransactionId()
public boolean isTransactionFailed()
public org.apache.qpid.proton.amqp.Binary getAmqpTransactionId()
public void addChildResource(AmqpResource resource)
AmqpResourceParent
addChildResource
in interface AmqpResourceParent
resource
- The AmqpResource that is a child of this one.public void removeChildResource(AmqpResource resource)
AmqpResourceParent
removeChildResource
in interface AmqpResourceParent
resource
- The AmqpResource that is no longer a child of this one.public AmqpProvider getProvider()
getProvider
in interface AmqpResourceParent
Copyright © 2013–2016 The Apache Software Foundation. All rights reserved.