public class ServerSessionImpl extends Object implements javax.jms.ServerSession, InboundContext, javax.resource.spi.work.Work, ActiveMQSession.DeliveryListener
Modifier and Type | Field and Description |
---|---|
static Method |
ON_MESSAGE_METHOD |
Constructor and Description |
---|
ServerSessionImpl(ServerSessionPoolImpl pool,
ActiveMQSession session,
javax.resource.spi.work.WorkManager workManager,
javax.resource.spi.endpoint.MessageEndpoint endpoint,
boolean useRAManagedTx,
int batchSize) |
Modifier and Type | Method and Description |
---|---|
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() |
String |
toString() |
public static final Method ON_MESSAGE_METHOD
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
javax.jms.JMSException
public javax.jms.Session getSession() throws javax.jms.JMSException
InboundContext
getSession
in interface javax.jms.ServerSession
getSession
in interface InboundContext
javax.jms.JMSException
protected boolean isStale()
public javax.jms.MessageProducer getMessageProducer() throws javax.jms.JMSException
InboundContext
getMessageProducer
in interface InboundContext
javax.jms.JMSException
public void start() throws javax.jms.JMSException
start
in interface javax.jms.ServerSession
javax.jms.JMSException
ServerSession.start()
public void run()
run
in interface Runnable
Runnable.run()
public void beforeDelivery(ActiveMQSession session, javax.jms.Message msg)
beforeDelivery
in interface ActiveMQSession.DeliveryListener
public void afterDelivery(ActiveMQSession session, javax.jms.Message msg)
afterDelivery
in interface ActiveMQSession.DeliveryListener
public void release()
release
in interface javax.resource.spi.work.Work
Work.release()
public String toString()
toString
in class Object
Object.toString()
public void close()
Copyright © 2005–2017. All rights reserved.