org.apache.qpid.client
Class AMQSession_0_10

java.lang.Object
  extended by org.apache.qpid.client.Closeable
      extended by org.apache.qpid.client.AMQSession<BasicMessageConsumer_0_10,BasicMessageProducer_0_10>
          extended by org.apache.qpid.client.AMQSession_0_10
All Implemented Interfaces:
Runnable, QueueSession, Session, TopicSession, org.apache.qpid.transport.SessionListener
Direct Known Subclasses:
XASessionImpl

public class AMQSession_0_10
extends AMQSession<BasicMessageConsumer_0_10,BasicMessageProducer_0_10>
implements org.apache.qpid.transport.SessionListener

This is a 0.10 Session


Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.qpid.client.AMQSession
AMQSession.Dispatchable, AMQSession.Dispatcher, AMQSession.IdToConsumerMap<C extends BasicMessageConsumer>
 
Field Summary
protected  org.apache.qpid.transport.Connection _qpidConnection
           
 
Fields inherited from class org.apache.qpid.client.AMQSession
_acknowledgeMode, _channelId, _connection, _consumers, _deliveredMessageTags, _dispatcher, _dispatcherThread, _firstDispatcher, _immediatePrefetch, _messageFactoryRegistry, _queue, _reverseSubscriptionMap, _strictAMQP, _strictAMQPFATAL, _subscriberAccess, _subscriberDetails, _subscriptions, _thisSession, _transacted, _unacknowledgedMessageTags, DECLARE_EXCHANGES, DECLARE_QUEUES, DEFAULT_FLOW_CONTROL_WAIT_FAILURE, DEFAULT_IMMEDIATE, DEFAULT_MANDATORY, DEFAULT_WAIT_ON_SEND, FLOW_CONTROL_WAIT_FAILURE, FLOW_CONTROL_WAIT_PERIOD, IMMEDIATE_PREFETCH, IMMEDIATE_PREFETCH_DEFAULT, STRICT_AMQP, STRICT_AMQP_DEFAULT, STRICT_AMQP_FATAL, STRICT_AMQP_FATAL_DEFAULT, USE_AMQP_ENCODED_MAP_MESSAGE
 
Fields inherited from class org.apache.qpid.client.Closeable
_closed, _closing
 
Fields inherited from interface org.apache.qpid.jms.Session
NO_ACKNOWLEDGE, PRE_ACKNOWLEDGE
 
Fields inherited from interface javax.jms.Session
AUTO_ACKNOWLEDGE, CLIENT_ACKNOWLEDGE, DUPS_OK_ACKNOWLEDGE, SESSION_TRANSACTED
 
Constructor Summary
AMQSession_0_10(org.apache.qpid.transport.Connection qpidConnection, AMQConnection con, int channelId, boolean transacted, int acknowledgeMode, int defaultPrefetchHigh, int defaultPrefetchLow)
          Creates a new session on a connection with the default 0-10 message factory.
AMQSession_0_10(org.apache.qpid.transport.Connection qpidConnection, AMQConnection con, int channelId, boolean transacted, int acknowledgeMode, MessageFactoryRegistry messageFactoryRegistry, int defaultPrefetchHighMark, int defaultPrefetchLowMark)
          Creates a new session on a connection.
 
Method Summary
 void acknowledgeMessage(long deliveryTag, boolean multiple)
          Acknowledge one or many messages.
protected  void addDeliveredMessage(long id)
          Store non committed messages for this session With 0.10 messages are consumed with window mode, we must send a completion before the window size is reached so credits don't dry up.
 void closed(org.apache.qpid.transport.Session ssn)
           
 void commit()
          Commits all messages done in this transaction and releases any locks currently held.
 BasicMessageConsumer_0_10 createMessageConsumer(AMQDestination destination, int prefetchHigh, int prefetchLow, boolean noLocal, boolean exclusive, String messageSelector, org.apache.qpid.framing.FieldTable ft, boolean noConsume, boolean autoClose)
          Create an 0_10 message consumer
 BasicMessageProducer_0_10 createMessageProducer(Destination destination, boolean mandatory, boolean immediate, boolean waitUntilSent, long producerId)
          Create an 0_10 message producer
