Package com.skava.unitwork
Class UnitOfWorkForMDC
java.lang.Object
org.apache.camel.impl.engine.DefaultUnitOfWork
org.apache.camel.impl.engine.MDCUnitOfWork
com.skava.unitwork.UnitOfWorkForMDC
- All Implemented Interfaces:
AutoCloseable
,org.apache.camel.Service
,org.apache.camel.spi.UnitOfWork
public class UnitOfWorkForMDC
extends org.apache.camel.impl.engine.MDCUnitOfWork
implements org.apache.camel.spi.UnitOfWork
Unit of Work class for custom MDC values.
- Author:
- Infosys Equinox
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
The Constant MDC_BUSINESS_ID.static final String
The Constant MDC_SK_SESSION_ID.static final String
The Constant MDC_STORE_ID.static final String
The Constant MDC_USER_ID.Fields inherited from interface org.apache.camel.spi.UnitOfWork
MDC_BREADCRUMB_ID, MDC_CAMEL_CONTEXT_ID, MDC_CORRELATION_ID, MDC_EXCHANGE_ID, MDC_MESSAGE_ID, MDC_ROUTE_ID, MDC_STEP_ID, MDC_TRANSACTION_KEY
-
Constructor Summary
ConstructorsConstructorDescriptionUnitOfWorkForMDC
(org.apache.camel.Exchange exchange) Constructor for UnitOfWorkForMDC. -
Method Summary
Modifier and TypeMethodDescriptionvoid
afterRoute
(org.apache.camel.Exchange exchange, org.apache.camel.Route route) method for persisting custom MDC values from the route.org.apache.camel.spi.UnitOfWork
newInstance
(org.apache.camel.Exchange exchange) returns the custom unit of work for custom MDC values.Methods inherited from class org.apache.camel.impl.engine.MDCUnitOfWork
afterProcess, beforeProcess, beginTransactedBy, clear, clearCustom, done, endTransactedBy, isBeforeAfterProcess, onDone, popRoute, prepareMDC, pushRoute, reset, start, stop, toString
Methods inherited from class org.apache.camel.impl.engine.DefaultUnitOfWork
addSynchronization, beforeRoute, containsSynchronization, createChildUnitOfWork, getOriginalInMessage, getRoute, handoverSynchronization, handoverSynchronization, isTransacted, isTransactedBy, onPrepare, removeSynchronization, routeStackLevel, routeStackLevel, setParentUnitOfWork
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.apache.camel.Service
build, close, init
Methods inherited from interface org.apache.camel.spi.UnitOfWork
addSynchronization, afterProcess, beforeProcess, beforeRoute, beginTransactedBy, containsSynchronization, createChildUnitOfWork, done, endTransactedBy, getOriginalInMessage, getRoute, handoverSynchronization, handoverSynchronization, isBeforeAfterProcess, isTransacted, isTransactedBy, onPrepare, popRoute, pushRoute, removeSynchronization, reset, routeStackLevel, routeStackLevel, setParentUnitOfWork
-
Field Details
-
MDC_SK_SESSION_ID
The Constant MDC_SK_SESSION_ID.- See Also:
-
MDC_USER_ID
The Constant MDC_USER_ID.- See Also:
-
MDC_BUSINESS_ID
The Constant MDC_BUSINESS_ID.- See Also:
-
MDC_STORE_ID
The Constant MDC_STORE_ID.- See Also:
-
-
Constructor Details
-
UnitOfWorkForMDC
public UnitOfWorkForMDC(org.apache.camel.Exchange exchange) Constructor for UnitOfWorkForMDC.- Parameters:
exchange
- aExchange
object.
-
-
Method Details
-
afterRoute
public void afterRoute(org.apache.camel.Exchange exchange, org.apache.camel.Route route) method for persisting custom MDC values from the route.- Specified by:
afterRoute
in interfaceorg.apache.camel.spi.UnitOfWork
- Overrides:
afterRoute
in classorg.apache.camel.impl.engine.DefaultUnitOfWork
-
newInstance
public org.apache.camel.spi.UnitOfWork newInstance(org.apache.camel.Exchange exchange) returns the custom unit of work for custom MDC values.- Overrides:
newInstance
in classorg.apache.camel.impl.engine.MDCUnitOfWork
-