public class NuxeoContainer extends Object
This code is called by the factories registered through JNDI, or by unit tests mimicking JNDI bindings.
Modifier and Type | Class and Description |
---|---|
static class |
NuxeoContainer.ConnectionManagerWrapper
Wraps a Geronimo ConnectionManager and adds a
NuxeoContainer.ConnectionManagerWrapper.reset() method to flush the pool. |
static class |
NuxeoContainer.ConnectionTrackingCoordinator |
static class |
NuxeoContainer.InstallContext |
static class |
NuxeoContainer.TransactionManagerConfiguration |
static class |
NuxeoContainer.TransactionManagerWrapper
Wraps a transaction manager for providing a dummy recoverable interface.
|
static class |
NuxeoContainer.UserTransactionImpl
User transaction that uses this container's transaction manager.
|
Modifier and Type | Field and Description |
---|---|
protected static com.codahale.metrics.Counter |
concurrentCount |
protected static com.codahale.metrics.Counter |
concurrentMaxCount |
protected static Map<String,NuxeoContainer.ConnectionManagerWrapper> |
connectionManagers |
protected static String |
jndiPrefix |
protected static org.apache.commons.logging.Log |
log |
protected static Context |
parentContext |
protected static com.codahale.metrics.MetricRegistry |
registry |
protected static com.codahale.metrics.Counter |
rollbackCount |
protected static Context |
rootContext |
protected static ConcurrentHashMap<Transaction,com.codahale.metrics.Timer.Context> |
timers |
protected static TransactionManager |
tm |
protected static org.apache.geronimo.transaction.manager.RecoverableTransactionManager |
tmRecoverable |
protected static TransactionSynchronizationRegistry |
tmSynchRegistry |
protected static com.codahale.metrics.Timer |
transactionTimer |
protected static UserTransaction |
ut |
Modifier and Type | Method and Description |
---|---|
protected static void |
addBinding(Context dir,
Name name,
Object obj) |
protected static void |
addDeepBinding(Context dir,
CompositeName comp,
Object obj) |
static void |
addDeepBinding(String name,
Object obj)
Bind object in root context.
|
static void |
addListener(NuxeoContainerListener listener) |
static org.apache.geronimo.connector.outbound.GenericConnectionManager |
createConnectionManager(org.apache.geronimo.connector.outbound.connectiontracking.ConnectionTracker tracker,
NuxeoConnectionManagerConfiguration config)
Creates a Geronimo pooled connection manager using a Geronimo transaction manager.
|
protected static org.apache.geronimo.transaction.manager.TransactionManagerImpl |
createTransactionManager(NuxeoContainer.TransactionManagerConfiguration config) |
protected static org.apache.geronimo.connector.outbound.connectionmanagerconfig.TransactionSupport |
createTransactionSupport(NuxeoConnectionManagerConfiguration config) |
protected static String |
detectJNDIPrefix(Context context) |
static void |
disposeConnectionManager(javax.resource.spi.ConnectionManager mgr) |
static javax.resource.spi.ConnectionManager |
getConnectionManager(String repositoryName)
Gets the Nuxeo connection manager used by the container.
|
protected static Reference |
getConnectionManagerReference(String name) |
static Context |
getRootContext()
Exposes the
rootContext . |
static TransactionManager |
getTransactionManager()
Gets the transaction manager used by the container.
|
protected static Reference |
getTransactionManagerReference() |
static TransactionSynchronizationRegistry |
getTransactionSynchronizationRegistry() |
static UserTransaction |
getUserTransaction()
Gets the user transaction used by the container.
|
protected static Reference |
getUserTransactionReference() |
static NuxeoContainer.ConnectionManagerWrapper |
initConnectionManager(NuxeoConnectionManagerConfiguration config) |
protected static TransactionManager |
initTransactionManager(NuxeoContainer.TransactionManagerConfiguration config) |
protected static void |
install()
Install naming and bind transaction and connection management factories "by hand".
|
static NuxeoContainer.ConnectionManagerWrapper |
installConnectionManager(NuxeoConnectionManagerConfiguration config)
Creates and installs in the container a new ConnectionManager.
|
static void |
installConnectionManager(NuxeoContainer.ConnectionManagerWrapper wrapper) |
protected static void |
installTransactionManager(Context context) |
protected static void |
installTransactionManager(NuxeoContainer.TransactionManagerConfiguration config) |
static boolean |
isInstalled() |
static <T> T |
lookup(Context context,
String name,
Class<T> type) |
static <T> T |
lookup(String name,
Class<T> type) |
protected static NuxeoContainer.ConnectionManagerWrapper |
lookupConnectionManager(String repositoryName) |
static String |
nameOf(String name) |
protected static void |
removeBinding(String name) |
static void |
removeListener(NuxeoContainerListener listener) |
static void |
resetConnectionManager() |
static void |
resetConnectionManager(String name) |
protected static void |
uninstall() |
protected static NuxeoContainer.TransactionManagerWrapper |
wrapTransactionManager(TransactionManager tm) |
protected static final org.apache.commons.logging.Log log
protected static org.apache.geronimo.transaction.manager.RecoverableTransactionManager tmRecoverable
protected static TransactionManager tm
protected static TransactionSynchronizationRegistry tmSynchRegistry
protected static UserTransaction ut
protected static Map<String,NuxeoContainer.ConnectionManagerWrapper> connectionManagers
protected static Context rootContext
protected static Context parentContext
protected static String jndiPrefix
protected static final com.codahale.metrics.MetricRegistry registry
protected static final com.codahale.metrics.Counter rollbackCount
protected static final com.codahale.metrics.Counter concurrentCount
protected static final com.codahale.metrics.Counter concurrentMaxCount
protected static final com.codahale.metrics.Timer transactionTimer
protected static final ConcurrentHashMap<Transaction,com.codahale.metrics.Timer.Context> timers
protected static void install() throws NamingException
NamingException
protected static void installTransactionManager(NuxeoContainer.TransactionManagerConfiguration config) throws NamingException
NamingException
public static NuxeoContainer.ConnectionManagerWrapper installConnectionManager(NuxeoConnectionManagerConfiguration config)
name
- the repository nameconfig
- the pool configurationpublic static boolean isInstalled()
protected static void uninstall() throws NamingException
NamingException
public static void addListener(NuxeoContainerListener listener)
public static void removeListener(NuxeoContainerListener listener)
protected static String detectJNDIPrefix(Context context)
public static Context getRootContext()
rootContext
.https://jira.nuxeo.com/browse/NXP-10331
public static void addDeepBinding(String name, Object obj) throws NamingException
NamingException
protected static void addDeepBinding(Context dir, CompositeName comp, Object obj) throws NamingException
NamingException
protected static void addBinding(Context dir, Name name, Object obj) throws NamingException
NamingException
protected static void removeBinding(String name) throws NamingException
NamingException
public static TransactionManager getTransactionManager()
protected static Reference getTransactionManagerReference()
public static UserTransaction getUserTransaction()
protected static Reference getUserTransactionReference()
public static javax.resource.spi.ConnectionManager getConnectionManager(String repositoryName)
public static void installConnectionManager(NuxeoContainer.ConnectionManagerWrapper wrapper)
protected static Reference getConnectionManagerReference(String name)
protected static TransactionManager initTransactionManager(NuxeoContainer.TransactionManagerConfiguration config)
protected static NuxeoContainer.TransactionManagerWrapper wrapTransactionManager(TransactionManager tm)
public static NuxeoContainer.ConnectionManagerWrapper initConnectionManager(NuxeoConnectionManagerConfiguration config)
public static void disposeConnectionManager(javax.resource.spi.ConnectionManager mgr)
public static void resetConnectionManager(String name)
public static void resetConnectionManager()
public static <T> T lookup(String name, Class<T> type) throws NamingException
NamingException
public static <T> T lookup(Context context, String name, Class<T> type) throws NamingException
NamingException
protected static void installTransactionManager(Context context) throws NamingException
NamingException
protected static NuxeoContainer.ConnectionManagerWrapper lookupConnectionManager(String repositoryName) throws NamingException
NamingException
protected static org.apache.geronimo.transaction.manager.TransactionManagerImpl createTransactionManager(NuxeoContainer.TransactionManagerConfiguration config)
public static org.apache.geronimo.connector.outbound.GenericConnectionManager createConnectionManager(org.apache.geronimo.connector.outbound.connectiontracking.ConnectionTracker tracker, NuxeoConnectionManagerConfiguration config)
The pool uses the transaction manager for recovery, and when using XATransactions for cache + enlist/delist.
NamingException
protected static org.apache.geronimo.connector.outbound.connectionmanagerconfig.TransactionSupport createTransactionSupport(NuxeoConnectionManagerConfiguration config)
public static TransactionSynchronizationRegistry getTransactionSynchronizationRegistry()
Copyright © 2015 Nuxeo SA. All rights reserved.