protected  org.apache.qpid.framing.AMQShortString declareQueue(AMQDestination amqd, AMQProtocolHandler protocolHandler, boolean noLocal, boolean nowait)
           
 void exception(org.apache.qpid.transport.Session ssn, org.apache.qpid.transport.SessionException exc)
           
(package private)  void failoverPrep()
           
protected  void flushAcknowledgments()
           
(package private)  void flushAcknowledgments(boolean setSyncBit)
           
 org.apache.qpid.AMQException getCurrentException()
          Get the latest thrown exception.
 AMQMessageDelegateFactory getMessageDelegateFactory()
           
protected  org.apache.qpid.transport.Session getQpidSession()
          Access to the underlying Qpid Session
 void handleAddressBasedDestination(AMQDestination dest, boolean isConsumer, boolean noWait)
          1.
 boolean isExchangeExist(AMQDestination dest, Node.ExchangeNode node, boolean assertNode)
           
 boolean isQueueBound(AMQDestination destination)
           
 boolean isQueueBound(org.apache.qpid.framing.AMQShortString exchangeName, org.apache.qpid.framing.AMQShortString queueName, org.apache.qpid.framing.AMQShortString routingKey)
          Bind a queue with an exchange.
 boolean isQueueBound(org.apache.qpid.framing.AMQShortString exchangeName, org.apache.qpid.framing.AMQShortString queueName, org.apache.qpid.framing.AMQShortString routingKey, org.apache.qpid.framing.AMQShortString[] bindingKeys)
           
 boolean isQueueBound(String exchangeName, String queueName, String bindingKey, Map<String,Object> args)
           
 boolean isQueueExist(AMQDestination dest, Node.QueueNode node, boolean assertNode)
           
 void message(org.apache.qpid.transport.Session ssn, org.apache.qpid.transport.MessageTransfer xfr)
           
(package private)  void messageAcknowledge(org.apache.qpid.transport.RangeSet ranges, boolean accept)
           
(package private)  void messageAcknowledge(org.apache.qpid.transport.RangeSet ranges, boolean accept, boolean setSyncBit)
           
 void opened(org.apache.qpid.transport.Session ssn)
           
 void rejectMessage(long deliveryTag, boolean requeue)
          Release (0_8 notion of Reject) an acquired message
 void releaseForRollback()
           
protected  Long requestQueueDepth(AMQDestination amqd)
           
 int resolveAddressType(AMQDestination dest)
           
 void resumed(org.apache.qpid.transport.Session ssn)
           
 org.apache.qpid.framing.AMQShortString send0_10QueueDeclare(AMQDestination amqd, AMQProtocolHandler protocolHandler, boolean noLocal, boolean nowait)
          Declare a queue with the given queueName
 void sendClose(long timeout)
          Close this session.
 void sendCommit()
          Commit the receipt and the delivery of all messages exchanged by this session resources.
 void sendConsume(BasicMessageConsumer_0_10 consumer, org.apache.qpid.framing.AMQShortString queueName, AMQProtocolHandler protocolHandler, boolean nowait, String messageSelector, int tag)
          This method is invoked when a consumer is created Registers the consumer with the broker
 void sendCreateQueue(org.apache.qpid.framing.AMQShortString name, boolean autoDelete, boolean durable, boolean exclusive, Map<String,Object> arguments)
          Create a queue with a given name.
 void sendExchangeDeclare(org.apache.qpid.framing.AMQShortString name, org.apache.qpid.framing.AMQShortString type, AMQProtocolHandler protocolHandler, boolean nowait)
          creates an exchange if it does not already exist
 void sendExchangeDeclare(String name, String type, String alternateExchange, Map<String,Object> args, boolean nowait)
           
 void sendQueueBind(org.apache.qpid.framing.AMQShortString queueName, org.apache.qpid.framing.AMQShortString routingKey, org.apache.qpid.framing.FieldTable arguments, org.apache.qpid.framing.AMQShortString exchangeName, AMQDestination destination, boolean nowait)
          Bind a queue with an exchange.
 void sendQueueDeclare(AMQDestination amqd, AMQProtocolHandler protocolHandler, boolean nowait)
          Declare a queue with the given queueName
 void sendQueueDelete(org.apache.qpid.framing.AMQShortString queueName)
          deletes a queue
 void sendRecover()
          This method asks the broker to redeliver all unacknowledged messages
 void sendRollback()
           
 void sendSuspendChannel(boolean suspend)
          Activate/deactivate the message flow for all the consumers of this session.
 void setCurrentException(org.apache.qpid.transport.SessionException se)
           
 void setLegacyFiledsForQueueType(AMQDestination dest)
           
 void setLegacyFiledsForTopicType(AMQDestination dest)
           
 void sync()
           
