|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object i3.dragos.core.AbstractService i3.dragos.core.services.transactions.TransactionManagerFactory
public class TransactionManagerFactory
The TransactionManagerFactory instantiates TransactionManagers. See TransactionManager
for a detailed
discussion of this topic.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface i3.dragos.core.Service |
---|
Service.Result, Service.State |
Constructor Summary | |
---|---|
TransactionManagerFactory()
Constructor. |
Method Summary | |
---|---|
TransactionManager |
create(DataSourceURL ds)
Returns a TransactionManager for the data source. |
TransactionManager |
create(DataSourceURL[] ds,
java.lang.String id)
Returns a TransactionManager for the data source. |
TransactionManager |
create(DataSourceURL ds,
java.lang.String id)
Returns a TransactionManager for the data source. |
java.lang.String |
getDefaultImplementation()
Returns the identifier of the default implementation (may be null if not set). |
TransactionManager |
getExistingTransactionManager(DataSourceURL url)
Returns the existing transaction manager for a specific DataSourceURL . |
static TransactionManagerFactory |
getInstance()
Returns the TransactionManagerFactory instance registered by the service manager. |
java.lang.String |
getName()
Returns the name of the service. |
java.util.Set<java.lang.String> |
getSupportedTransactionManagers()
Returns the transaction manager identifiers supported by the factory. |
Service.Result |
initialize()
Initializes the services. |
void |
registerTransactionManagerImplementation(java.lang.String id,
java.lang.String impl)
Registers a TransactionManager implementation, so that instances can be created. |
void |
setDefaultImplementation(java.lang.String defaultImplementation)
Sets the default implementation by its identifier (may be null to return to hard-coded behaviour). |
Service.Result |
uninitialize()
Uninitializes the services and releases all resources used by the service. |
Methods inherited from class i3.dragos.core.AbstractService |
---|
getState, resume, start, stop, suspend |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TransactionManagerFactory()
Method Detail |
---|
public static TransactionManagerFactory getInstance()
public final java.lang.String getName()
public Service.Result initialize()
initialize
in interface Service
initialize
in class AbstractService
public Service.Result uninitialize()
uninitialize
in interface Service
uninitialize
in class AbstractService
public java.util.Set<java.lang.String> getSupportedTransactionManagers()
String
.public void registerTransactionManagerImplementation(java.lang.String id, java.lang.String impl) throws TransactionManagerFactoryException
id
- The identifier string.impl
- The actual class name.
TransactionManagerFactoryException
- if the specified class does not exist, is abstract, does not implement
the TransactionManager interface or does not implement the necessary public constructor for
instantiation.TransactionManager
public TransactionManager create(DataSourceURL ds) throws TransactionManagerFactoryException
ds
- The DataSourceURL of the data source.
TransactionManagerFactoryException
- if the transaction manager could not be created.public TransactionManager create(DataSourceURL ds, java.lang.String id) throws TransactionManagerFactoryException
ds
- The DataSourceURL of the data source.id
- The ID of the implementation to use (may be null
).
TransactionManagerFactoryException
- if the transaction manager could not be created.public TransactionManager create(DataSourceURL[] ds, java.lang.String id) throws TransactionManagerFactoryException
ds
- The DataSourceURL of the data source.id
- The ID of the implementation to use (may be null
).
TransactionManagerFactoryException
- if the transaction manager could not be created.public TransactionManager getExistingTransactionManager(DataSourceURL url)
DataSourceURL
.
url
- logical DataSourceURL
to get the TransactionManager
for.
DataSourceURL
, or null
if note created yet.public java.lang.String getDefaultImplementation()
null
if not set).
null
if not set).public void setDefaultImplementation(java.lang.String defaultImplementation)
null
to return to hard-coded behaviour).
defaultImplementation
- the identifier of the default implementation (may be null
to return
to hard-coded behaviour).
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |