Coverage Report - org.mule.util.file.FileManager
 
Classes in this File Line Coverage Branch Coverage Complexity
FileManager
0%
0/10
N/A
1
FileManager$FileTransactionContext
0%
0/1
N/A
1
 
 1  
 /*
 2  
  * $Id: FileManager.java 7976 2007-08-21 14:26:13Z dirk.olmes $
 3  
  * --------------------------------------------------------------------------------------
 4  
  * Copyright (c) MuleSource, Inc.  All rights reserved.  http://www.mulesource.com
 5  
  *
 6  
  * The software in this package is published under the terms of the CPAL v1.0
 7  
  * license, a copy of which has been included with this distribution in the
 8  
  * LICENSE.txt file.
 9  
  */
 10  
 
 11  
 package org.mule.util.file;
 12  
 
 13  
 import org.mule.util.xa.AbstractTransactionContext;
 14  
 import org.mule.util.xa.AbstractXAResourceManager;
 15  
 import org.mule.util.xa.ResourceManagerException;
 16  
 
 17  
 import javax.transaction.xa.XAResource;
 18  
 
 19  
 import org.apache.commons.logging.Log;
 20  
 import org.apache.commons.logging.LogFactory;
 21  
 
 22  
 /**
 23  
  * @author <a href="mailto:gnt@codehaus.org">Guillaume Nodet</a>
 24  
  * @version $Revision: 7976 $
 25  
  */
 26  0
 public class FileManager extends AbstractXAResourceManager
 27  
 {
 28  
 
 29  0
     private static Log logger = LogFactory.getLog(FileManager.class);
 30  
 
 31  
     public synchronized FileSession createSession()
 32  
     {
 33  0
         return new TransactedFileSession(this);
 34  
     }
 35  
 
 36  
     /*
 37  
      * (non-Javadoc)
 38  
      * 
 39  
      * @see org.mule.transaction.xa.AbstractResourceManager#getLogger()
 40  
      */
 41  
     protected Log getLogger()
 42  
     {
 43  0
         return logger;
 44  
     }
 45  
 
 46  
     /*
 47  
      * (non-Javadoc)
 48  
      * 
 49  
      * @see org.mule.transaction.xa.AbstractResourceManager#createTransactionContext(java.lang.Object)
 50  
      */
 51  
     protected AbstractTransactionContext createTransactionContext(Object session)
 52  
     {
 53  0
         return new FileTransactionContext();
 54  
     }
 55  
 
 56  
     /*
 57  
      * (non-Javadoc)
 58  
      * 
 59  
      * @see org.mule.transaction.xa.AbstractResourceManager#doBegin(org.mule.transaction.xa.AbstractTransactionContext)
 60  
      */
 61  
     protected void doBegin(AbstractTransactionContext context)
 62  
     {
 63  
         // template method
 64  0
     }
 65  
 
 66  
     /*
 67  
      * (non-Javadoc)
 68  
      * 
 69  
      * @see org.mule.transaction.xa.AbstractResourceManager#doPrepare(org.mule.transaction.xa.AbstractTransactionContext)
 70  
      */
 71  
     protected int doPrepare(AbstractTransactionContext context)
 72  
     {
 73  0
         return XAResource.XA_OK;
 74  
     }
 75  
 
 76  
     /*
 77  
      * (non-Javadoc)
 78  
      * 
 79  
      * @see org.mule.transaction.xa.AbstractResourceManager#doCommit(org.mule.transaction.xa.AbstractTransactionContext)
 80  
      */
 81  
     protected void doCommit(AbstractTransactionContext context) throws ResourceManagerException
 82  
     {
 83  
         // template method
 84  0
     }
 85  
 
 86  
     /*
 87  
      * (non-Javadoc)
 88  
      * 
 89  
      * @see org.mule.transaction.xa.AbstractResourceManager#doRollback(org.mule.transaction.xa.AbstractTransactionContext)
 90  
      */
 91  
     protected void doRollback(AbstractTransactionContext context) throws ResourceManagerException
 92  
     {
 93  
         // template method
 94  0
     }
 95  
 
 96  0
     protected class FileTransactionContext extends AbstractTransactionContext
 97  
     {
 98  
         // nothing here yet
 99  
     }
 100  
 
 101  
 }