protected  boolean tagLE(long tag1, long tag2)
           
protected  boolean updateRollbackMark(long currentMark, long deliveryTag)
           
 
Methods inherited from class org.apache.qpid.client.AMQSession
acknowledge, addBindingKey, addUnacknowledgedMessage, bindQueue, bindQueue, checkFlowControl, checkNotClosed, checkTransacted, checkValidTopic, checkValidTopic, close, close, closed, confirmConsumerCancelled, createBrowser, createBrowser, createBrowserConsumer, createBytesMessage, createConsumer, createConsumer, createConsumer, createConsumer, createConsumer, createConsumer, createConsumer, createConsumerImpl, createDurableSubscriber, createDurableSubscriber, createExclusiveConsumer, createExclusiveConsumer, createMapMessage, createMessage, createObjectMessage, createObjectMessage, createProducer, createProducer, createProducer, createProducer, createPublisher, createQueue, createQueue, createQueue, createQueueReceiver, createQueueReceiver, createReceiver, createReceiver, createSender, createStreamMessage, createSubscriber, createSubscriber, createTemporaryQueue, createTemporaryTopic, createTextMessage, createTextMessage, createTopic, declareAndBind, declareExchange, declareQueue, deleteQueue, deregisterConsumer, deregisterProducer, dispatch, getAcknowledgeMode, getAMQConnection, getChannelId, getDefaultPrefetch, getDefaultPrefetchHigh, getDefaultPrefetchLow, getDefaultQueueExchangeName, getDefaultTopicExchangeName, getFailoverMutex, getMessageDeliveryLock, getMessageListener, getMethodRegistry, getProtocolHandler, getProtocolMajorVersion, getProtocolMinorVersion, getQueueDepth, getTemporaryQueueExchangeName, getTemporaryTopicExchangeName, getTicket, getTransacted, hasConsumer, hasFailedOver, hasMessageListeners, isClosed, isClosing, isDirty, isInRecovery, isQueueBound, isStarted, isStrictAMQP, isSuspended, markClean, markClosed, markDirty, messageReceived, prefetch, recover, rejectMessage, rejectMessage, resubscribe, rollback, run, setFlowControl, setHasMessageListeners, setInRecovery, setMessageListener, setTicket, start, startDispatcherIfNecessary, startDispatcherIfNecessary, stop, suspendChannel, syncDispatchQueue, unsubscribe
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_qpidConnection

protected org.apache.qpid.transport.Connection _qpidConnection
Constructor Detail

AMQSession_0_10

AMQSession_0_10(org.apache.qpid.transport.Connection qpidConnection,
                AMQConnection con,
                int channelId,
                boolean transacted,
                int acknowledgeMode,
                MessageFactoryRegistry messageFactoryRegistry,
                int defaultPrefetchHighMark,
                int defaultPrefetchLowMark)
Creates a new session on a connection.

Parameters:
con - The connection on which to create the session.
channelId - The unique identifier for the session.
transacted - Indicates whether or not the session is transactional.
acknowledgeMode - The acknowledgement mode for the session.
messageFactoryRegistry - The message factory factory for the session.
defaultPrefetchHighMark - The maximum number of messages to prefetched before suspending the session.
defaultPrefetchLowMark - The number of prefetched messages at which to resume the session.
qpidConnection - The qpid connection

AMQSession_0_10

