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 icatch transaction management facilities. Allows the application server 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.
static void addShutdownHook(Thread hook)
          Adds a shutdown hook to the configuration.
protected static Assembler getAssembler()
           
static CompositeTransactionManager getCompositeTransactionManager()
          Get the composite transaction manager.
static ConfigProperties getConfigProperties()
           
static Enumeration getLogAdministrators()
          Get all registered logadministrators.
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 installLogControl(LogControl control)
          Installs the log control interface to use.
static void installTransactionService(TransactionService service)
          Installs the transaction service in use.
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 removeShutdownHooks()
          Removes all shutdown hooks from the system.
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

installTransactionService

public static void installTransactionService(TransactionService service)
Installs the transaction service in use.

Parameters:
service - The service.

addShutdownHook

public static void addShutdownHook(Thread hook)
Adds a shutdown hook to the configuration. Shutdown hooks are managed here, since regular shutdown of the transaction core should remove hooks (cf case 21519).

Parameters:
hook -

removeShutdownHooks

public static void removeShutdownHooks()
Removes all shutdown hooks from the system. This method should be called on shutdown of the core.


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.

installLogControl

public static void installLogControl(LogControl control)
Installs the log control interface to use.

Parameters:
control -

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 -

getLogAdministrators

public static Enumeration getLogAdministrators()
Get all registered logadministrators.

Returns:
Enumeration The logadministrators.

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.