com.atomikos.icatch.config
Class Configuration

java.lang.Object
  extended by com.atomikos.icatch.config.Configuration

public final class Configuration
extends Object

Configuration is a facade for the transaction management core. Allows the application code to find the transaction manager, even if the actual implementation varies over time.


Method Summary
static void addLogAdministrator(LogAdministrator admin)
          Add a log administrator.
static void addResource(RecoverableResource resource)
          Add a resource to the transaction manager domain.
protected static Assembler getAssembler()
           
static CompositeTransactionManager getCompositeTransactionManager()
          Get the composite transaction manager.
static ConfigProperties getConfigProperties()
           
static RecoveryLog getRecoveryLog()
           
static RecoverableResource getResource(String name)
          Get the resource with the given name.
static Enumeration<RecoverableResource> getResources()
          Get all resources added so far, in the order that they were added.
static TransactionService getTransactionService()
          Retrieves the transaction service being used.
static boolean init()
           
static void installCompositeTransactionManager(CompositeTransactionManager compositeTransactionManager)
          Installs a composite transaction manager as a Singleton.
static void registerTransactionServicePlugin(TransactionServicePlugin l)
          Add a transaction service listener.
static void removeLogAdministrator(LogAdministrator admin)
          Remove a log administrator.
static RecoverableResource removeResource(String name)
          Removes a resource from the config.
static void shutdown(boolean force)
           
static void shutdown(long maxWaitTime)
           
static void unregisterTransactionServicePlugin(TransactionServicePlugin l)
          Remove a transaction service listener.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getTransactionService

public static TransactionService getTransactionService()
Retrieves the transaction service being used.

Returns:
TransactionService The transaction service.

registerTransactionServicePlugin

public static void registerTransactionServicePlugin(TransactionServicePlugin l)
Add a transaction service listener.

Parameters:
l - The listener.

unregisterTransactionServicePlugin

public static void unregisterTransactionServicePlugin(TransactionServicePlugin l)
Remove a transaction service listener.

Parameters:
l - The listener.

installCompositeTransactionManager

public static void installCompositeTransactionManager(CompositeTransactionManager compositeTransactionManager)
Installs a composite transaction manager as a Singleton.

Parameters:
compositeTransactionManager - The instance to install.

getCompositeTransactionManager

public static CompositeTransactionManager getCompositeTransactionManager()
Get the composite transaction manager.

Returns:
CompositeTransactionManager The instance, or null if none.

addResource

public static void addResource(RecoverableResource resource)
                        throws IllegalStateException
Add a resource to the transaction manager domain. Should be called for all resources that have to be recovered, BEFORE initializing the transaction manager! The purpose of registering resources is mainly to be able the recovery the ResourceTransaction context for each prepared ResourceTransction. This is needed for those ResourceTransaction instances that do not encapsulate the full state themselves, as in the XAResource case.

Parameters:
resource - The resource to add.
Throws:
IllegalStateException - If the name of the resource is already in use.

addLogAdministrator

public static void addLogAdministrator(LogAdministrator admin)
Add a log administrator.

Parameters:
admin -

removeLogAdministrator

public static void removeLogAdministrator(LogAdministrator admin)
Remove a log administrator.

Parameters:
admin -

removeResource

public static RecoverableResource removeResource(String name)
Removes a resource from the config.

Parameters:
name - The resource's name.
Returns:
RecoverableResource The removed object.

getResource

public static RecoverableResource getResource(String name)
Get the resource with the given name.

Parameters:
name - The name to find.
Returns:
RecoverableResource The resource.

getResources

public static Enumeration<RecoverableResource> getResources()
Get all resources added so far, in the order that they were added.

Returns:
Enumeration The resources.

getAssembler

protected static Assembler getAssembler()

getConfigProperties

public static ConfigProperties getConfigProperties()

shutdown

public static void shutdown(boolean force)

shutdown

public static void shutdown(long maxWaitTime)

init

public static boolean init()
Returns:
False if already running.

getRecoveryLog

public static RecoveryLog getRecoveryLog()


Copyright © 2016. All Rights Reserved.