AMQSession_0_10(org.apache.qpid.transport.Connection qpidConnection,
                AMQConnection con,
                int channelId,
                boolean transacted,
                int acknowledgeMode,
                int defaultPrefetchHigh,
                int defaultPrefetchLow)
Creates a new session on a connection with the default 0-10 message factory.

Parameters:
con - The connection on which to create the session.
channelId - The unique identifier for the session.
transacted - Indicates whether or not the session is transactional.
acknowledgeMode - The acknowledgement mode for the session.
defaultPrefetchHigh - The maximum number of messages to prefetched before suspending the session.
defaultPrefetchLow - The number of prefetched messages at which to resume the session.
qpidConnection - The connection
Method Detail

failoverPrep

void failoverPrep()
Overrides:
failoverPrep in class AMQSession<BasicMessageConsumer_0_10,BasicMessageProducer_0_10>

acknowledgeMessage

public void acknowledgeMessage(long deliveryTag,
                               boolean multiple)
Acknowledge one or many messages.

Specified by:
acknowledgeMessage in class AMQSession<BasicMessageConsumer_0_10,BasicMessageProducer_0_10>
Parameters:
deliveryTag - The tag of the last message to be acknowledged.
multiple - true to acknowledge all messages up to and including the one specified by the delivery tag, false to just acknowledge that message.

flushAcknowledgments

protected void flushAcknowledgments()
Specified by:
flushAcknowledgments in class AMQSession<BasicMessageConsumer_0_10,BasicMessageProducer_0_10>

flushAcknowledgments

void flushAcknowledgments(boolean setSyncBit)

messageAcknowledge

void messageAcknowledge(org.apache.qpid.transport.RangeSet ranges,
                        boolean accept)

messageAcknowledge

void messageAcknowledge(org.apache.qpid.transport.RangeSet ranges,
                        boolean accept,
                        boolean setSyncBit)

sendQueueBind

public void sendQueueBind(org.apache.qpid.framing.AMQShortString queueName,
                          org.apache.qpid.framing.AMQShortString routingKey,
                          org.apache.qpid.framing.FieldTable arguments,
                          org.apache.qpid.framing.AMQShortString exchangeName,
                          AMQDestination destination,
                          boolean nowait)
                   throws org.apache.qpid.AMQException,
                          FailoverException
Bind a queue with an exchange.

Specified by:
sendQueueBind in class AMQSession<BasicMessageConsumer_0_10,BasicMessageProducer_0_10>
Parameters:
queueName - Specifies the name of the queue to bind. If the queue name is empty, refers to the current queue for the session, which is the last declared queue.
exchangeName - The exchange name.
routingKey - Specifies the routing key for the binding.
arguments - 0_8 specific
Throws:
org.apache.qpid.AMQException
FailoverException

sendClose

public void sendClose(long timeout)
               throws org.apache.qpid.AMQException,
                      FailoverException
Close this session.

Specified by:
sendClose in class AMQSession<BasicMessageConsumer_0_10,BasicMessageProducer_0_10>
Parameters:
timeout - no used / 0_8 specific
Throws:
org.apache.qpid.AMQException
FailoverException

sendCommit

public void sendCommit()
                throws org.apache.qpid.AMQException,
                       FailoverException
Commit the receipt and the delivery of all messages exchanged by this session resources.

Specified by:
sendCommit in class AMQSession<BasicMessageConsumer_0_10,BasicMessageProducer_0_10>
Throws:
org.apache.qpid.AMQException
FailoverException

sendCreateQueue

public void sendCreateQueue(org.apache.qpid.framing.AMQShortString name,
                            boolean autoDelete,
                            boolean durable,
                            boolean exclusive,
                            Map<String,Object> arguments)
                     throws org.apache.qpid.AMQException,
                            FailoverException
Create a queue with a given name.

Specified by:
sendCreateQueue in class AMQSession<BasicMessageConsumer_0_10,BasicMessageProducer_0_10>
Parameters:
name - The queue name
autoDelete - If this field is set and the exclusive field is also set, then the queue is deleted when the connection closes.
durable - If set when creating a new queue, the queue will be marked as durable.
exclusive - Exclusive queues can only be used from one connection at a time.
arguments - Exclusive queues can only be used from one connection at a time.
Throws:
org.apache.qpid.AMQException
FailoverException

