|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atomikos.icatch.config.UserTransactionServiceImp
public class UserTransactionServiceImp
This is the main class for creating a UserTransactionService instance. This class is the client's main entry point into the transaction engine. The creation of a user transaction happens via a UserTransactionServiceFactory which is looked up by this object behind the scenes. Instances can be serialized to disk and re-read at a later time. Note: deserialization will only work in the SAME configuration as the one that did the streaming out. In particular, if no identical Atomikos transaction service is present in the target VM then the process of deserialization will be erroneous.
Field Summary | |
---|---|
static String |
DEFAULT_PROPERTIES_FILE_NAME
The default file name for the transaction service's init parameters. |
static String |
FILE_PATH_PROPERTY_NAME
The name of the system property whose value corresponds to the path towards the properties file for initialization of the transaction service. |
static String |
HIDE_INIT_FILE_PATH_PROPERTY_NAME
The name of the system property to disable printing 'Using init file...' messages to System.err - if this system property to an arbitrary value then no such message will be shown on System.err during startup. |
static String |
NO_FILE_PROPERTY_NAME
Constant denoting the system property name that suggest NOT to use any configuration file for the transaction service's properties. |
Constructor Summary | |
---|---|
UserTransactionServiceImp()
Default constructor. |
|
UserTransactionServiceImp(Properties properties)
Constructs a new instance and initializes it with the given properties. |
Method Summary | |
---|---|
TSInitInfo |
createTSInitInfo()
Create a TSInitInfo for this transaction service. |
CompositeTransactionManager |
getCompositeTransactionManager()
Get the composite transaction manager for the config. |
ExportingTransactionManager |
getExportingTransactionManager()
Get the ExportingTransactionManager instance |
ImportingTransactionManager |
getImportingTransactionManager()
Get the ImportingTransactionManager instance. |
Enumeration |
getLogAdministrators()
Get the log administrators. |
Enumeration |
getResources()
Get the resources registered. |
TransactionManager |
getTransactionManager()
Get the JTA transaction manager handle for the config. |
TSMetaData |
getTSMetaData()
Get the meta data for the transaction service. |
UserTransaction |
getUserTransaction()
Get the JTA user transaction, for client-demarcated transactions. |
void |
init()
Convenience init method for DI containers like Spring. |
void |
init(Properties properties)
|
void |
init(TSInitInfo info)
Initializes the intra-VM transaction manager. |
void |
registerLogAdministrator(LogAdministrator admin)
Register a LogAdministrator instance for administration. |
void |
registerResource(RecoverableResource res)
Register a new resource for recovery. |
void |
registerTSListener(TSListener listener)
Registers a listener with the transaction service. |
void |
removeLogAdministrator(LogAdministrator admin)
Removes the given log administrator. |
void |
removeResource(RecoverableResource res)
Removes the given resource. |
void |
removeTSListener(TSListener listener)
Removes a listener from the transaction service. |
void |
setInitialLogAdministrators(List administrators)
Dependency injection of all administrators to be added during init. |
void |
setInitialRecoverableResources(List resources)
Dependency injection of all resources to be added during init. |
void |
setInitialTSListeners(List listeners)
Dependency injection of all listeners to be added during init. |
void |
shutdown(boolean force)
Shuts down the TM. |
void |
shutdownForce()
Convenience shutdown method for DI containers like Spring. |
void |
shutdownWait()
Convenience shutdown method for DI containers like Spring. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String NO_FILE_PROPERTY_NAME
public static final String FILE_PATH_PROPERTY_NAME
public static final String HIDE_INIT_FILE_PATH_PROPERTY_NAME
public static final String DEFAULT_PROPERTIES_FILE_NAME
Constructor Detail |
---|
public UserTransactionServiceImp()
public UserTransactionServiceImp(Properties properties)
properties
- The properties.Method Detail |
---|
public TSInitInfo createTSInitInfo()
UserTransactionService
createTSInitInfo
in interface UserTransactionService
UserTransactionService
public void shutdown(boolean force) throws IllegalStateException
UserTransactionService
shutdown
in interface UserTransactionService
force
- If true, then shutdown will succeed even if
some transactions are still active. If false, then the calling thread
will block until any active transactions are terminated. A heuristic
transaction is also considered to be active.
IllegalStateException
UserTransactionService
public void init(TSInitInfo info) throws SysException
UserTransactionService
init
in interface UserTransactionService
info
- The TSInitInfo with details for initialization.
SysException
UserTransactionService
public CompositeTransactionManager getCompositeTransactionManager()
UserTransactionService
getCompositeTransactionManager
in interface UserTransactionService
UserTransactionService
public TransactionManager getTransactionManager()
UserTransactionService
getTransactionManager
in interface UserTransactionService
UserTransactionService
public UserTransaction getUserTransaction()
UserTransactionService
getUserTransaction
in interface UserTransactionService
UserTransactionService
public ImportingTransactionManager getImportingTransactionManager()
UserTransactionService
getImportingTransactionManager
in interface UserTransactionService
UserTransactionService
public ExportingTransactionManager getExportingTransactionManager()
UserTransactionService
getExportingTransactionManager
in interface UserTransactionService
UserTransactionService
public TSMetaData getTSMetaData()
UserTransactionService
getTSMetaData
in interface UserTransactionService
UserTransactionService
public void registerResource(RecoverableResource res)
UserTransactionService
registerResource
in interface UserTransactionService
res
- The resource to be added.com.atomikos.icatch.UserTransactionService#registerResource(com.atomikos.datasource.RecoverableResource)
public void registerLogAdministrator(LogAdministrator admin)
UserTransactionService
registerLogAdministrator
in interface UserTransactionService
admin
- The instance.com.atomikos.icatch.UserTransactionService#registerLogAdministrator(com.atomikos.icatch.admin.LogAdministrator)
public Enumeration getResources()
UserTransactionService
getResources
in interface UserTransactionService
com.atomikos.icatch.UserTransactionService#getResources()
public Enumeration getLogAdministrators()
UserTransactionService
getLogAdministrators
in interface UserTransactionService
com.atomikos.icatch.UserTransactionService#getLogAdministrators()
public void removeResource(RecoverableResource res)
UserTransactionService
removeResource
in interface UserTransactionService
public void removeLogAdministrator(LogAdministrator admin)
UserTransactionService
removeLogAdministrator
in interface UserTransactionService
public void registerTSListener(TSListener listener)
UserTransactionService
registerTSListener
in interface UserTransactionService
public void removeTSListener(TSListener listener)
UserTransactionService
removeTSListener
in interface UserTransactionService
public void shutdownForce()
public void shutdownWait()
public void setInitialRecoverableResources(List resources)
resources
- public void setInitialLogAdministrators(List administrators)
administrators
- public void setInitialTSListeners(List listeners)
listeners
- public void init()
public void init(Properties properties) throws SysException
init
in interface UserTransactionService
SysException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |