com.atomikos.icatch.config
Interface UserTransactionService

All Known Implementing Classes:
AbstractJtaUserTransactionService, AbstractUserTransactionService, UserTransactionServiceImp

public interface UserTransactionService

Copyright © 2001-2004, Atomikos. All rights reserved. The user's (client program) view of the transaction manager's configuration, with all the information the client program needs.


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()
          Deprecated. Use the UserTransactionManager and J2eeTransactionManager classes instead.
 TSMetaData getTSMetaData()
          Get the meta data for the transaction service.
 UserTransaction getUserTransaction()
          Deprecated. Use the classes in package com.atomikos.icatch.jta instead.
 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.
 

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()
Get the meta data for the transaction service.

Returns:
TSMetaData The meta data.

createTSInitInfo

TSInitInfo createTSInitInfo()
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
Initializes the intra-VM transaction manager.

Parameters:
info - The TSInitInfo with details for initialization.
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.

shutdownForce

void shutdownForce()
Convenience method for calling shutdown with force option


shutdownWait

void shutdownWait()
Convenience method for calling shutdown with the wait option.


setRecoverableResources

void setRecoverableResources(List resources)
Sets a list of resources to add for recovery. This method is an alternative to calling registerResource for each resource in turn. Note that this method behaves incrementally: calling this twice will add more resources.

Parameters:
resources -

setLogAdministrators

void setLogAdministrators(List administrators)
Sets a list of administrators to add. This method is an alternative to calling registerLogAdministrator for each member of the list. Note that this method behaves incrementally: calling this twice will add more administrators.

Parameters:
administrators -

setTSListeners

void setTSListeners(List listeners)
Sets the list of listeners to add. Note that this method behaves incrementally: calling this twice will add more listeners.

Parameters:
listeners -