sendRecover

public void sendRecover()
                 throws org.apache.qpid.AMQException,
                        FailoverException
This method asks the broker to redeliver all unacknowledged messages

Specified by:
sendRecover in class AMQSession<BasicMessageConsumer_0_10,BasicMessageProducer_0_10>
Throws:
org.apache.qpid.AMQException
FailoverException

releaseForRollback

public void releaseForRollback()
Specified by:
releaseForRollback in class AMQSession<BasicMessageConsumer_0_10,BasicMessageProducer_0_10>

rejectMessage

public void rejectMessage(long deliveryTag,
                          boolean requeue)
Release (0_8 notion of Reject) an acquired message

Specified by:
rejectMessage in class AMQSession<BasicMessageConsumer_0_10,BasicMessageProducer_0_10>
Parameters:
deliveryTag - the message ID
requeue - always true

createMessageConsumer

public BasicMessageConsumer_0_10 createMessageConsumer(AMQDestination destination,
                                                       int prefetchHigh,
                                                       int prefetchLow,
                                                       boolean noLocal,
                                                       boolean exclusive,
                                                       String messageSelector,
                                                       org.apache.qpid.framing.FieldTable ft,
                                                       boolean noConsume,
                                                       boolean autoClose)
                                                throws JMSException
Create an 0_10 message consumer

Specified by:
createMessageConsumer in class AMQSession<BasicMessageConsumer_0_10,BasicMessageProducer_0_10>
Throws:
JMSException

isQueueBound

public boolean isQueueBound(org.apache.qpid.framing.AMQShortString exchangeName,
                            org.apache.qpid.framing.AMQShortString queueName,
                            org.apache.qpid.framing.AMQShortString routingKey)
                     throws JMSException
Bind a queue with an exchange.

Specified by:
isQueueBound in class AMQSession<BasicMessageConsumer_0_10,BasicMessageProducer_0_10>
Parameters:
exchangeName - The exchange name to test for binding against.
queueName - The queue name to check if bound.
routingKey - The routing key to check if the queue is bound under.
Returns:
true if the queue is bound to the exchange and routing key, false if not.
Throws:
JMSException - If the query fails for any reason.

isQueueBound

public boolean isQueueBound(AMQDestination destination)
                     throws JMSException
Specified by:
isQueueBound in class AMQSession<BasicMessageConsumer_0_10,BasicMessageProducer_0_10>
Throws:
JMSException

isQueueBound

public boolean isQueueBound(org.apache.qpid.framing.AMQShortString exchangeName,
                            org.apache.qpid.framing.AMQShortString queueName,
                            org.apache.qpid.framing.AMQShortString routingKey,
                            org.apache.qpid.framing.AMQShortString[] bindingKeys)
                     throws JMSException
Throws:
JMSException

isQueueBound

public boolean isQueueBound(String exchangeName,
                            String queueName,
                            String bindingKey,
                            Map<String,Object> args)
                     throws JMSException
Specified by:
isQueueBound in class AMQSession<BasicMessageConsumer_0_10,BasicMessageProducer_0_10>
Throws:
JMSException

sendConsume

public void sendConsume(BasicMessageConsumer_0_10 consumer,
                        org.apache.qpid.framing.AMQShortString queueName,
                        AMQProtocolHandler protocolHandler,
                        boolean nowait,
                        String messageSelector,
                        int tag)
                 throws org.apache.qpid.AMQException,
                        FailoverException
This method is invoked when a consumer is created Registers the consumer with the broker

Specified by:
sendConsume in class AMQSession<BasicMessageConsumer_0_10,BasicMessageProducer_0_10>
Throws:
org.apache.qpid.AMQException
FailoverException

createMessageProducer

public BasicMessageProducer_0_10 createMessageProducer(Destination destination,
                                                       boolean mandatory,
                                                       boolean immediate,
                                                       boolean waitUntilSent,
                                                       long producerId)
