[Mulgara-svn] r567 - branches/mgr-73/src/jar/resolver/java/org/mulgara/resolver

andrae at mulgara.org andrae at mulgara.org
Wed Nov 21 11:10:35 UTC 2007


Author: andrae
Date: 2007-11-21 05:10:34 -0600 (Wed, 21 Nov 2007)
New Revision: 567

Modified:
   branches/mgr-73/src/jar/resolver/java/org/mulgara/resolver/MulgaraInternalTransaction.java
Log:
Fixes to bring class in-line with the MulgaraTransaction interface.



Modified: branches/mgr-73/src/jar/resolver/java/org/mulgara/resolver/MulgaraInternalTransaction.java
===================================================================
--- branches/mgr-73/src/jar/resolver/java/org/mulgara/resolver/MulgaraInternalTransaction.java	2007-11-21 11:09:28 UTC (rev 566)
+++ branches/mgr-73/src/jar/resolver/java/org/mulgara/resolver/MulgaraInternalTransaction.java	2007-11-21 11:10:34 UTC (rev 567)
@@ -60,7 +60,7 @@
  *
  * @licence Open Software License v3.0
  */
-public class MulgaraInternalTransaction {
+public class MulgaraInternalTransaction implements MulgaraTransaction {
   /**
    * This is the state machine switch matching these states.
       switch (state) {
@@ -246,7 +246,7 @@
   //       This occurs when setting autocommit, as this creates and
   //       references a transaction object that won't be started/activated
   //       until it is first used.
-  void reference() throws MulgaraTransactionException {
+  public void reference() throws MulgaraTransactionException {
     try {
       report("Referencing Transaction");
 
@@ -285,7 +285,7 @@
     }
   }
 
-  void dereference() throws MulgaraTransactionException {
+  public void dereference() throws MulgaraTransactionException {
     report("Dereferencing Transaction");
     try {
       synchronized (this) {
@@ -400,6 +400,10 @@
     }
   }
 
+  public void heuristicRollback(String cause) throws MulgaraTransactionException {
+    implicitRollback(new MulgaraTransactionException(cause));
+  }
+
   /**
    * Rollback the transaction.
    * We don't throw an exception here when transaction fails - this is expected,
@@ -515,7 +519,7 @@
    * only it has full knowledge of which resolvers are associated with this
    * transaction.
    */
-  MulgaraTransactionException abortTransaction(String errorMessage, Throwable cause)
+  public MulgaraTransactionException abortTransaction(String errorMessage, Throwable cause)
       throws MulgaraTransactionException {
     // We need to notify the factory here - this is serious, we
     // need to rollback this transaction, but if we have reached here
@@ -565,7 +569,7 @@
     }
   }
 
-  void execute(Operation operation,
+  public void execute(Operation operation,
                ResolverSessionFactory resolverSessionFactory, // FIXME: We shouldn't need this. - only used for backup and restore operations.
                DatabaseMetadata metadata) throws MulgaraTransactionException {
     report("Executing Operation");
@@ -586,7 +590,7 @@
     }
   }
 
-  AnswerOperationResult execute(AnswerOperation ao) throws TuplesException {
+  public AnswerOperationResult execute(AnswerOperation ao) throws TuplesException {
     debugReport("Executing AnswerOperation");
     try {
       activate();
@@ -606,7 +610,7 @@
   }
 
 
-  void execute(TransactionOperation to) throws MulgaraTransactionException {
+  public void execute(TransactionOperation to) throws MulgaraTransactionException {
     report("Executing TransactionOperation");
     try {
       activate();




More information about the Mulgara-svn mailing list