com.atomikos.icatch.config
Interface UserTransactionService

All Known Implementing Classes:
AbstractJtaUserTransactionService, AbstractUserTransactionService, UserTransactionServiceImp

public interface UserTransactionService

The user's (client program) view of the transaction manager's configuration, with all the information the client program needs.


Method Summary
 TSInitInfo createTSInitInfo()
          Deprecated. Use the properties-based init method instead.
 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()
          Deprecated. Use the UserTransactionManager and J2eeTransactionManager classes instead.
 TSMetaData getTSMetaData()
          Deprecated.  
 UserTransaction getUserTransaction()
          Deprecated. Use the classes in package com.atomikos.icatch.jta instead.
 void init(Properties properties)
           
 void init(TSInitInfo info)
          Deprecated. Use the property-based init method instead.
 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 shutdown(boolean force)
          Shuts down the TM.
 

Method Detail

getTransactionManager

TransactionManager getTransactionManager()
Deprecated. Use the UserTransactionManager and J2eeTransactionManager classes instead.

Get the JTA transaction manager handle for the config.

Returns:
TransactionManager The JTA transaction manager.

getUserTransaction

UserTransaction getUserTransaction()
Deprecated. Use the classes in package com.atomikos.icatch.jta instead.

Get the JTA user transaction, for client-demarcated transactions.

Returns:
UserTransaction The JTA user transaction. IMPORTANT: the returned instance can be bound in JNDI. In addition, remote clients can use this instance only if the configuration parameters allow remote client transaction demarcation!

getImportingTransactionManager

ImportingTransactionManager getImportingTransactionManager()
Get the ImportingTransactionManager instance.

Returns:
ImportingTransactionManager The instance.

getExportingTransactionManager

ExportingTransactionManager getExportingTransactionManager()
Get the ExportingTransactionManager instance

Returns:
ExportingTransactionManager The instance.

getTSMetaData

TSMetaData getTSMetaData()
Deprecated. 

Get the meta data for the transaction service.

Returns:
TSMetaData The meta data.

createTSInitInfo

TSInitInfo createTSInitInfo()
Deprecated. Use the properties-based init method instead.

Create a TSInitInfo for this transaction service.

Returns:
TSInitInfo The init info instance.

shutdown

void shutdown(boolean force)
              throws IllegalStateException
Shuts down the TM. It is highly recommended that this method be called before the VM exits, in order to ensure proper log closing. After this method completes, all resources will have been removed from the configuration, as well as all logadministrators. To re-initialize, everything should be registered again.

Parameters:
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.
Throws:
IllegalStateException

registerResource

void registerResource(RecoverableResource res)
Register a new resource for recovery.

Parameters:
res - The resource to be added.

removeResource

void removeResource(RecoverableResource res)
Removes the given resource. This method should be used with extreme care, because removing resources can endanger recovery!

Parameters:
The - resource to remove. If the resource is not found then this method does nothing.

registerLogAdministrator

void registerLogAdministrator(LogAdministrator admin)
Register a LogAdministrator instance for administration. This allows inspection of active transactions and manual intervention. Care should be taken if multiple instances are registered: the responsibility of taking conflicting manual decisions is entirely with the user!

Parameters:
admin - The instance.

removeLogAdministrator

void removeLogAdministrator(LogAdministrator admin)
Removes the given log administrator. Does nothing if the instance is not found.

Parameters:
admin -

registerTSListener

void registerTSListener(TSListener listener)
Registers a listener with the transaction service.

Parameters:
listener -

removeTSListener

void removeTSListener(TSListener listener)
Removes a listener from the transaction service. After this method is called, the listener in question will no longer receive callback notifications from the transaction service. This method does nothing if the listener is not found.

Parameters:
listener -

init

void init(TSInitInfo info)
          throws SysException
Deprecated. Use the property-based init method instead.

Initializes the intra-VM transaction manager.

Parameters:
info - The TSInitInfo with details for initialization.
Throws:
SysException

init

void init(Properties properties)
          throws SysException
Throws:
SysException

getResources

Enumeration getResources()
Get the resources registered.

Returns:
Enumeration The resources, or empty if none.

getLogAdministrators

Enumeration getLogAdministrators()
Get the log administrators.

Returns:
Enumeration The registered administrators.

getCompositeTransactionManager

CompositeTransactionManager getCompositeTransactionManager()
Get the composite transaction manager for the config.

Returns:
CompositeTransactionManager The composite transaction manager.


Copyright © 2011. All Rights Reserved.