Create an 0_10 message producer

Specified by:
createMessageProducer in class AMQSession<BasicMessageConsumer_0_10,BasicMessageProducer_0_10>

sendExchangeDeclare

public void sendExchangeDeclare(org.apache.qpid.framing.AMQShortString name,
                                org.apache.qpid.framing.AMQShortString type,
                                AMQProtocolHandler protocolHandler,
                                boolean nowait)
                         throws org.apache.qpid.AMQException,
                                FailoverException
creates an exchange if it does not already exist

Specified by:
sendExchangeDeclare in class AMQSession<BasicMessageConsumer_0_10,BasicMessageProducer_0_10>
Throws:
org.apache.qpid.AMQException
FailoverException

sendExchangeDeclare

public void sendExchangeDeclare(String name,
                                String type,
                                String alternateExchange,
                                Map<String,Object> args,
                                boolean nowait)
                         throws org.apache.qpid.AMQException
Throws:
org.apache.qpid.AMQException

sendQueueDeclare

public void sendQueueDeclare(AMQDestination amqd,
                             AMQProtocolHandler protocolHandler,
                             boolean nowait)
                      throws org.apache.qpid.AMQException,
                             FailoverException
Declare a queue with the given queueName

Specified by:
sendQueueDeclare in class AMQSession<BasicMessageConsumer_0_10,BasicMessageProducer_0_10>
Throws:
org.apache.qpid.AMQException
FailoverException

send0_10QueueDeclare

public org.apache.qpid.framing.AMQShortString send0_10QueueDeclare(AMQDestination amqd,
                                                                   AMQProtocolHandler protocolHandler,
                                                                   boolean noLocal,
                                                                   boolean nowait)
                                                            throws org.apache.qpid.AMQException
Declare a queue with the given queueName

Throws:
org.apache.qpid.AMQException

sendQueueDelete

public void sendQueueDelete(org.apache.qpid.framing.AMQShortString queueName)
                     throws org.apache.qpid.AMQException,
                            FailoverException
deletes a queue

Specified by:
sendQueueDelete in class AMQSession<BasicMessageConsumer_0_10,BasicMessageProducer_0_10>
Throws:
org.apache.qpid.AMQException
FailoverException

sendSuspendChannel

public void sendSuspendChannel(boolean suspend)
                        throws org.apache.qpid.AMQException,
                               FailoverException
Activate/deactivate the message flow for all the consumers of this session.

Specified by:
sendSuspendChannel in class AMQSession<BasicMessageConsumer_0_10,BasicMessageProducer_0_10>
Throws:
org.apache.qpid.AMQException
FailoverException

sendRollback

public void sendRollback()
                  throws org.apache.qpid.AMQException,
                         FailoverException
Specified by:
sendRollback in class AMQSession<BasicMessageConsumer_0_10,BasicMessageProducer_0_10>
Throws:
org.apache.qpid.AMQException
FailoverException

getQpidSession

protected org.apache.qpid.transport.Session getQpidSession()
Access to the underlying Qpid Session

Returns:
The associated Qpid Session.

getCurrentException

public org.apache.qpid.AMQException getCurrentException()
Get the latest thrown exception.

Throws:
org.apache.qpid.transport.SessionException - get the latest thrown error.

opened

public void opened(org.apache.qpid.transport.Session ssn)
Specified by:
opened in interface org.apache.qpid.transport.SessionListener

resumed

public void resumed(org.apache.qpid.transport.Session ssn)
Specified by:
resumed in interface org.apache.qpid.transport.SessionListener

message

public void message(org.apache.qpid.transport.Session ssn,
                    org.apache.qpid.transport.MessageTransfer xfr)
Specified by:
message in interface org.apache.qpid.transport.SessionListener

exception

public void exception(org.apache.qpid.transport.Session ssn,
                      org.apache.qpid.transport.SessionException exc)
Specified by:
exception in interface org.apache.qpid.transport.SessionListener

closed

public void closed(org.apache.qpid.transport.Session ssn)
Specified by:
closed in interface org.apache.qpid.transport.SessionListener

