public class JmsMatsTransactionManager_Jms extends java.lang.Object implements JmsMatsTransactionManager, JmsMatsStatics
JmsMatsTransactionManager
handling only JMS (getting Connections, and creating Sessions),
doing all transactional handling "native", i.e. using only the JMS API (as opposed to e.g. using Spring and its
transaction managers).
The JMS Connection and Session handling is performed in calling code, where the resulting JmsMatsJmsSessionHandler.JmsSessionHolder
is
provided to the TransactionalContext_Jms#doTransaction(JmsMatsInternalExecutionContext, ProcessingLambda)
.
Note: Musing about the JmsMats transactional handling 6 years later (2021-02-03), I do find it a tad bit obscure.
This entire Mats implementation is a JMS implementation, and all JMS Session handling is handled by the "core", but
just exactly commit and rollback is handled in this class. The extensions handling SQL are much more "independent" as
such. However, the big point is the JmsMatsStageProcessor
, which has a JMS Consumer-pump/loop, and that
Consumer's JMS Session is intimately intertwined with the transaction aspects handled here. Had it only been the
JmsMatsInitiator
and as such initiations of messages that should be handled, much more of the JMS transaction
management could have been handled here. (Actually, the only transactional aspect at that point would have been to
put a transaction around the actual sending, so that if more than one message was sent, they were all either sent or
not.)Modifier and Type | Class and Description |
---|---|
static class |
JmsMatsTransactionManager_Jms.TransactionalContext_Jms
The
JmsMatsTransactionManager.TransactionContext implementation for
JmsMatsTransactionManager_Jms . |
JmsMatsTransactionManager.JmsMatsTxContextKey, JmsMatsTransactionManager.ProcessingLambda, JmsMatsTransactionManager.TransactionContext
EXTRA_GRACE_MILLIS, ILLEGAL_CALL_FLOWS, JMS_MSG_PROP_AUDIT, JMS_MSG_PROP_DISPATCH_TYPE, JMS_MSG_PROP_FROM, JMS_MSG_PROP_INITIALIZING_APP, JMS_MSG_PROP_INITIATOR_ID, JMS_MSG_PROP_MATS_MESSAGE_ID, JMS_MSG_PROP_MESSAGE_TYPE, JMS_MSG_PROP_TO, JMS_MSG_PROP_TRACE_ID, LOG_PREFIX, MAX_STACK_HEIGHT, MAX_TOTAL_CALL_NUMBER, MDC_MATS_APP_NAME, MDC_MATS_APP_VERSION, MDC_MATS_CALL_NUMBER, MDC_MATS_IN_MESSAGE_SYSTEM_ID, MDC_MATS_INIT, MDC_MATS_OUT_MATS_MESSAGE_ID, MDC_MATS_STAGE, MDC_MATS_STAGE_ID, MDC_TRACE_ID, NO_INVOCATION_POINT, RANDOM_ALPHABET, THREAD_PREFIX, TOTAL_JMS_MSG_PROPS_SIZE
Modifier | Constructor and Description |
---|---|
protected |
JmsMatsTransactionManager_Jms() |
Modifier and Type | Method and Description |
---|---|
static JmsMatsTransactionManager |
create() |
JmsMatsTransactionManager.TransactionContext |
getTransactionContext(JmsMatsTransactionManager.JmsMatsTxContextKey txContextKey)
Provides an implementation of
JmsMatsTransactionManager.TransactionContext . |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
createFlowId, getInvocationPoint, handleIncomingMessageMatsObject, handleIncomingState, id, id, idThis, ms3, produceAndSendMsgSysMessages, randomString, setConcurrencyWithLog, stageOrInit
public static JmsMatsTransactionManager create()
public JmsMatsTransactionManager.TransactionContext getTransactionContext(JmsMatsTransactionManager.JmsMatsTxContextKey txContextKey)
JmsMatsTransactionManager
JmsMatsTransactionManager.TransactionContext
. (JMS Connection and Session handling is done by
JmsMatsJmsSessionHandler
).getTransactionContext
in interface JmsMatsTransactionManager
txContextKey
- for which JmsMatsStage
or JmsMatsInitiator
this request for JmsMatsTransactionManager.TransactionContext
is for.JmsMatsTransactionManager.TransactionContext
for the supplied txContextKey.