com.atomikos.icatch.config.imp
Class AbstractUserTransactionService

java.lang.Object
  extended by com.atomikos.icatch.config.imp.AbstractUserTransactionService
All Implemented Interfaces:
UserTransactionService

public abstract class AbstractUserTransactionService
extends Object
implements UserTransactionService

The user's (client program) view of the transaction manager's configuration, a compact facade with all the information the client program needs. This base class should be overridden for each module (CORBA, trmi,...).


Constructor Summary
AbstractUserTransactionService()
           
 
Method Summary
protected static String findOrCreateFolder(String path)
          Utility method to find or create a given folder
 CompositeTransactionManager getCompositeTransactionManager()
           
protected static String getDefaultName()
          Utility method to get a default TM name.
 ExportingTransactionManager getExportingTransactionManager()
           
protected static String getHostAddress()
          Utility method to get the local host address.
 ImportingTransactionManager getImportingTransactionManager()
           
 Enumeration getLogAdministrators()
           
 Enumeration getResources()
           
static String getTrimmedProperty(String name, Properties p)
          Utility method to get and trim properties.
 void init(Properties properties)
           
 void init(TSInitInfo info)
           
 void registerLogAdministrator(LogAdministrator admin)
           
 void registerResource(RecoverableResource res)
           
 void registerTSListener(TSListener listener)
           
 void removeLogAdministrator(LogAdministrator admin)
           
 void removeResource(RecoverableResource res)
           
 void removeTSListener(TSListener listener)
           
 void shutdown(boolean force)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.atomikos.icatch.config.UserTransactionService
createTSInitInfo
 

Constructor Detail

AbstractUserTransactionService

public AbstractUserTransactionService()
Method Detail

getTrimmedProperty

public static String getTrimmedProperty(String name,
                                        Properties p)
Utility method to get and trim properties.

Parameters:
name - The name of the property to get.
p - The properties to look in.
Returns:
String The property without leading or trailing spaces, or null if not found.

getDefaultName

protected static String getDefaultName()
Utility method to get a default TM name.

Returns:
A default TM name based on the local IP.

getHostAddress

protected static String getHostAddress()
Utility method to get the local host address.

Returns:

findOrCreateFolder

protected static String findOrCreateFolder(String path)
Utility method to find or create a given folder

Parameters:
path - The folder path.
Returns:
String The resulting file path, or a default if the given path is not valid as a folder.

shutdown

public void shutdown(boolean force)
              throws IllegalStateException
Specified by:
shutdown in interface UserTransactionService
Throws:
IllegalStateException
See Also:
UserTransactionService

init

public void init(TSInitInfo info)
          throws SysException
Specified by:
init in interface UserTransactionService
Throws:
SysException
See Also:
UserTransactionService

getCompositeTransactionManager

public CompositeTransactionManager getCompositeTransactionManager()
Specified by:
getCompositeTransactionManager in interface UserTransactionService
See Also:
UserTransactionService

getImportingTransactionManager

public ImportingTransactionManager getImportingTransactionManager()
Specified by:
getImportingTransactionManager in interface UserTransactionService
See Also:
UserTransactionService

getExportingTransactionManager

public ExportingTransactionManager getExportingTransactionManager()
Specified by:
getExportingTransactionManager in interface UserTransactionService
See Also:
UserTransactionService

registerResource

public void registerResource(RecoverableResource res)
Specified by:
registerResource in interface UserTransactionService

registerLogAdministrator

public void registerLogAdministrator(LogAdministrator admin)
Specified by:
registerLogAdministrator in interface UserTransactionService

getResources

public Enumeration getResources()
Specified by:
getResources in interface UserTransactionService

getLogAdministrators

public Enumeration getLogAdministrators()
Specified by:
getLogAdministrators in interface UserTransactionService

removeResource

public void removeResource(RecoverableResource res)
Specified by:
removeResource in interface UserTransactionService

removeLogAdministrator

public void removeLogAdministrator(LogAdministrator admin)
Specified by:
removeLogAdministrator in interface UserTransactionService

registerTSListener

public void registerTSListener(TSListener listener)
Specified by:
registerTSListener in interface UserTransactionService

removeTSListener

public void removeTSListener(TSListener listener)
Specified by:
removeTSListener in interface UserTransactionService

init

public void init(Properties properties)
          throws SysException
Specified by:
init in interface UserTransactionService
Throws:
SysException


Copyright © 2014. All Rights Reserved.