Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DEFAULT_SERVICE_NAME |
protected java.util.Map |
m_mpDataSources
Global data sources specified in server.xml
|
protected org.objectweb.transaction.jta.TMService |
m_tm
Instance of JOTM transaction manager.
|
_transactionManagerJNDI, DEFAULT_USER_TX_JNDI
_jndi, _name, _started
Constructor and Description |
---|
JotmService() |
Modifier and Type | Method and Description |
---|---|
void |
addDataSource(java.lang.String dsJNDIName,
StandardXADataSource xaDataSource)
Add a DataSource that does not have an associated pool.
|
void |
addDataSource(java.lang.String dsJNDIName,
StandardXADataSource xaDataSource,
StandardXAPoolDataSource xaPool)
Add a datasource and a pool for it to the Transaction Mgr
|
TransactionManager |
getTransactionManager()
returns a
TransactionManager object. |
UserTransaction |
getUserTransaction()
Returns an
UserTransaction object. |
void |
start()
Start the LifeCycle.
|
void |
stop()
Stop the LifeCycle.
|
getTransactionManagerJNDI
public static final java.lang.String DEFAULT_SERVICE_NAME
protected org.objectweb.transaction.jta.TMService m_tm
protected java.util.Map m_mpDataSources
public TransactionManager getTransactionManager()
TransactionManager
object.getTransactionManager
in class TMService
public UserTransaction getUserTransaction()
UserTransaction
object.getUserTransaction
in class TMService
public void start() throws java.lang.Exception
public void stop() throws java.lang.InterruptedException
stop
in interface Service
stop
in interface LifeCycle
stop
in class AbstractService
java.lang.InterruptedException
- Stopping a lifecycle is rarely atomic
and may be interrupted by another thread. If this happens
InterruptedException is throw and the component will be in an
indeterminant state and should probably be discarded.public void addDataSource(java.lang.String dsJNDIName, StandardXADataSource xaDataSource, StandardXAPoolDataSource xaPool) throws java.sql.SQLException, javax.naming.NamingException
jndiName
- client lookup jndi of DataSourcexaDataSource
- the DataSourcexaPool
- the Pooljava.sql.SQLException
- if an error occursjavax.naming.NamingException
- if an error occurspublic void addDataSource(java.lang.String dsJNDIName, StandardXADataSource xaDataSource)
dsJNDIName
- a String
valuexaDataSource
- a StandardXADataSource
valueCopyright © 2004 Mortbay Consulting Pty. Ltd. All Rights Reserved.