com.esri.arcgis.geodatabase
Class ITransactionsProxy

java.lang.Object
  extended by com.esri.arcgis.interop.Dispatch
      extended by com.esri.arcgis.geodatabase.ITransactionsProxy
All Implemented Interfaces:
ITransactions, Externalizable, Serializable

public class ITransactionsProxy
extends com.esri.arcgis.interop.Dispatch
implements ITransactions, Serializable

Provides access to members that control Transaction management.

Remarks

ITransactions is an optional interface that allows an application to explicitly control database transactions. The interface does not support nested transactions. The InTransaction property should be used to test if the workspace is already within a transaction. Applications are responsible for starting a new transaction (using the StartTransaction method) on the workspace only if the workspace is not already within a transaction. An application is responsible for stopping only those transactions (using CommitTransaction or AbortTransaction) that were started by the application. If there is an open transaction on the workspace and StartTransaction is called it will amount to a no operation call. With this being said, any calls to CommitTransaction or AbortTransaction will act on the original open transaction.


Applications can use transactions to manage direct updates, for example, updates made outside of an edit session, on object and feature classes that are tagged as not requiring an edit session. This interface should only be used if it is the desire to control the transactional scope while making edits outside of an edit session. For example, it is possible to commit an number of sequential updates to a non-versioned table using the ITransactions interface. When using transactions to manage direct updates, applications are responsible for discarding any cached row objects at transaction boundaries.


Applications should not use transactions when performing updates within an edit session (see the documentation on IWorkspaceEdit for information on edit sessions). In the context of an edit session, transactions are managed by the workspace and automatically started and stopped as needed.


Applications should be aware that DDL operations made through the geodatabase API (for example, deleting a feature dataset, creating a new feature class or adding a field to a feature class) use database transactions to ensure integrity of the data dictionary tables and commit the transaction at the end of the operation. It is for this reason that the ITransactions interface should also not be used to make any kind of schema edits; this would constitute a nested transaction. Applications should not invoke DDL operations within an application transaction, application transactions should be restricted to DML operations (such as feature edits).

When To Use

Applications can use transactions to manage direct updates, for example, updates made outside of an edit session, on object and feature classes that are tagged as not requiring an edit session.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

See Also:
Serialized Form

Field Summary
 boolean noncastable
           
 
Fields inherited from class com.esri.arcgis.interop.Dispatch
DISPATCH_METHOD, DISPATCH_PROPERTYGET, DISPATCH_PROPERTYPUT, DISPATCH_PROPERTYPUTREF, objRef
 
Constructor Summary
  ITransactionsProxy()
           
  ITransactionsProxy(Object obj)
           
protected ITransactionsProxy(Object obj, String iid)
           
 
Method Summary
 void abortTransaction()
          Aborts the current transaction.
 void addListener(String iidStr, Object theListener, Object theSource)
           
 void commitTransaction()
          Commits the current transaction.
 boolean isInTransaction()
          Indicates if there is already a transaction in progress.
 void removeListener(String iidStr, Object theListener)
           
 void startTransaction()
          Begins a new transaction.
 
Methods inherited from class com.esri.arcgis.interop.Dispatch
bindUsingMoniker, constructVtblPosTable, convertToNative, cookieForListener, createDispatch, createObjrefMonikerDisplayName, equals, getActiveObject, getActiveObject, getDefaultProperty, getDispatchIdOfName, getLastErrorCode, getMtsObjectContext, getObjRef, getPropertyByName, getPropertyByName, getVtblPos, hashCode, initDispatch, invoke, invokeMethodByName, invokeMethodByName, invokeMethodByName, invokePropertyGetByName, invokePropertyPutByName, invokePropertyPutByRefByName, isNativeMode, isObjRef, optimizedVtblInvoke, queryInterface, readExternal, release, setNativeMode, setPropertyByName, toString, vtblInvoke, writeExternal
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

noncastable

public boolean noncastable
Constructor Detail

ITransactionsProxy

public ITransactionsProxy()

ITransactionsProxy

public ITransactionsProxy(Object obj)
                   throws IOException
Throws:
IOException

ITransactionsProxy

protected ITransactionsProxy(Object obj,
                             String iid)
                      throws IOException
Throws:
IOException
Method Detail

addListener

public void addListener(String iidStr,
                        Object theListener,
                        Object theSource)
                 throws IOException
Overrides:
addListener in class com.esri.arcgis.interop.Dispatch
Throws:
IOException

removeListener

public void removeListener(String iidStr,
                           Object theListener)
                    throws IOException
Overrides:
removeListener in class com.esri.arcgis.interop.Dispatch
Throws:
IOException

isInTransaction

public boolean isInTransaction()
                        throws IOException,
                               AutomationException
Indicates if there is already a transaction in progress.

Remarks

ITransactions does not support nested transactions. The InTransaction property should be used to test if the workspace is already within a transaction.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
isInTransaction in interface ITransactions
Returns:
The pInTransaction
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

startTransaction

public void startTransaction()
                      throws IOException,
                             AutomationException
Begins a new transaction.

Remarks

Applications are responsible for starting a new transaction (using the StartTransaction method) on the workspace only if the workspace is not already within a transaction. If the workspace is within an transaction this call will amount to a no operation without error. It should be noted that if CommitTransaction is then called it will be acting on the origin transaction and all changes within that original transaction wil be commited.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
startTransaction in interface ITransactions
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

commitTransaction

public void commitTransaction()
                       throws IOException,
                              AutomationException
Commits the current transaction.

Remarks

An application is responsible for stopping only those transactions (using CommitTransaction or AbortTransaction) that were started by the application.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
commitTransaction in interface ITransactions
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

abortTransaction

public void abortTransaction()
                      throws IOException,
                             AutomationException
Aborts the current transaction.

Remarks

An application is responsible for stopping only those transactions (using CommitTransaction or AbortTransaction) that were started by the application.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
abortTransaction in interface ITransactions
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.