1 21 22 package org.apache.derby.impl.store.raw.xact; 23 24 import org.apache.derby.iapi.reference.SQLState; 25 26 import org.apache.derby.iapi.store.raw.Transaction; 27 28 import org.apache.derby.iapi.store.raw.log.LogFactory; 29 30 import org.apache.derby.iapi.store.raw.data.DataFactory; 31 32 import org.apache.derby.iapi.error.StandardException; 33 34 import org.apache.derby.iapi.services.sanity.SanityManager; 35 36 import java.io.ObjectInput ; 37 38 43 public class InternalXact extends Xact 44 { 45 46 49 50 protected InternalXact( 51 XactFactory xactFactory, 52 LogFactory logFactory, 53 DataFactory dataFactory) 54 { 55 super(xactFactory, logFactory, dataFactory, false, null); 56 57 setPostComplete(); 59 } 60 61 64 65 66 74 public int setSavePoint(String name, Object kindOfSavepoint) 75 throws StandardException 76 { 77 throw StandardException.newException( 78 SQLState.XACT_NOT_SUPPORTED_IN_INTERNAL_XACT); 79 } 80 81 82 85 93 94 public void checkLogicalOperationOK() 95 throws StandardException 96 { 97 throw StandardException.newException( 98 SQLState.XACT_NOT_SUPPORTED_IN_INTERNAL_XACT); 99 } 100 101 106 public boolean recoveryRollbackFirst() 107 { 108 return true; 109 } 110 111 114 115 120 protected void doComplete(Integer commitOrAbort) 121 throws StandardException 122 { 123 124 if (commitOrAbort.equals(ABORT)) 127 super.doComplete(commitOrAbort); 128 } 129 130 protected void setIdleState() 131 { 132 133 super.setIdleState(); 134 135 if (countObservers() != 0) 138 { 139 try 140 { 141 super.setActiveState(); 142 } 143 catch (StandardException se) 144 { 145 if (SanityManager.DEBUG) 146 SanityManager.THROWASSERT("unexpected exception: " + se); 147 } 148 } 149 } 150 } 151 | Popular Tags |