org.neo4j.kernel.impl.transaction
Class TxModule

java.lang.Object
  extended by org.neo4j.kernel.impl.transaction.TxModule

public class TxModule
extends Object

Can reads a XA data source configuration file and registers all the data sources defined there or be used to manually add XA data sources.

This module will create a instance of each XaDataSource once started and will close them once stopped.

See Also:
XaDataSourceManager

Constructor Summary
TxModule(boolean readOnly, KernelPanicEventGenerator kpe)
           
TxModule(String txLogDir, KernelPanicEventGenerator kpe, TxHook txHook, String serviceName)
           
 
Method Summary
 void destroy()
           
 int getActiveTxCount()
           
 int getCommittedTxCount()
           
 String getModuleName()
           
 int getPeakConcurrentTxCount()
           
 int getRolledbackTxCount()
           
 int getStartedTxCount()
           
 TxHook getTxHook()
           
 String getTxLogDirectory()
           
 TransactionManager getTxManager()
           
 XaDataSourceManager getXaDataSourceManager()
           
 void init()
           
 XaDataSource registerDataSource(String dsName, String className, byte[] resourceId, Map<?,?> params)
          Use this method to add data source that can participate in transactions if you don't want a data source configuration file.
 XaDataSource registerDataSource(String dsName, String className, byte[] resourceId, Map<?,?> params, boolean useExisting)
           
 void reload()
           
 void start()
           
 void stop()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TxModule

public TxModule(String txLogDir,
                KernelPanicEventGenerator kpe,
                TxHook txHook,
                String serviceName)

TxModule

public TxModule(boolean readOnly,
                KernelPanicEventGenerator kpe)
Method Detail

init

public void init()

start

public void start()

reload

public void reload()

stop

public void stop()

destroy

public void destroy()

getModuleName

public String getModuleName()

registerDataSource

public XaDataSource registerDataSource(String dsName,
                                       String className,
                                       byte[] resourceId,
                                       Map<?,?> params)
Use this method to add data source that can participate in transactions if you don't want a data source configuration file.

Parameters:
name - The data source name
className - The (full) class name of class
resourceId - The resource id identifying datasource
params - The configuration map for the datasource
Throws:
LifecycleException

registerDataSource

public XaDataSource registerDataSource(String dsName,
                                       String className,
                                       byte[] resourceId,
                                       Map<?,?> params,
                                       boolean useExisting)

getTxLogDirectory

public String getTxLogDirectory()

getTxManager

public TransactionManager getTxManager()

getXaDataSourceManager

public XaDataSourceManager getXaDataSourceManager()

getTxHook

public TxHook getTxHook()

getStartedTxCount

public int getStartedTxCount()

getCommittedTxCount

public int getCommittedTxCount()

getRolledbackTxCount

public int getRolledbackTxCount()

getActiveTxCount

public int getActiveTxCount()

getPeakConcurrentTxCount

public int getPeakConcurrentTxCount()


Copyright © 2002-2012 The Neo4j Graph Database Project. All Rights Reserved.