Nuxeo ECM Projects 5.4.3-SNAPSHOT

org.nuxeo.runtime.jtajca
Class NuxeoContainer

java.lang.Object
  extended by org.nuxeo.runtime.jtajca.NuxeoContainer

public class NuxeoContainer
extends Object

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
static class NuxeoContainer.ConnectionManagerConfiguration
           
static class NuxeoContainer.ConnectionManagerWrapper
          Wraps a Geronimo ConnectionManager and adds a NuxeoContainer.ConnectionManagerWrapper.reset() method to flush the pool.
static class NuxeoContainer.TransactionManagerConfiguration
           
static class NuxeoContainer.TransactionManagerWrapper
          Wraps a transaction manager for providing a dummy recoverable interface.
 
Field Summary
static String JNDI_NUXEO_CONNECTION_MANAGER
           
static String JNDI_TRANSACTION_MANAGER
           
static String JNDI_USER_TRANSACTION
           
 
Method Summary
static ConnectionManager getConnectionManager()
          Gets the Nuxeo connection manager used by the container.
static TransactionManager getTransactionManager()
          Gets the transaction manager used by the container.
static UserTransaction getUserTransaction()
          Gets the user transaction used by the container.
static void initConnectionManager(NuxeoContainer.ConnectionManagerConfiguration config)
           
static void initTransactionManager(NuxeoContainer.TransactionManagerConfiguration config)
           
static void install()
          Install transaction and connection management "by hand" if the container didn't do it using file-based configuration.
static void install(NuxeoContainer.TransactionManagerConfiguration txconfig, NuxeoContainer.ConnectionManagerConfiguration cmconfig)
          Install transaction and connection management "by hand" if the container didn't do it using file-based configuration.
static boolean isInstalled()
           
static void resetConnectionManager()
           
static void uninstall()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

JNDI_TRANSACTION_MANAGER

public static final String JNDI_TRANSACTION_MANAGER
See Also:
Constant Field Values

JNDI_USER_TRANSACTION

public static final String JNDI_USER_TRANSACTION
See Also:
Constant Field Values

JNDI_NUXEO_CONNECTION_MANAGER

public static final String JNDI_NUXEO_CONNECTION_MANAGER
See Also:
Constant Field Values
Method Detail

install

public static void install()
                    throws NamingException
Install transaction and connection management "by hand" if the container didn't do it using file-based configuration. Binds the names in JNDI.

Throws:
NamingException

install

public static void install(NuxeoContainer.TransactionManagerConfiguration txconfig,
                           NuxeoContainer.ConnectionManagerConfiguration cmconfig)
                    throws NamingException
Install transaction and connection management "by hand" if the container didn't do it using file-based configuration. Binds the names in JNDI.

Parameters:
txconfig - the transaction manager configuration
cmconfig - the connection manager configuration
Throws:
NamingException
Since:
5.4.2

isInstalled

public static boolean isInstalled()

uninstall

public static void uninstall()
                      throws NamingException
Throws:
NamingException

getTransactionManager

public static TransactionManager getTransactionManager()
Gets the transaction manager used by the container.

Returns:
the transaction manager

getUserTransaction

public static UserTransaction getUserTransaction()
                                          throws NamingException
Gets the user transaction used by the container.

Returns:
the user transaction
Throws:
NamingException

getConnectionManager

public static ConnectionManager getConnectionManager()
Gets the Nuxeo connection manager used by the container.

Returns:
the connection manager

initTransactionManager

public static void initTransactionManager(NuxeoContainer.TransactionManagerConfiguration config)
                                   throws NamingException
Throws:
NamingException

initConnectionManager

public static void initConnectionManager(NuxeoContainer.ConnectionManagerConfiguration config)
                                  throws NamingException
Throws:
NamingException

resetConnectionManager

public static void resetConnectionManager()
                                   throws Exception
Throws:
Exception

Nuxeo ECM Projects 5.4.3-SNAPSHOT

Copyright © 2011 Nuxeo SAS. All Rights Reserved.