Package org.nuxeo.runtime.jtajca
Class NuxeoContainer
java.lang.Object
org.nuxeo.runtime.jtajca.NuxeoContainer
Internal helper for the Nuxeo-defined transaction manager and connection manager.
This code is called by the factories registered through JNDI, or by unit tests mimicking JNDI bindings.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classstatic classWraps a transaction manager for providing a dummy recoverable interface.static classUser transaction that uses this container's transaction manager. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final io.dropwizard.metrics5.Counterprotected static final io.dropwizard.metrics5.Counterprotected static Stringprotected static Contextprotected static final io.dropwizard.metrics5.MetricRegistryprotected static final io.dropwizard.metrics5.Counterprotected static Contextprotected static final ConcurrentHashMap<jakarta.transaction.Transaction, io.dropwizard.metrics5.Timer.Context> protected static jakarta.transaction.TransactionManagerprotected static org.apache.geronimo.transaction.manager.RecoverableTransactionManagerprotected static jakarta.transaction.TransactionSynchronizationRegistryprotected static final io.dropwizard.metrics5.Timerprotected static jakarta.transaction.UserTransaction -
Method Summary
Modifier and TypeMethodDescriptionprotected static voidaddBinding(Context dir, Name name, Object obj) static voidaddDeepBinding(String name, Object obj) Bind object in root context.protected static voidaddDeepBinding(Context dir, CompositeName comp, Object obj) protected static org.apache.geronimo.transaction.manager.TransactionManagerImplprotected static StringdetectJNDIPrefix(Context context) static ContextExposes therootContext.static jakarta.transaction.TransactionManagerGets the transaction manager used by the container.protected static Referencestatic jakarta.transaction.TransactionSynchronizationRegistrystatic jakarta.transaction.UserTransactionGets the user transaction used by the container.protected static Referenceprotected static jakarta.transaction.TransactionManagerprotected static voidinstall()Install naming and bind transaction and connection management factories "by hand".protected static voidinstallTransactionManager(Context context) protected static voidstatic booleanstatic <T> Tstatic <T> Tstatic Stringprotected static voidremoveBinding(String name) protected static voidprotected static NuxeoContainer.TransactionManagerWrapperwrapTransactionManager(jakarta.transaction.TransactionManager tm)
-
Field Details
-
tmRecoverable
protected static org.apache.geronimo.transaction.manager.RecoverableTransactionManager tmRecoverable -
tm
protected static jakarta.transaction.TransactionManager tm -
tmSynchRegistry
protected static jakarta.transaction.TransactionSynchronizationRegistry tmSynchRegistry -
ut
protected static jakarta.transaction.UserTransaction ut -
rootContext
-
parentContext
-
jndiPrefix
-
registry
protected static final io.dropwizard.metrics5.MetricRegistry registry -
rollbackCount
protected static final io.dropwizard.metrics5.Counter rollbackCount -
concurrentCount
protected static final io.dropwizard.metrics5.Counter concurrentCount -
concurrentMaxCount
protected static final io.dropwizard.metrics5.Counter concurrentMaxCount -
transactionTimer
protected static final io.dropwizard.metrics5.Timer transactionTimer -
timers
protected static final ConcurrentHashMap<jakarta.transaction.Transaction,io.dropwizard.metrics5.Timer.Context> timers
-
-
Method Details
-
install
Install naming and bind transaction and connection management factories "by hand".- Throws:
NamingException
-
installTransactionManager
protected static void installTransactionManager(NuxeoContainer.TransactionManagerConfiguration config) throws NamingException - Throws:
NamingException
-
isInstalled
public static boolean isInstalled() -
uninstall
- Throws:
NamingException
-
detectJNDIPrefix
-
nameOf
-
getRootContext
Exposes therootContext.- Since:
- 5.7
- See Also:
-
addDeepBinding
Bind object in root context. Create needed sub contexts. since 5.6- Throws:
NamingException
-
addDeepBinding
protected static void addDeepBinding(Context dir, CompositeName comp, Object obj) throws NamingException - Throws:
NamingException
-
addBinding
- Throws:
NamingException
-
removeBinding
- Throws:
NamingException
-
getTransactionManager
public static jakarta.transaction.TransactionManager getTransactionManager()Gets the transaction manager used by the container.- Returns:
- the transaction manager
-
getTransactionManagerReference
-
getUserTransaction
public static jakarta.transaction.UserTransaction getUserTransaction()Gets the user transaction used by the container.- Returns:
- the user transaction
-
getUserTransactionReference
-
initTransactionManager
protected static jakarta.transaction.TransactionManager initTransactionManager(NuxeoContainer.TransactionManagerConfiguration config) -
wrapTransactionManager
protected static NuxeoContainer.TransactionManagerWrapper wrapTransactionManager(jakarta.transaction.TransactionManager tm) -
lookup
- Throws:
NamingException
-
lookup
- Throws:
NamingException
-
installTransactionManager
- Throws:
NamingException
-
createTransactionManager
protected static org.apache.geronimo.transaction.manager.TransactionManagerImpl createTransactionManager(NuxeoContainer.TransactionManagerConfiguration config) -
getTransactionSynchronizationRegistry
public static jakarta.transaction.TransactionSynchronizationRegistry getTransactionSynchronizationRegistry()
-