|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.activemq.ra.SessionAndProducerHelper
public class SessionAndProducerHelper
A helper class used to provide access to the current active
SessionAndProducer instance being used to process a message
in the current thread so that messages can be produced using the same
session.
| Constructor Summary | |
|---|---|
SessionAndProducerHelper()
|
|
| Method Summary | |
|---|---|
static SessionAndProducer |
getActiveSessionAndProducer()
Returns the current SessionAndProducer used by the current thread which is processing a message. |
static void |
register(SessionAndProducer sessionAndProducer)
Registers the session and producer which should be called before the MessageEndpoint.beforeDelivery(java.lang.reflect.Method)
method is called. |
static void |
unregister(SessionAndProducer sessionAndProducer)
Unregisters the session and producer which should be called after the MessageEndpoint.afterDelivery()
method is called. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SessionAndProducerHelper()
| Method Detail |
|---|
public static SessionAndProducer getActiveSessionAndProducer()
SessionAndProducer used by the current thread which is processing a message.
This allows us to access the current Session to send a message using the same underlying
session to avoid unnecessary XA or to use regular JMS transactions while using message driven POJOs.
public static void register(SessionAndProducer sessionAndProducer)
MessageEndpoint.beforeDelivery(java.lang.reflect.Method)
method is called.
sessionAndProducer - public static void unregister(SessionAndProducer sessionAndProducer)
MessageEndpoint.afterDelivery()
method is called.
sessionAndProducer -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||