declareQueue

protected org.apache.qpid.framing.AMQShortString declareQueue(AMQDestination amqd,
                                                              AMQProtocolHandler protocolHandler,
                                                              boolean noLocal,
                                                              boolean nowait)
                                                       throws org.apache.qpid.AMQException
Overrides:
declareQueue in class AMQSession<BasicMessageConsumer_0_10,BasicMessageProducer_0_10>
Throws:
org.apache.qpid.AMQException

requestQueueDepth

protected Long requestQueueDepth(AMQDestination amqd)
Specified by:
requestQueueDepth in class AMQSession<BasicMessageConsumer_0_10,BasicMessageProducer_0_10>

addDeliveredMessage

protected void addDeliveredMessage(long id)
Store non committed messages for this session With 0.10 messages are consumed with window mode, we must send a completion before the window size is reached so credits don't dry up.

Overrides:
addDeliveredMessage in class AMQSession<BasicMessageConsumer_0_10,BasicMessageProducer_0_10>
Parameters:
id -

commit

public void commit()
            throws JMSException
Description copied from class: AMQSession
Commits all messages done in this transaction and releases any locks currently held.

If the commit fails, because the commit itself is interrupted by a fail-over between requesting that the commit be done, and receiving an acknowledgement that it has been done, then a JMSException will be thrown. The client will be unable to determine whether or not the commit actually happened on the broker in this case.

Specified by:
commit in interface Session
Overrides:
commit in class AMQSession<BasicMessageConsumer_0_10,BasicMessageProducer_0_10>
Throws:
JMSException - If the JMS provider fails to commit the transaction due to some internal error. This does not mean that the commit is known to have failed, merely that it is not known whether it failed or not.

tagLE

protected final boolean tagLE(long tag1,
                              long tag2)
Specified by:
tagLE in class AMQSession<BasicMessageConsumer_0_10,BasicMessageProducer_0_10>

updateRollbackMark

protected final boolean updateRollbackMark(long currentMark,
                                           long deliveryTag)
Specified by:
updateRollbackMark in class AMQSession<BasicMessageConsumer_0_10,BasicMessageProducer_0_10>

sync

public void sync()
          throws org.apache.qpid.AMQException
Specified by:
sync in class AMQSession<BasicMessageConsumer_0_10,BasicMessageProducer_0_10>
Throws:
org.apache.qpid.AMQException

setCurrentException

public void setCurrentException(org.apache.qpid.transport.SessionException se)

getMessageDelegateFactory

public AMQMessageDelegateFactory getMessageDelegateFactory()
Specified by:
getMessageDelegateFactory in class AMQSession<BasicMessageConsumer_0_10,BasicMessageProducer_0_10>

isExchangeExist

public boolean isExchangeExist(AMQDestination dest,
                               Node.ExchangeNode node,
                               boolean assertNode)

isQueueExist

public boolean isQueueExist(AMQDestination dest,
                            Node.QueueNode node,
                            boolean assertNode)

handleAddressBasedDestination

public void handleAddressBasedDestination(AMQDestination dest,
                                          boolean isConsumer,
                                          boolean noWait)
                                   throws org.apache.qpid.AMQException
1. Try to resolve the address type (queue or exchange) 2. if type == queue, 2.1 verify queue exists or create if create == true 2.2 If not throw exception 3. if type == exchange, 3.1 verify exchange exists or create if create == true 3.2 if not throw exception 3.3 if exchange exists (or created) create subscription queue.

Specified by:
handleAddressBasedDestination in class AMQSession<BasicMessageConsumer_0_10,BasicMessageProducer_0_10>
Throws:
org.apache.qpid.AMQException

resolveAddressType

public int resolveAddressType(AMQDestination dest)
                       throws org.apache.qpid.AMQException
Throws:
org.apache.qpid.AMQException

setLegacyFiledsForQueueType

public void setLegacyFiledsForQueueType(AMQDestination dest)

setLegacyFiledsForTopicType

public void setLegacyFiledsForTopicType(AMQDestination dest)


Licensed to the Apache Software Foundation