Example usage for org.apache.commons.transaction.util CommonsLoggingLogger CommonsLoggingLogger

List of usage examples for org.apache.commons.transaction.util CommonsLoggingLogger CommonsLoggingLogger

Introduction

In this page you can find the example usage for org.apache.commons.transaction.util CommonsLoggingLogger CommonsLoggingLogger.

Prototype

public CommonsLoggingLogger(final Log log) 

Source Link

Usage

From source file:de.thorstenberger.examServer.dao.AbstractTransactionalFileIO.java

/**
 * Create a new file transaction manager for the given directory.
 *
 * @param path/*from   w w w.  j a  v a2  s.c  o m*/
 *            directory
 */
private synchronized void initFileTransactionsForDirectory(final String path) {
    if (resourceManagers.get(path) == null) {
        resourceManagers.put(path,
                new FileResourceManager(path, path + "_dirty", false, new CommonsLoggingLogger(log)));
        try {
            resourceManagers.get(path).start();
        } catch (final ResourceManagerSystemException ex) {
            throw new TaskModelPersistenceException(ex);
        }
    }

}

From source file:org.jboss.jbossts.fileio.xalib.txdirs.dir.XAFileResourceManager.java

/**
 * After a system crash and upon recovery phase the <code>FileResourceManager</code>
 * object needs to be re-initialised.//  w w w  . j  a v  a  2 s.  c om
 */
private void initFREM() {
    String workDir = storeDir + "/" + Globals.WORK_DIR_NAME;
    freMngr = new FileResourceManager(storeDir, workDir, false,
            new CommonsLoggingLogger(LogFactory.getLog(XADir.class.getName())));
    try {
        freMngr.start(); // will automatically recover incomplete txs
    } catch (ResourceManagerSystemException e) {
        e.printStackTrace();
    }
}