|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.atomikos.icatch.config.UserTransactionServiceImp
public class UserTransactionServiceImp
Copyright © 2004, Atomikos. All rights reserved. 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 |
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(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 |
setLogAdministrators(List administrators)
Sets a list of administrators to add. |
void |
setRecoverableResources(List resources)
Sets a list of resources to add for recovery. |
void |
setTSListeners(List listeners)
Sets the list of listeners to add. |
void |
shutdown(boolean force)
Shuts down the TM. |
void |
shutdownForce()
Convenience method for calling shutdown with force option |
void |
shutdownWait()
Convenience method for calling shutdown with the wait option. |
| 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 DEFAULT_PROPERTIES_FILE_NAME
| Constructor Detail |
|---|
public UserTransactionServiceImp()
public UserTransactionServiceImp(Properties properties)
properties - The properties.| Method Detail |
|---|
public TSInitInfo createTSInitInfo()
UserTransactionService
createTSInitInfo in interface UserTransactionServiceUserTransactionService
public void shutdown(boolean force)
throws IllegalStateException
UserTransactionService
shutdown in interface UserTransactionServiceforce - 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.
IllegalStateExceptionUserTransactionService
public void init(TSInitInfo info)
throws SysException
UserTransactionService
init in interface UserTransactionServiceinfo - The TSInitInfo with details for initialization.
SysExceptionUserTransactionServicepublic CompositeTransactionManager getCompositeTransactionManager()
UserTransactionService
getCompositeTransactionManager in interface UserTransactionServiceUserTransactionServicepublic TransactionManager getTransactionManager()
UserTransactionService
getTransactionManager in interface UserTransactionServiceUserTransactionServicepublic UserTransaction getUserTransaction()
UserTransactionService
getUserTransaction in interface UserTransactionServiceUserTransactionServicepublic ImportingTransactionManager getImportingTransactionManager()
UserTransactionService
getImportingTransactionManager in interface UserTransactionServiceUserTransactionServicepublic ExportingTransactionManager getExportingTransactionManager()
UserTransactionService
getExportingTransactionManager in interface UserTransactionServiceUserTransactionServicepublic TSMetaData getTSMetaData()
UserTransactionService
getTSMetaData in interface UserTransactionServiceUserTransactionServicepublic void registerResource(RecoverableResource res)
UserTransactionService
registerResource in interface UserTransactionServiceres - The resource to be added.com.atomikos.icatch.UserTransactionService#registerResource(com.atomikos.datasource.RecoverableResource)public void registerLogAdministrator(LogAdministrator admin)
UserTransactionService
registerLogAdministrator in interface UserTransactionServiceadmin - The instance.com.atomikos.icatch.UserTransactionService#registerLogAdministrator(com.atomikos.icatch.admin.LogAdministrator)public Enumeration getResources()
UserTransactionService
getResources in interface UserTransactionServicecom.atomikos.icatch.UserTransactionService#getResources()public Enumeration getLogAdministrators()
UserTransactionService
getLogAdministrators in interface UserTransactionServicecom.atomikos.icatch.UserTransactionService#getLogAdministrators()public void removeResource(RecoverableResource res)
UserTransactionService
removeResource in interface UserTransactionServicepublic void removeLogAdministrator(LogAdministrator admin)
UserTransactionService
removeLogAdministrator in interface UserTransactionServicepublic void registerTSListener(TSListener listener)
UserTransactionService
registerTSListener in interface UserTransactionServicepublic void removeTSListener(TSListener listener)
UserTransactionService
removeTSListener in interface UserTransactionServicepublic void shutdownForce()
UserTransactionService
shutdownForce in interface UserTransactionServicepublic void shutdownWait()
UserTransactionService
shutdownWait in interface UserTransactionServicepublic void setRecoverableResources(List resources)
UserTransactionService
setRecoverableResources in interface UserTransactionServicepublic void setLogAdministrators(List administrators)
UserTransactionService
setLogAdministrators in interface UserTransactionServicepublic void setTSListeners(List listeners)
UserTransactionService
setTSListeners in interface UserTransactionService
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||