org.apache.derby.impl.store.raw.xact
Class XactContext

java.lang.Object
  extended byorg.apache.derby.iapi.services.context.ContextImpl
      extended byorg.apache.derby.impl.store.raw.xact.XactContext
All Implemented Interfaces:
Context

public class XactContext
extends ContextImpl

Store the transaction opened within a context manager (ie. typically a single user) for a single RawStoreFactory.


Field Summary
private  boolean abortAll
           
private  RawStoreFactory factory
           
private  RawTransaction xact
           
 
Fields inherited from class org.apache.derby.iapi.services.context.ContextImpl
 
Constructor Summary
XactContext(ContextManager cm, java.lang.String name, Xact xact, boolean abortAll, RawStoreFactory factory)
           
 
Method Summary
 void cleanupOnError(java.lang.Throwable error)
          Contexts will be passed errors that are caught by the outer system when they are serious enough to require corrective action.
protected  RawStoreFactory getFactory()
           
 RawTransaction getTransaction()
           
 void substituteTransaction(Xact newTran)
           
 
Methods inherited from class org.apache.derby.iapi.services.context.ContextImpl
appendErrorInfo, getContextManager, getIdName, isLastHandler, popMe, pushMe
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

xact

private RawTransaction xact

factory

private RawStoreFactory factory

abortAll

private boolean abortAll
Constructor Detail

XactContext

public XactContext(ContextManager cm,
                   java.lang.String name,
                   Xact xact,
                   boolean abortAll,
                   RawStoreFactory factory)
Method Detail

cleanupOnError

public void cleanupOnError(java.lang.Throwable error)
                    throws StandardException
Description copied from interface: Context
Contexts will be passed errors that are caught by the outer system when they are serious enough to require corrective action. They will be told what the error is, so that they can react appropriately. Most of the time, the contexts will react by either doing nothing or by removing themselves from the context manager. If there are no other references to the context, removing itself from the manager equates to freeing it.

Contexts must release all their resources before removing themselves from their context manager.

The context manager will "unwind" the contexts during cleanup in the reverse order they were placed on its global stack.

If error is an instance of StandardException then an implementation of this method may throw a new exception if and only if the new exception is an instance of StandardException that is more severe than the original error or the new exception is a not an instance of StandardException (e.g java.lang.NullPointerException).

Throws:
StandardException - Standard Cloudscape error policy

getTransaction

public RawTransaction getTransaction()

getFactory

protected RawStoreFactory getFactory()

substituteTransaction

public void substituteTransaction(Xact newTran)


Apache Derby V10.0 Engine Documentation - Copyright © 1997,2004 The Apache Software Foundation or its licensors, as applicable.