org.apache.geronimo.connector.outbound.transactionlog
Class JDBCLog

java.lang.Object
  extended by org.apache.geronimo.connector.outbound.transactionlog.JDBCLog
All Implemented Interfaces:
GBeanLifecycle, org.apache.geronimo.transaction.manager.TransactionLog

public class JDBCLog
extends Object
implements org.apache.geronimo.transaction.manager.TransactionLog, GBeanLifecycle

"Last Resource optimization" for single servers wishing to have valid xa transactions with a single 1-pc datasource. The database is used for the log, and the database work is committed when the log writes its prepare record.


Constructor Summary
JDBCLog(String systemId, DataSource dataSource)
           
JDBCLog(String systemId, ResourceSource<ResourceException> managedConnectionFactoryWrapper)
           
 
Method Summary
 void begin(Xid xid)
           
 void commit(Xid xid, Object logMark)
           
 void doFail()
          Fails the GBean.
 void doStart()
          Starts the GBean.
 void doStop()
          Stops the target.
 int getAverageBytesPerForce()
           
 int getAverageForceTime()
           
 String getXMLStats()
           
 Object prepare(Xid xid, List branches)
           
 Collection recover(org.apache.geronimo.transaction.manager.XidFactory xidFactory)
           
 void rollback(Xid xid, Object logMark)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JDBCLog

public JDBCLog(String systemId,
               ResourceSource<ResourceException> managedConnectionFactoryWrapper)

JDBCLog

public JDBCLog(String systemId,
               DataSource dataSource)
Method Detail

doStart

public void doStart()
             throws Exception
Description copied from interface: GBeanLifecycle
Starts the GBean. This informs the GBean that it is about to transition to the running state.

Specified by:
doStart in interface GBeanLifecycle
Throws:
Exception - if the target failed to start; this will cause a transition to the failed state

doStop

public void doStop()
            throws Exception
Description copied from interface: GBeanLifecycle
Stops the target. This informs the GBean that it is about to transition to the stopped state.

Specified by:
doStop in interface GBeanLifecycle
Throws:
Exception - if the target failed to stop; this will cause a transition to the failed state

doFail

public void doFail()
Description copied from interface: GBeanLifecycle
Fails the GBean. This informs the GBean that it is about to transition to the failed state.

Specified by:
doFail in interface GBeanLifecycle

begin

public void begin(Xid xid)
           throws org.apache.geronimo.transaction.manager.LogException
Specified by:
begin in interface org.apache.geronimo.transaction.manager.TransactionLog
Throws:
org.apache.geronimo.transaction.manager.LogException

prepare

public Object prepare(Xid xid,
                      List branches)
               throws org.apache.geronimo.transaction.manager.LogException
Specified by:
prepare in interface org.apache.geronimo.transaction.manager.TransactionLog
Throws:
org.apache.geronimo.transaction.manager.LogException

commit

public void commit(Xid xid,
                   Object logMark)
            throws org.apache.geronimo.transaction.manager.LogException
Specified by:
commit in interface org.apache.geronimo.transaction.manager.TransactionLog
Throws:
org.apache.geronimo.transaction.manager.LogException

rollback

public void rollback(Xid xid,
                     Object logMark)
              throws org.apache.geronimo.transaction.manager.LogException
Specified by:
rollback in interface org.apache.geronimo.transaction.manager.TransactionLog
Throws:
org.apache.geronimo.transaction.manager.LogException

recover

public Collection recover(org.apache.geronimo.transaction.manager.XidFactory xidFactory)
                   throws org.apache.geronimo.transaction.manager.LogException
Specified by:
recover in interface org.apache.geronimo.transaction.manager.TransactionLog
Throws:
org.apache.geronimo.transaction.manager.LogException

getXMLStats

public String getXMLStats()
Specified by:
getXMLStats in interface org.apache.geronimo.transaction.manager.TransactionLog

getAverageForceTime

public int getAverageForceTime()
Specified by:
getAverageForceTime in interface org.apache.geronimo.transaction.manager.TransactionLog

getAverageBytesPerForce

public int getAverageBytesPerForce()
Specified by:
getAverageBytesPerForce in interface org.apache.geronimo.transaction.manager.TransactionLog


Copyright © 2003-2008 The Apache Geronimo development community. All Rights Reserved.