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
Modifier and TypeClassDescriptionstatic class
static class
static class
Wraps a transaction manager for providing a dummy recoverable interface.static class
User transaction that uses this container's transaction manager. -
Field Summary
Modifier and TypeFieldDescriptionprotected static final io.dropwizard.metrics5.Counter
protected static final io.dropwizard.metrics5.Counter
protected static String
protected static Context
protected static final io.dropwizard.metrics5.MetricRegistry
protected static final io.dropwizard.metrics5.Counter
protected static Context
protected static final ConcurrentHashMap<javax.transaction.Transaction,
io.dropwizard.metrics5.Timer.Context> protected static javax.transaction.TransactionManager
protected static org.apache.geronimo.transaction.manager.RecoverableTransactionManager
protected static javax.transaction.TransactionSynchronizationRegistry
protected static final io.dropwizard.metrics5.Timer
protected static javax.transaction.UserTransaction
-
Method Summary
Modifier and TypeMethodDescriptionprotected static void
addBinding
(Context dir, Name name, Object obj) static void
addDeepBinding
(String name, Object obj) Bind object in root context.protected static void
addDeepBinding
(Context dir, CompositeName comp, Object obj) protected static org.apache.geronimo.transaction.manager.TransactionManagerImpl
protected static String
detectJNDIPrefix
(Context context) static Context
Exposes therootContext
.static javax.transaction.TransactionManager
Gets the transaction manager used by the container.protected static Reference
static javax.transaction.TransactionSynchronizationRegistry
static javax.transaction.UserTransaction
Gets the user transaction used by the container.protected static Reference
protected static javax.transaction.TransactionManager
protected static void
install()
Install naming and bind transaction and connection management factories "by hand".protected static void
installTransactionManager
(Context context) protected static void
static boolean
static <T> T
static <T> T
static String
protected static void
removeBinding
(String name) protected static void
protected static NuxeoContainer.TransactionManagerWrapper
wrapTransactionManager
(javax.transaction.TransactionManager tm)
-
Field Details
-
tmRecoverable
protected static org.apache.geronimo.transaction.manager.RecoverableTransactionManager tmRecoverable -
tm
protected static javax.transaction.TransactionManager tm -
tmSynchRegistry
protected static javax.transaction.TransactionSynchronizationRegistry tmSynchRegistry -
ut
protected static javax.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<javax.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 javax.transaction.TransactionManager getTransactionManager()Gets the transaction manager used by the container.- Returns:
- the transaction manager
-
getTransactionManagerReference
-
getUserTransaction
public static javax.transaction.UserTransaction getUserTransaction()Gets the user transaction used by the container.- Returns:
- the user transaction
-
getUserTransactionReference
-
initTransactionManager
protected static javax.transaction.TransactionManager initTransactionManager(NuxeoContainer.TransactionManagerConfiguration config) -
wrapTransactionManager
protected static NuxeoContainer.TransactionManagerWrapper wrapTransactionManager(javax.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 javax.transaction.TransactionSynchronizationRegistry getTransactionSynchronizationRegistry()
-