org.apache.activemq.ra
Class ServerSessionImpl
java.lang.Object
org.apache.activemq.ra.ServerSessionImpl
- All Implemented Interfaces:
- java.lang.Runnable, javax.jms.ServerSession, javax.resource.spi.work.Work, ActiveMQSession.DeliveryListener, InboundContext
public class ServerSessionImpl
- extends java.lang.Object
- implements javax.jms.ServerSession, InboundContext, javax.resource.spi.work.Work, ActiveMQSession.DeliveryListener
Method Summary |
void |
afterDelivery(ActiveMQSession session,
javax.jms.Message msg)
The ActiveMQSession's run method will call back to this method after
dispactching a message to the MessageListener. |
void |
beforeDelivery(ActiveMQSession session,
javax.jms.Message msg)
The ActiveMQSession's run method will call back to this method before
dispactching a message to the MessageListener. |
void |
close()
|
javax.jms.MessageProducer |
getMessageProducer()
Lazily creates a message producer that can be used to send messages using the
same JMS Session which is being used to dispatch messages which minimises the XA
overheard of consuming and producing or allows JMS transactions to be used for consuming
and producing messages. |
javax.jms.Session |
getSession()
Returns the current session being used to process a JMS message in the current thread. |
protected boolean |
isStale()
|
void |
release()
|
void |
run()
|
void |
start()
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
ON_MESSAGE_METHOD
public static final java.lang.reflect.Method ON_MESSAGE_METHOD
ServerSessionImpl
public ServerSessionImpl(ServerSessionPoolImpl pool,
ActiveMQSession session,
javax.resource.spi.work.WorkManager workManager,
javax.resource.spi.endpoint.MessageEndpoint endpoint,
boolean useRAManagedTx,
int batchSize)
throws javax.jms.JMSException
- Throws:
javax.jms.JMSException
getSession
public javax.jms.Session getSession()
throws javax.jms.JMSException
- Description copied from interface:
InboundContext
- Returns the current session being used to process a JMS message in the current thread.
- Specified by:
getSession
in interface javax.jms.ServerSession
- Specified by:
getSession
in interface InboundContext
- Throws:
javax.jms.JMSException
isStale
protected boolean isStale()
getMessageProducer
public javax.jms.MessageProducer getMessageProducer()
throws javax.jms.JMSException
- Description copied from interface:
InboundContext
- Lazily creates a message producer that can be used to send messages using the
same JMS Session which is being used to dispatch messages which minimises the XA
overheard of consuming and producing or allows JMS transactions to be used for consuming
and producing messages.
- Specified by:
getMessageProducer
in interface InboundContext
- Returns:
- the current message producer or a new one is lazily created, using a null
destination so the destination must be specified on a send() method.
- Throws:
javax.jms.JMSException
start
public void start()
throws javax.jms.JMSException
- Specified by:
start
in interface javax.jms.ServerSession
- Throws:
javax.jms.JMSException
- See Also:
ServerSession.start()
run
public void run()
- Specified by:
run
in interface java.lang.Runnable
- See Also:
Runnable.run()
beforeDelivery
public void beforeDelivery(ActiveMQSession session,
javax.jms.Message msg)
- The ActiveMQSession's run method will call back to this method before
dispactching a message to the MessageListener.
- Specified by:
beforeDelivery
in interface ActiveMQSession.DeliveryListener
afterDelivery
public void afterDelivery(ActiveMQSession session,
javax.jms.Message msg)
- The ActiveMQSession's run method will call back to this method after
dispactching a message to the MessageListener.
- Specified by:
afterDelivery
in interface ActiveMQSession.DeliveryListener
release
public void release()
- Specified by:
release
in interface javax.resource.spi.work.Work
- See Also:
Work.release()
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
- See Also:
Object.toString()
close
public void close()
Copyright © 2005-2012. All Rights Reserved.