Spring.Data Spring AOP exception translation aspect for use at Repository or DAO layer level. Translates native persistence exceptions into Spring's DataAccessException hierarchy, based on a given PersistenceExceptionTranslator. Rod Johnson Juergen Hoeller Mark Pollack (.NET) Initializes a new instance of the class. The persistence exception translator to use. Type of the repository attribute to check for. Initializes a new instance of the class. The object factory to obtain all IPersistenceExceptionTranslators from. Type of the repository attribute to check for. Return the advice part of this aspect.

An advice may be an interceptor, a throws advice, before advice, introduction etc.

The advice that should apply if the pointcut matches.
The that drives this advisor. Object post-processor that automatically applies persistence exception translation to any bean that carries the attribute, adding a corresponding to the exposed proxy (either an existing AOP proxy or a newly generated proxy that implements all of the target's interfaces). Translates native resource exceptions to Spring's hierarchy. Autodetects object that implement the interface, which are subsequently asked to translate candidate exceptions. All of Spring's applicable resource factories implement the IPersistenceExceptionTranslator interface out of the box. As a consequence, all that is usually needed to enable automatic exception translation is marking all affected objects (such as DAOs) with the Repository annotation, along with defining this post-processor in the application context. Rod Johnson Juergen Hoeller Mark Pollack (.NET) Just return the passed in object instance The new object instance. The name of the object. The passed in object instance In case of errors. Add PersistenceExceptionTranslationAdvice to candidate object if it is a match. Create AOP proxy if necessary or add advice to existing advice chain. The new object instance. The name of the object. The object instance to use, wrapped with either the original or a wrapped one. In case of errors. Sets the type of the repository attribute. The default required attribute type is the attirbute. This setter property exists so that developers can provide their own (non-Spring-specific) attribute type to indicate that a class has a repository role. The desitred type of the repository attribute. Callback that supplies the owning factory to an object instance. Miscellaneous utility methods for DAO implementations. Useful with any data access technology. Mark Pollack (.NET) Initializes a new instance of the class. Implementation of PersistenceExceptionTranslator that supports chaining, allowing the addition of PersistenceExceptionTranslator instances in order. Returns non-null on the first (if any) match. Rod Johnson Juergen Hoeller Mark Pollack (.NET) Interface implemented by Spring integrations with data access technologies that throw exceptions. This allows consistent usage of combined exception translation functionality, without forcing a single translator to understand every single possible type of exception. Rod Johnson Mark Pollack (.NET) Translate the given exception thrown by a persistence framework to a corresponding exception from Spring's generic DataAccessException hierarchy, if possible. Do not translate exceptions that are not understand by this translator: for example, if coming from another persistence framework, or resulting from user code and unrelated to persistence. Of particular importance is the correct translation to for example on constraint violation. Implementations may use Spring ADO.NET Framework's sophisticated exception translation to provide further information in the event of SQLException as a root cause. The exception thrown. the corresponding DataAccessException (or null if the exception could not be translated, as in this case it may result from user code rather than an actual persistence problem) Rod Johnson Juergen Hoeller Mark Pollack (.NET) Adds the translator to the translator list. The translator. Translate the given exception thrown by a persistence framework to a corresponding exception from Spring's generic DataAccessException hierarchy, if possible. The exception thrown. the corresponding DataAccessException (or null if the exception could not be translated, as in this case it may result from user code rather than an actual persistence problem) Do not translate exceptions that are not understand by this translator: for example, if coming from another persistence framework, or resulting from user code and unrelated to persistence. Of particular importance is the correct translation to for example on constraint violation. Implementations may use Spring ADO.NET Framework's sophisticated exception translation to provide further information in the event of SQLException as a root cause. Gets all registered IPersistenceExceptionTranslator as an array. The IPersistenceExceptionTranslators. Generic base class for DAOs, defining template methods for DAO initialization. Extended by Spring's specific DAO support classes, such as: AdoDaoSupport, HibernateDaoSupport, etc. Mark Pollack (.NET) The shared instance for this class (and derived classes). Initializes a new instance of the class. Abstract subclasses must override this to check their configuration.

Implementors should be marked as sealed, to make it clear that concrete subclasses are not supposed to override this template method themselves.

Concrete subclasses can override this for custom initialization behavior. Gets called after population of this instance's object properties. Exception thrown if InitDao fails will be rethrown as a ObjectInitializationException. Miscellaneous utility methods for DAO implementations. Useful with any data access technology. Mark Pollack (.NET) Initializes a new instance of the class. Return a translated exception if this is appropriate, or null if the exception could not be translated. The raw exception we may wish to translate. The PersistenceExceptionTranslator to use to perform the translation. A translated exception if translation is possible, or or null if the exception could not be translated. AOP MethodInterceptor that provides persistence exception translation based on a given PersistenceExceptionTranslator. Delegates to the given to translate an Exception thrown into Spring's DataAccessException hierarchy (if appropriate). Rod Johnson Juergen Hoeller Mark Pollack (.NET) Initializes a new instance of the class. Needs to be configured with a PersistenceExceptionTranslator afterwards. Initializes a new instance of the class for the given IPersistenceExceptionTranslator The persistence exception translator to use. Initializes a new instance of the class, autodetecting IPersistenceExceptionTranslators in the given object factory. The object factory to obtain all IPersistenceExceptionTranslators from. Ensures that the property PersistenceExceptionTranslator has been set. Invoked by an after it has injected all of an object's dependencies. In the event of misconfiguration (such as the failure to set a required property) or if initialization fails. Detects the petsistence exception translators in the given object factory. The object factory for obtaining all IPersistenceExceptionTranslators. A chained IPersistenceExceptionTranslator, combining all PersistenceExceptionTranslators found in the factory Return a translated exception if this is appropriate, otherwise rethrow the original exception. Sets the persistence exception translator. The default is to autodetect all IPersistenceExceptionTranslators in the containing object factory, using them in a chain. The persistence exception translator. Callback that supplies the owning factory to an object instance. Owning (may not be ). The object can immediately call methods on the factory.

Invoked after population of normal object properties but before an init callback like 's method or a custom init-method.

In case of initialization errors.
Exception thrown on failure to aquire a lock during an update i.e a select for update statement.

This exception will be thrown either by O/R mapping tools or by custom DAO implementations.

Rod Johnson Griffin Caprio (.NET)
Exception thrown on a pessimistic locking violation. Serves as a superclass for more specific exceptions, like CannotAcquireLockException and DeadlockLoserDataAccessException This exception will be thrown either by O/R mapping tools or by custom DAO implementations. Rod Johnson Mark Pollack (.NET) Exception thrown on concurrency failure. This exception should be sublassed to indicate the type of failure - optimistic locking, failure to acquire lock, etc.

This exception will be thrown either by O/R mapping tools or by custom DAO implementations.

Thomas Risberg Griffin Caprio (.NET)
Root of the hierarchy of data access exception that are considered transient - where a previously failed operation might be able to succeed when the operation is retried without any intervention by application-level functionality. Thomas Risberg Mark Pollack (.NET) Root of the hierarchy of data access exceptions Rod Johnson Griffin Caprio (.NET) Creates a new instance of the class. Creates a new instance of the class. A message about the exception. Creates a new instance of the class. A message about the exception. The root exception (from the underlying data access API, such as ADO.NET). Creates a new instance of the class. The that holds the serialized object data about the exception being thrown. The that contains contextual information about the source or destination. Creates a new instance of the class. Creates a new instance of the class. A message about the exception. Creates a new instance of the class. A message about the exception. The root exception (from the underlying data access API, such as ADO.NET). Creates a new instance of the class. The that holds the serialized object data about the exception being thrown. The that contains contextual information about the source or destination. Creates a new instance of the class. Creates a new instance of the class. A message about the exception. Creates a new instance of the class. A message about the exception. The root exception (from the underlying data access API, such as ADO.NET). Creates a new instance of the class. The that holds the serialized object data about the exception being thrown. The that contains contextual information about the source or destination. Creates a new instance of the class. Creates a new instance of the class. A message about the exception. Creates a new instance of the class. A message about the exception. The root exception (from the underlying data access API, such as ADO.NET). Creates a new instance of the class. The that holds the serialized object data about the exception being thrown. The that contains contextual information about the source or destination. Creates a new instance of the class. Creates a new instance of the class. A message about the exception. Creates a new instance of the class. A message about the exception. The root exception (from the underlying data access API, such as ADO.NET). Creates a new instance of the class. The that holds the serialized object data about the exception being thrown. The that contains contextual information about the source or destination. Exception thrown on failure to complete a transaction in serialized mode due to update conflicts.

This exception will be thrown either by O/R mapping tools or by custom DAO implementations.

Rod Johnson Griffin Caprio (.NET)
Creates a new instance of the class. Creates a new instance of the class. A message about the exception. Creates a new instance of the class. A message about the exception. The root exception (from the underlying data access API, such as ADO.NET). Creates a new instance of the class. The that holds the serialized object data about the exception being thrown. The that contains contextual information about the source or destination. Exception thrown when we couldn't cleanup after a data access operation, but the actual operation went OK.

For example, this exception or a subclass might be thrown if an ADO.NET connection couldn't be closed after it had been used successfully.

Note that data access code might perform resource cleanup in a finally block and therefore log cleanup failure rather than rethrow it, to keep the original data access exception, if any.

Rod Johnson Griffin Caprio (.NET)
Root of the hierarchy of data access exception that are considered non-transient - where a retry of the same operation would fail unless the cause of the Exception is corrected. Thomas Risberg Mark Pollack (.NET) Creates a new instance of the class. Creates a new instance of the class. A message about the exception. Creates a new instance of the class. A message about the exception. The root exception (from the underlying data access API, such as ADO.NET). Creates a new instance of the class. The that holds the serialized object data about the exception being thrown. The that contains contextual information about the source or destination. Creates a new instance of the class. Creates a new instance of the class. A message about the exception. Creates a new instance of the class. A message about the exception. The root exception (from the underlying data access API, such as ADO.NET). Creates a new instance of the class. The that holds the serialized object data about the exception being thrown. The that contains contextual information about the source or destination. Data access exception thrown when a resource fails completely: for example, if we can't connect to a database using ADO.NET. Rod Johnson Griffin Caprio (.NET) Creates a new instance of the class. Creates a new instance of the class. A message about the exception. Creates a new instance of the class. A message about the exception. The root exception (from the underlying data access API, such as ADO.NET). Creates a new instance of the class. The that holds the serialized object data about the exception being thrown. The that contains contextual information about the source or destination. Exception thrown when an attempt to insert or update data results in violation of an integrity constraint.

Note that this is not purely a relational concept; unique primary keys are required by most database types.

Rod Johnson Griffin Caprio (.NET)
Creates a new instance of the class. Creates a new instance of the class. A message about the exception. Creates a new instance of the class. A message about the exception. The root exception (from the underlying data access API, such as ADO.NET). Creates a new instance of the class. The that holds the serialized object data about the exception being thrown. The that contains contextual information about the source or destination. Exception thrown if certain expected data could not be retrieved, e.g. when looking up specific data via a known identifier.

This exception will be thrown either by O/R mapping tools or by custom DAO implementations.

Juergen Hoeller Griffin Caprio (.NET)
Creates a new instance of the class. Creates a new instance of the class. A message about the exception. Creates a new instance of the class. A message about the exception. The root exception (from the underlying data access API, such as ADO.NET). Creates a new instance of the class. The that holds the serialized object data about the exception being thrown. The that contains contextual information about the source or destination. Generic exception thrown when the current process was a deadlock loser, and its transaction rolled back. Rod Johnson Griffin Caprio (.NET) Creates a new instance of the class. Creates a new instance of the class. A message about the exception. Creates a new instance of the class. A message about the exception. The root exception (from the underlying data access API, such as ADO.NET). Creates a new instance of the class. The that holds the serialized object data about the exception being thrown. The that contains contextual information about the source or destination. Data access exception thrown when a result was not of the expected size, for example when expecting a single row but getting 0 or more than 1 rows. Mark Pollack (.NET) Juergen Hoeller Data access exception thrown when a result was not of the expected size, for example when expecting a single row but getting 0 or more than 1 rows. Juergen Hoeller Griffin Caprio (.NET) Exception thrown on incorrect usage of the API, such as failing to "compile" a query object that needed compilation before execution.

This represents a problem in our data access framework, not the underlying data access infrastructure.

Rod Johnson Griffin Caprio (.NET)
Creates a new instance of the class. Creates a new instance of the class. A message about the exception. Creates a new instance of the class. A message about the exception. The root exception (from the underlying data access API, such as ADO.NET). Creates a new instance of the class. The that holds the serialized object data about the exception being thrown. The that contains contextual information about the source or destination. Creates a new instance of the class. Creates a new instance of the class. A message about the exception. Creates a new instance of the class. A message about the exception. The root exception (from the underlying data access API, such as ADO.NET). Creates a new instance of the class. The expected result size. The actual result size (or -1 if unknown). Creates a new instance of the class. > A message about the exception. The expected result size. The actual result size (or -1 if unknown). Initializes a new instance of the class. A message about the exception The expected result size. Creates a new instance of the class. The that holds the serialized object data about the exception being thrown. The that contains contextual information about the source or destination. Override of to allow for private serialization. The that holds the serialized object data about the exception. The that contains contextual information about the source or destination. Return the expected result size. Return the actual result size (or -1 if unknown). Initializes a new instance of the class. Initializes a new instance of the class. The message. Initializes a new instance of the class. The message. The inner exception. Creates a new instance of the class. The expected size. Creates a new instance of the class. A message about the exception. The expected size. Initializes a new instance of the class. The that holds the serialized object data about the exception being thrown. The that contains contextual information about the source or destination. The parameter is . The class name is or is zero (0). Data access exception thrown when something unintended appears to have happened with an update, but the transaction hasn't already been rolled back.

Thrown, for example, when we wanted to update 1 row in an RDBMS but actually updated 3.

Rod Johnson Griffin Caprio (.NET)
Root for exceptions thrown when we use a data access resource incorrectly.

Thrown for example on specifying bad SQL when using a RDBMS. Resource-specific subclasses will probably be supplied by data access packages.

Rod Johnson Griffin Caprio (.NET)
Creates a new instance of the class. Creates a new instance of the class. A message about the exception. Creates a new instance of the class. A message about the exception. The root exception (from the underlying data access API, such as ADO.NET). Creates a new instance of the class. The that holds the serialized object data about the exception being thrown. The that contains contextual information about the source or destination. Creates a new instance of the class. Creates a new instance of the class. A message about the exception. Creates a new instance of the class. A message about the exception. The root exception (from the underlying data access API, such as ADO.NET). Creates a new instance of the class. The that holds the serialized object data about the exception being thrown. The that contains contextual information about the source or destination. Return whether or not data was updated. True if data was updated (as opposed to being incorrectly updated). If this property returns false, there's nothing to roll back. Data access exception thrown when a resource fails completely and the failure is permanent. Thomas Risberg Mark Pollack (.NET) Creates a new instance of the class. Creates a new instance of the class. A message about the exception. Creates a new instance of the class. A message about the exception. The root exception (from the underlying data access API, such as ADO.NET). Creates a new instance of the class. The that holds the serialized object data about the exception being thrown. The that contains contextual information about the source or destination. Exception thrown on an optimistic locking violation for a mapped object. Provides information about the persistent class and the identifier. Mark Pollack (.NET) Exception thrown on an optimistic locking violation.

This exception will be thrown either by O/R mapping tools or by custom DAO implementations.

Rod Johnson Griffin Caprio (.NET)
Creates a new instance of the class. Creates a new instance of the class. A message about the exception. Creates a new instance of the class. A message about the exception. The root exception (from the underlying data access API, such as ADO.NET). Creates a new instance of the class. The that holds the serialized object data about the exception being thrown. The that contains contextual information about the source or destination. Initializes a new instance of the class. Initializes a new instance of the class. A message about the exception.. Creates a new instance of the class. A message about the exception. The root exception from the underlying data access API Creates a new instance of the class. The that holds the serialized object data about the exception being thrown. The that contains contextual information about the source or destination. When overridden in a derived class, sets the with information about the exception. The that holds the serialized object data about the exception being thrown. The that contains contextual information about the source or destination. The parameter is a null reference ( in Visual Basic). Exception thrown if a mapped object could not be retrieved via its identifier. Provides information about the persistent class and the identifier. Mark Pollack (.NET) Creates a new instance of the class. Initializes a new instance of the class. A message about the exception. Creates a new instance of the class. A message about the exception. The root exception from the underlying data access API Creates a new instance of the class. The that holds the serialized object data about the exception being thrown. The that contains contextual information about the source or destination. When overridden in a derived class, sets the with information about the exception. The that holds the serialized object data about the exception being thrown. The that contains contextual information about the source or destination. The parameter is a null reference ( in Visual Basic). Exception thrown when the underlyingresource denied a permission to access a specific element, such as a specific database table. Juergen Hoeller Mark Pollack (.NET) Creates a new instance of the class. Creates a new instance of the class. A message about the exception. Creates a new instance of the class. A message about the exception. The root exception (from the underlying data access API, such as ADO.NET). Creates a new instance of the class. The that holds the serialized object data about the exception being thrown. The that contains contextual information about the source or destination. RDta access exception thrown when a resource fails temporarily and the operation can be retried. Thomas Risberg Mark Pollack (.NET) Creates a new instance of the class. Creates a new instance of the class. A message about the exception. Creates a new instance of the class. A message about the exception. The root exception (from the underlying data access API, such as ADO.NET). Creates a new instance of the class. The that holds the serialized object data about the exception being thrown. The that contains contextual information about the source or destination. Exception thrown on mismatch between CLS type and database type: for example on an attempt to set an object of the wrong type in an RDBMS column. Rod Johnson Griffin Caprio (.NET) Creates a new instance of the class. Creates a new instance of the class. A message about the exception. Creates a new instance of the class. A message about the exception. The root exception (from the underlying data access API, such as ADO.NET). Creates a new instance of the class. The that holds the serialized object data about the exception being thrown. The that contains contextual information about the source or destination. Normal superclass when we can't distinguish anything more specific than "something went wrong with the underlying resource": for example, a SQLException from Sql Server that we can't pinpoint more precisely. Rod Johnson Griffin Caprio (.NET) Creates a new instance of the class. Creates a new instance of the class. A message about the exception. Creates a new instance of the class. A message about the exception. The root exception (from the underlying data access API, such as ADO.NET). Creates a new instance of the class. The that holds the serialized object data about the exception being thrown. The that contains contextual information about the source or destination. Provides database metdata information. Mark Pollack (.NET) Provides minimal database metadata information to support the functionality in Spring.NET ADO.NET Framework. Mark Pollack (.NET) Gets a descriptive name of the product. Example: Microsoft SQL Server, provider V2.0.0.0 in framework .NET V2.0 The name of the product. Gets the type of the connection. The fully qualified type name is given since some providers, notably for SqlServerCe, do not use the same namespace for all data access types. Example: System.Data.SqlClient.SqlCommand, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 The type of the connection. Gets the type of the command. Example: System.Data.SqlClient.SqlCommand, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 The type of the command. Gets the type of the parameter. Example: System.Data.SqlClient.SqlParameter, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 The type of the parameter. Gets the type of the data adapter. Example: System.Data.SqlClient.SqlDataAdapter, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 The type of the data adapter. Gets the type of the command builder. Example: System.Data.SqlClient.SqlCommandBuilder, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 The type of the command builder. Gets the type of the exception. Example: System.Data.SqlClient.SqlException, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 The type of the exception. Gets the error code exception expression. Example Errors[0].Number.ToString() for Sql Server The error code exception expression. Gets the command builder derive parameters method. If the value 'not supported' is specified then this method will throw an ArgumentException Example: DeriveParameters The command builder derive parameters method. Provide the prefix used to indentify named parameters in SQL text. @ for Sql Server Does the driver require the use of the parameter prefix when specifying the name of the parameter in the Command's Parameter collection. If true, then commamd.Parameters["@parameterName"] is used, otherwise, command.Parameters["parameterName"]. Gets a value indicating whether the Provider requires the use of a named prefix in the SQL string. The OLE DB/ODBC .NET Provider does not support named parameters for passing parameters to an SQL Statement or a stored procedure called by an IDbCommand when CommandType is set to Text. true if use parameter prefix in SQL; otherwise, false. For providers that allow you to choose between binding parameters to a command by name (true) or by position (false). Gets the type of the parameter db. Example: System.Data.SqlDbType, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 The type of the parameter db. Gets the parameter db type property. Example: SqlDbType for SqlServer The parameter db type property. Gets the parameter is nullable property. Example: IsNullable for Sql Server The parameter is nullable property. Gets or sets the error codes. The collection of error codes to map error code integer values to Spring's DAO exception hierarchy The error codes. Initializes a new instance of the class. Name of the product. Name of the assembly. Type of the connection. Type of the command. Type of the parameter. Type of the data adapter. Type of the command builder. The command builder derive parameters method. Type of the parameter db. The parameter db type property. The parameter is nullable property. The parameter name prefix. Type of the exception. if set to true [use parameter name prefix in parameter collection]. if set to true [use parameter prefix in SQL]. if set to true [bind by name]. The error code exception expression. Gets a value indicating whether to use param name prefix in parameter collection. true if should use param name prefix in parameter collection; otherwise, false. Gets the name of the assembly. Example: System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 The name of the assembly. Gets a descriptive name of the product. Example: Microsoft SQL Server, provider V2.0.0.0 in framework .NET V2.0 The name of the product. Gets the type of the connection. The fully qualified type name is given since some providers, notably for SqlServerCe, do not use the same namespace for all data access types. Example: System.Data.SqlClient.SqlCommand, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 The type of the connection. Gets the type of the command. Example: System.Data.SqlClient.SqlCommand, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 The type of the command. Gets the type of the parameter. Example: System.Data.SqlClient.SqlParameter, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 The type of the parameter. Gets the type of the data adapter. Example: System.Data.SqlClient.SqlDataAdapter, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 The type of the data adapter. Gets the type of the command builder. Example: System.Data.SqlClient.SqlCommandBuilder, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 The type of the command builder. Gets the command builder derive parameters method. If the value 'not supported' is specified then this method will throw an ArgumentException Example: DeriveParameters The command builder derive parameters method. Provide the prefix used to indentify named parameters in SQL text. @ for Sql Server Gets the type of the exception. Example: System.Data.SqlClient.SqlException, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 The type of the exception. Does the driver require the use of the parameter prefix when specifying the name of the parameter in the Command's Parameter collection. If true, then commamd.Parameters["@parameterName"] is used, otherwise, command.Parameters["parameterName"]. Gets a value indicating whether the Provider requires the use of a named prefix in the SQL string. true if use parameter prefix in SQL; otherwise, false. The OLE DB/ODBC .NET Provider does not support named parameters for passing parameters to an SQL Statement or a stored procedure called by an IDbCommand when CommandType is set to Text. For providers that allow you to choose between binding parameters to a command by name (true) or by position (false). Gets the type of the parameter db. Example: System.Data.SqlDbType, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 The type of the parameter db. Gets the parameter db type property. Example: SqlDbType for SqlServer The parameter db type property. Gets the parameter is nullable property. Example: IsNullable for Sql Server The parameter is nullable property. Gets or sets the error codes. The collection of error codes to map error code integer values to Spring's DAO exception hierarchy The error codes. Gets the error code exception expression. Example Errors[0].Number.ToString() for Sql Server The error code exception expression. A parameter class used by Mark Pollack (.NET) A parameter interface used by Mark Pollack (.NET) Initializes a new instance of the class. Sets the SourceVersion to be Default and the ParameterDirection to be Input. A more portable means to create a collection of ADO.NET parameters. Mark Pollack (.NET) Determines whether this collection contains the specified parameter name. Name of the parameter. true if contains the specified parameter name; otherwise, false. Add an instance of . Add a parameter specifying the all the individual properties of a IDbDataParameter. The newly created parameter The newly created parameter Adds a value to the parameter collection This method can not be used with stored procedures for providers that require named parameters. However, it is of great convenience for other cases. The value of the parameter. Index of added parameter. Adds a range of vlaues to the parameter collection. This method can not be used with stored procedures for providers that require named parameters. However, it is of great convenience for other cases. Gets the underlying standard ADO.NET for the specified parameter name. Gets the underlying standard ADO.NET for the specified index. Returns the underlying standard ADO.NET parameters collection. Initializes a new instance of the class. Assists in creating a collection of parameters by keeping track of all IDbParameters its creates. After creating a number of parameters ask for the collection with the GetParameters methods. This builder is stateful, you must create a new one for each collection of parameters you would like to create. Mark Pollack (.NET) A builder to create a collection of ADO.NET parameters. The chaining of IDbParameter methods does the building of the parameter details while the builder class itself keeps track of the collection. Mark Pollack (.NET) Creates a IDbParameter object and adds it to an internal collection for later retrieval via the GetParameters method. Gets all the parameters created and configured via the Create method. An instance of IDbParameters The shared log instance for this class (and derived classes). Initializes a new instance of the class. Implemenation of of DbProvider that uses metadata to create provider specific ADO.NET objects. Factory interface to create provider specific ADO.NET objects. Returns a new command object for executing SQL statments/Stored Procedures against the database. An new Returns a new instance of the providers CommandBuilder class. In .NET 1.1 there was no common base class or interface for command builders, hence the return signature is object to be portable (but more loosely typed) across .NET 1.1/2.0 A new Command Builder Returns a new connection object to communicate with the database. A new Returns a new adapter objects for use with offline DataSets. A new Returns a new parameter object for binding values to parameter placeholders in SQL statements or Stored Procedure variables. A new Creates the name of the parameter in the format appropriate to use inside IDbCommand.CommandText. In most cases this adds the parameter prefix to the name passed into this method. The unformatted name of the parameter. The parameter name formatted foran IDbCommand.CommandText. Creates the name ofthe parameter in the format appropriate for an IDataParameter, i.e. to be part of a IDataParameterCollection. The unformatted name of the parameter. The parameter name formatted for an IDataParameter Extracts the provider specific error code as a string. The data access exception. The provider specific error code Determines whether the provided exception is in fact related to database access. This can be provider dependent in .NET 1.1 since there isn't a common base class for ADO.NET exceptions. The exception thrown when performing data access operations. true if is a valid data access exception for the specified exception; otherwise, false. Return metadata information about the database provider Connection string used to create connections. Initializes a new instance of the class. The db metadata. Returns a new command object for executing SQL statments/Stored Procedures against the database. An new Returns a new instance of the providers CommandBuilder class. A new Command Builder In .NET 1.1 there was no common base class or interface for command builders, hence the return signature is object to be portable (but more loosely typed) across .NET 1.1/2.0 Returns a new connection object to communicate with the database. A new Returns a new adapter objects for use with offline DataSets. A new Returns a new parameter object for binding values to parameter placeholders in SQL statements or Stored Procedure variables. A new Creates the name of the parameter in the format appropriate to use inside IDbCommand.CommandText. The unformatted name of the parameter. The parameter name formatted foran IDbCommand.CommandText. In most cases this adds the parameter prefix to the name passed into this method. Creates the name ofthe parameter in the format appropriate for an IDataParameter, i.e. to be part of a IDataParameterCollection. The unformatted name of the parameter. The parameter name formatted for an IDataParameter Extracts the provider specific error code as a string. The data access exception. The provider specific error code Determines whether the provided exception is in fact related to database access. This can be provider dependent in .NET 1.1 since there isn't a common base class for ADO.NET exceptions. The exception thrown when performing data access operations. true if is a valid data access exception for the specified exception; otherwise, false. Return metadata information about the database provider Connection string used to create connections. Mark Pollack Initializes a new instance of the class. Modify the application context's internal object factory after its standard initialization. The object factory used by the application context.

All object definitions will have been loaded, but no objects will have been instantiated yet. This allows for overriding or adding properties even to eager-initializing objects.

In case of errors.
Gets or sets the provider resource which contains additional IDbProvider definitions. The provider resource. Create DbProviders based on configuration information in assembly resource dbproviders.xml TODO: Provide over-ride resource location. TODO: Add error codes to provider. Mark Pollack (.NET) The shared log instance for this class (and derived classes). Initializes a new instance of the class. Gets the DbProvider given an identifying name. Familiar names for the .NET 2.0 provider model are supported, i.e. System.Data.SqlClient. Refer to the documentation for a complete listing of supported DbProviders and their names. You may also use the method GetDbProviderClasses or obtain the underlying IApplicationContext to progammatically obtain information about supported providers. Name of the provider invariant. Gets the application context that contains the definitions of the various providers. This method should rarely, if ever, be used in application code. It is used by the framework itself to map other data access products abstractions for a 'DbProvider/DataSource' onto Spring's model. The application context. A implementation that creates instances of the class. Typically used as a convenience for retrieving shared in a Spring XML configuration file as compared to using explict factory method support. Creates a new instance of the class. Return an instance of and IDbProvider as configured by this factory managed by this factory. The same (singleton) instance of the IDbProvider managed by this factory. If this method is being called in the context of an enclosing IoC container and returns , the IoC container will consider this factory object as not being fully initialized and throw a corresponding (and most probably fatal) exception. Create the actual provider instance as specified by this factory's configuration properties. the fully configured provider Validates that the provider name is specified. Invoked by an after it has injected all of an object's dependencies. In the event of not setting the ProviderName. Validates the properties. Gets or sets the name of the database provider. The name of the database provider. Gets or sets the connection string. The connection string. Return the type of Returns true, as the the object managed by this factory is a singleton. IDbProvider implementation that delegates all calls to a given target IDbProvider Mark Pollack Initializes a new instance of the class. Initializes a new instance of the class. The target db provider. Returns a new command object for executing SQL statments/Stored Procedures against the database. An new Returns a new instance of the providers CommandBuilder class. In .NET 1.1 there was no common base class or interface for command builders, hence the return signature is object to be portable (but more loosely typed) across .NET 1.1/2.0 A new Command Builder Returns a new connection object to communicate with the database. A new Returns a new adapter objects for use with offline DataSets. A new Returns a new parameter object for binding values to parameter placeholders in SQL statements or Stored Procedure variables. A new Creates the name of the parameter in the format appropriate to use inside IDbCommand.CommandText. In most cases this adds the parameter prefix to the name passed into this method. The unformatted name of the parameter. The parameter name formatted foran IDbCommand.CommandText. Creates the name ofthe parameter in the format appropriate for an IDataParameter, i.e. to be part of a IDataParameterCollection. The unformatted name of the parameter. The parameter name formatted for an IDataParameter Extracts the provider specific error code as a string. The data access exception. The provider specific error code Determines whether the provided exception is in fact related to database access. This can be provider dependent in .NET 1.1 since there isn't a common base class for ADO.NET exceptions. The exception thrown when performing data access operations. true if is a valid data access exception for the specified exception; otherwise, false. Invoked by an after it has injected all of an object's dependencies.

This method allows the object instance to perform the kind of initialization only possible when all of it's dependencies have been injected (set), and to throw an appropriate exception in the event of misconfiguration.

Please do consult the class level documentation for the interface for a description of exactly when this method is invoked. In particular, it is worth noting that the and callbacks will have been invoked prior to this method being called.

In the event of misconfiguration (such as the failure to set a required property) or if initialization fails.
Gets or sets the target IDbProvider that this IDbProvider should delegate to The target db provider. Return metadata information about the database provider Connection string used to create connections. Holds ADO.NET error codes for a particular provider. Used by ErrorCodeExceptionTranslator. The embedded resource "dbProviders.xml" in Spring.Data.Common contains default ErrorCodes instances for various providers. Mark Pollack (.NET) The shared log instance for this class (and derived classes). Initializes a new instance of the class. A wrapper implementation for IDbProvider such that multiple DbProvider instances can be selected at runtime, say based on web request criteria. The name of which DbProvider to use, as provided to the IDictionary property TargetDbProviders is "dbProviderName". Once the target dbprovider name is known, set the name via a call to LogicalThreadContext.SetData(MultiDelegatingDbProvider.CURRENT_DBPROVIDER_SLOTNAME, "database1ProviderName"). The value "database1ProviderName" must match a key in the provided TargetDbProviders dictionary. Mark Pollack Initializes a new instance of the class. Initializes a new instance of the class. The target db providers. Ensures that the there are values in the TargetDbProviders dictionary and that the key is of the type string and value is of the type IDbProvider. If the above conditions are not met. Returns a new command object for executing SQL statments/Stored Procedures against the database. An new Returns a new connection object to communicate with the database. A new Returns a new parameter object for binding values to parameter placeholders in SQL statements or Stored Procedure variables. A new Returns a new adapter objects for use with offline DataSets. A new Returns a new instance of the providers CommandBuilder class. A new Command Builder In .NET 1.1 there was no common base class or interface for command builders, hence the return signature is object to be portable (but more loosely typed) across .NET 1.1/2.0 Creates the name of the parameter in the format appropriate to use inside IDbCommand.CommandText. The unformatted name of the parameter. The parameter name formatted foran IDbCommand.CommandText. In most cases this adds the parameter prefix to the name passed into this method. Creates the name ofthe parameter in the format appropriate for an IDataParameter, i.e. to be part of a IDataParameterCollection. The unformatted name of the parameter. The parameter name formatted for an IDataParameter Extracts the provider specific error code as a string. The data access exception. The provider specific error code Determines whether the provided exception is in fact related to database access. This can be provider dependent in .NET 1.1 since there isn't a common base class for ADO.NET exceptions. The exception thrown when performing data access operations. true if is a valid data access exception for the specified exception; otherwise, false. Determines whether is data access exception in .NET 1.1 for the specified exception. The candidate exception. true if is data access exception in .NET 1.1 for the specified exception; otherwise, false. Gets the target provider based on the thread local name "dbProviderName" The corresonding IDbProvider. Sets the default IDbProvider. This will be returned if no DbProvider is found in thread local storage. The default db provider. Sets the target db providers. The target db providers. Return metadata information about the database provider Connection string used to create connections. Convenience method to sets the name of the DbProvider that will be used for the the current thread's procesing. The name of the DbProvider to use for the current threads processing. An adapter for a target IDbProvider, applying the specified user credentials to the connection string for every GetConnection call. Sets the user credentials for current thread. The given username and password strings will be added to the connection string for all subsequent GetConnection requests. This will override any statically specified user credentials, that is, set by the properties Username nad Password. The username part of the connection string. The password part of the connection string. Removes the user credentials from current thread. Use statically specified credentials afterwards. Returns a new connection object to communicate with the database. Determine if there are currently thread-bound credentials, using them if available, falling back to the statically specified username and password (i.e. values of the properties 'Username' and 'Password') otherwise. The username and password will be concatenated on the connection string using string in the Separator property A new Sets the username string that will be appended to the connection string. The username. Sets the password string that will be appended to the connection string. The password. Sets the separator used to separate elements of the connection string. Default is ';'. The separator used to separate elements in the connection string. Implementation of the custom configuration parser for database definitions. Mark Pollack Initializes a new instance of the class. Parse the specified element and register any resulting IObjectDefinitions with the IObjectDefinitionRegistry that is embedded in the supplied ParserContext. The element to be parsed into one or more IObjectDefinitions The object encapsulating the current state of the parsing process. The primary IObjectDefinition (can be null as explained above) Implementations should return the primary IObjectDefinition that results from the parse phase if they wish to used nested inside (for example) a <property> tag. Implementations may return null if they will not be used in a nested scenario. Parses database provider definitions. Validator XML element. The name of the object definition. The parser context. A database provider object definition. Gets the name of the object type for the specified element. The element. The name of the object type. Base class for AdoTemplate and other ADO.NET DAO helper classes defining common properties like DbProvider. Mark Pollack (.NET) Juergen Hoeller Prepare the command setting the transaction timeout. Dispose the command, if any Dispose the command, if any Extract the command text from the given , if any. Obtain a connection/transaction pair Invoked by an after it has injected all of an object's dependencies.

This method allows the object instance to perform the kind of initialization only possible when all of it's dependencies have been injected (set), and to throw an appropriate exception in the event of misconfiguration.

Please do consult the class level documentation for the interface for a description of exactly when this method is invoked. In particular, it is worth noting that the and callbacks will have been invoked prior to this method being called.

In the event of misconfiguration (such as the failure to set a required property) or if initialization fails.
Creates the data reader wrapper for use in AdoTemplate callback methods. The reader to wrap. The data reader used in AdoTemplate callbacks Creates the a db parameters collection, adding to the collection a parameter created from the method parameters. The name of the parameter The type of the parameter. The size of the parameter, for use in defining lengths of string values. Use 0 if not applicable. The parameter value. A collection of db parameters with a single parameter in the collection based on the method parameters Creates a new instance of a new instance of Derives the parameters of a stored procedure, not including the return parameter. Name of the procedure. The stored procedure parameters. Derives the parameters of a stored procedure including the return parameter Name of the procedure. if set to true to include return parameter. The stored procedure parameters An instance of a DbProvider implementation. Gets or sets a value indicating whether to lazily initialize the IAdoExceptionTranslator for this accessor, on first encounter of a exception from the data provider. Default is "true"; can be switched to "false" for initialization on startup. true if to lazy initialize the IAdoExceptionTranslator; otherwise, false. Gets or sets the exception translator. If no custom translator is provided, a default is used. The exception translator. Gets or set the System.Type to use to create an instance of IDataReaderWrapper for the purpose of having defaults values to use in case of DBNull values read from IDataReader. The type of the data reader wrapper. Gets or sets the command timeout for IDbCommands that this AdoTemplate executes. Default is 0, indicating to use the database provider's default. Any timeout specified here will be overridden by the remaining transaction timeout when executing within a transaction that has a timeout specified at the transaction level. The command timeout. Convenient super class for ADO.NET data access objects. Requires a IDBProvider to be set, providing a AdoTemplate based on it to subclasses. This base class is mainly intended for AdoTemplate usage. Create a AdoTemplate for a given DbProvider Only invoked if populating the DAO with a DbProvider reference. Can be overriden in subclasses to provide AdoTemplate instances with a different configuration, or a cusotm AdoTemplate subclass. The DbProvider to create a AdoTemplate for Convenience method to create a parameters builder. Virtual for sublcasses to override with custom implementation. A new DbParameterBuilder The DbProvider instance used by this DAO Set the AdoTemplate for this DAO explicity, as an alternative to specifying a IDbProvider ADO.NET based implementation of the interface. Mark Pollack (.NET) Abstract base class that allows for easy implementation of concrete platform transaction managers.

Provides the following workflow handling:

  • Determines if there is an existing transaction
  • Applies the appropriate propagation behavior
  • Suspends and resumes transactions if necessary
  • Checks the rollback-only flag on commit
  • Applies the appropriate modification on rollback (actual rollback or setting rollback-only)
  • Triggers registered synchronization callbacks (if transaction synchronization is active)

Transaction synchronization is a generic mechanism for registering callbacks that get invoked at transaction completion time. The same mechanism can also be used for custom synchronization efforts.

The state of this class is serializable. It's up to subclasses if they wish to make their state to be serializable. They should implement if they need to restore any transient state.

Juergen Hoeller Mark Pollack (.NET) Griffin Caprio (.NET)
This is the central interface in Spring.NET's transaction support.

Applications can use this directly, but it is not primarily meant as an API. Typically, applications will work with either or the AOP transaction interceptor.

For implementers, is a good starting point.

Rod Johnson Juergen Hoeller Griffin Caprio (.NET)
Return a currently active transaction or create a new one.

Note that parameters like isolation level or timeout will only be applied to new transactions, and thus be ignored when participating in active ones. Furthermore, they aren't supported by every transaction manager: a proper implementation should throw an exception when custom values that it doesn't support are specified.

instance (can be null for defaults), describing propagation behavior, isolation level, timeout etc. In case of lookup, creation, or system errors. A representing the new or current transaction.
Commit the given transaction, with regard to its status.

If the transaction has been marked rollback-only programmatically, perform a rollback.

If the transaction wasn't a new one, omit the commit to take part in the surrounding transaction properly.

The instance returned by the () method. In case of commit or system errors
Roll back the given transaction, with regard to its status.

If the transaction wasn't a new one, just set it rollback-only to take part in the surrounding transaction properly.

The instance returned by the () method. In case of system errors.
Return the current transaction object. The current transaction object. If transaction support is not available. In the case of lookup or system errors. Check if the given transaction object indicates an existing transaction (that is, a transaction which has already started). The result will be evaluated according to the specified propagation behavior for the new transaction. An existing transaction might get suspended (in case of PROPAGATION_REQUIRES_NEW), or the new transaction might participate in the existing one (in case of PROPAGATION_REQUIRED). Default implementation returns false, assuming that detection of or participating in existing transactions is generally not supported. Subclasses are of course encouraged to provide such support. Transaction object returned by . True if there is an existing transaction. In the case of system errors. Begin a new transaction with the given transaction definition. Does not have to care about applying the propagation behavior, as this has already been handled by this abstract manager. Transaction object returned by . instance, describing propagation behavior, isolation level, timeout etc. In the case of creation or system errors. Suspend the resources of the current transaction. Transaction synchronization will already have been suspended. Default implementation throws a TransactionSuspensionNotSupportedException, assuming that transaction suspension is generally not supported. Transaction object returned by . An object that holds suspended resources (will be kept unexamined for passing it into .) If suspending is not supported by the transaction manager implementation. in case of system errors. Resume the resources of the current transaction. Transaction synchronization will be resumed afterwards. Default implementation throws a TransactionSuspensionNotSupportedException, assuming that transaction suspension is generally not supported. Transaction object returned by . The object that holds suspended resources as returned by . If suspending is not supported by the transaction manager implementation. In the case of system errors. Perform an actual commit on the given transaction. The status representation of the transaction.

An implementation does not need to check the rollback-only flag.

In the case of system errors.
Perform an actual rollback on the given transaction. The status representation of the transaction. An implementation does not need to check the new transaction flag. In the case of system errors. Set the given transaction rollback-only. Only called on rollback if the current transaction takes part in an existing one. Default implementation throws an IllegalTransactionStateException, assuming that participating in existing transactions is generally not supported. Subclasses are of course encouraged to provide such support. The status representation of the transaction. In the case of system errors. Return whether to use a savepoint for a nested transaction. Default is true, which causes delegation to for holding a savepoint.

Subclasses can override this to return false, causing a further invocation of despite an already existing transaction.

Register the given list of transaction synchronizations with the existing transaction. Invoked when the control of the Spring transaction manager and thus all Spring transaction synchronizations end, without the transaction being completed yet. This is for example the case when participating in an existing System.Transactions or EnterpriseServices transaction invoked via their APIs. The default implementation simply invokes the AfterCompletion methods immediately, passing in TransactionSynchronizationStatus.Unknown. This is the best we can do if there's no chance to determine the actual outcome of the outer transaction. The transaction transaction object returned by DoGetTransaction. The lList of TransactionSynchronization objects. In case of errors Cleanup resources after transaction completion. Transaction object returned by . Called after and execution on any outcome. Should not throw any exceptions but just issue warnings on errors. Default implementation does nothing. Return a currently active transaction or create a new one.

This implementation handles propagation behavior.

Delegates to , , and .

Note that parameters like isolation level or timeout will only be applied to new transactions, and thus be ignored when participating in active ones. Furthermore, they aren't supported by every transaction manager: a proper implementation should throw an exception when custom values that it doesn't support are specified.

instance (can be null for defaults), describing propagation behavior, isolation level, timeout etc. In case of lookup, creation, or system errors. representing the new or current transaction.
This implementation of commit handles participating in existing transactions and programmatic rollback requests. ITransactionStatus object returned by the () method. In case of commit or system errors. Roll back the given transaction, with regard to its status.

This implementation handles participating in existing transactions.

Delegates to , and .

If the transaction wasn't a new one, just set it rollback-only to take part in the surrounding transaction properly.

ITransactionStatusObject returned by the () method. In case of system errors.
Determines the timeout to use for the given definition. Will fall back to this manager's default timeout if the transaction definition doesn't specify a non-default value. The transaction definition. the actual timeout to use. Suspend the given transaction. Suspends transaction synchronization first, then delegates to the doSuspend template method. the current transaction object an object that holds suspended resources Resume the given transaction. Delegates to the doResume template method first, then resuming transaction synchronization. the current transaction object the object that holds suspended resources, as returned by suspend Invoke doRollback, handling rollback exceptions properly. object representing the transaction the thrown application exception or error in case of a rollback error Trigger beforeCommit callback. object representing the transaction Trigger beforeCompletion callback. object representing the transaction Trigger afterCompletion callback, handling exceptions properly. object representing the transaction Completion status according to Clean up after completion, clearing synchronization if necessary, and invoking doCleanupAfterCompletion. object representing the transaction Sets and gets when this transaction manager should activate the thread-bound transaction synchronization support. Default is "always".

Note that transaction synchronization isn't supported for multiple concurrent transactions by different transaction managers. Only one transaction manager is allowed to activate it at any time.

Sets and gets whether nested transactions are allowed. Default is false.

Typically initialized with an appropriate default by the concrete transaction manager subclass.

Sets and gets a flag that determines whether or not the method must be invoked if a call to the method fails. Default is false. Typically not necessary and thus to be avoided as it can override the commit exception with a subsequent rollback exception. Gets or sets a value indicating whether to fail early in case of the transaction being globally marked as rollback-only. Default is "false", only causing an UnexpectedRollbackException at the outermost transaction boundary. Switch this flag on to cause an UnexpectedRollbackException as early as the global rollback-only marker has been first detected, even from within an inner transaction boundary. true if fail early on global rollback; otherwise, false. Gets or sets the default timeout that this transaction manager should apply if there is no timeout specified at the transaction level, in seconds. Returns DefaultTransactionDefinition.TIMEOUT_DEFAULT to indicate the underlying transaction infrastructure's default timeout. The default timeout. Extension of the interface, indicating a native resource transaction manager, operating on a single target resource. Such transaction managers differ from DTC based transaction managers in that they do not use transaction enlistment for an open number of resources but rather focus on leveraging the native power and simplicity of a single target resource. This interface is mainly used for abstract introspection of a transaction manager, giving clients a hint on what kind of transaction manager they have been given and on what concrete resource the transaction manager is operating on. Juergen Hoeller Mark Pollack Gets the resource factory that this transaction manager operates on, e.g. a IDbProvider or a Hibernate ISessionFactory. The resource factory. Return the current transaction object. The current transaction object. If transaction support is not available. In the case of lookup or system errors. Check if the given transaction object indicates an existing, i.e. already begun, transaction. Transaction object returned by . True if there is an existing transaction. In the case of system errors. Begin a new transaction with the given transaction definition. Transaction object returned by . instance, describing propagation behavior, isolation level, timeout etc. Does not have to care about applying the propagation behavior, as this has already been handled by this abstract manager. In the case of creation or system errors. Suspend the resources of the current transaction. Transaction object returned by . An object that holds suspended resources (will be kept unexamined for passing it into .) Transaction synchronization will already have been suspended. If suspending is not supported by the transaction manager implementation. in case of system errors. Resume the resources of the current transaction. Transaction object returned by . The object that holds suspended resources as returned by . Transaction synchronization will be resumed afterwards. If suspending is not supported by the transaction manager implementation. In the case of system errors. Perform an actual commit on the given transaction. The status representation of the transaction.

An implementation does not need to check the rollback-only flag.

In the case of system errors.
Perform an actual rollback on the given transaction. The status representation of the transaction. An implementation does not need to check the new transaction flag. In the case of system errors. Set the given transaction rollback-only. Only called on rollback if the current transaction takes part in an existing one. The status representation of the transaction. In the case of system errors. Invoked by an after it has injected all of an object's dependencies. If DbProvider is null. Gets the resource factory that this transaction manager operates on, For the AdoPlatformTransactionManager this is the DbProvider The DbProvider. DbProvider transaction (state) object, representing a ConnectionHolder. Used as a transaction object by AdoPlatformTransactionManager Derives from AdoTransactionObjectSupport to inherit the capability to manage Savepoints. Convenient base class for ADO.NET transaction aware objects. Can contain a ConnectionHolder object. Mark Pollack (.NET) Interface that specifies means to programmatically manage transaction savepoints in a generic fashion.

Note that savepoints can only work within an active transaction. Just use this programmatic savepoint handling for advanced needs; else, a subtransaction with a value of is preferable.

Juergen Hoeller Griffin Caprio (.NET)
Create a new savepoint. The name of the savepoint to create. You can roll back to a specific savepoint via , and explicitly release a savepoint that you don't need anymore via .

Note that most transaction managers will automatically release savepoints at transaction completion.

If the savepoint could not be created, either because the backend does not support it or because the transaction is not in an appropriate state. A savepoint object, to be passed into or .
Roll back to the given savepoint. The savepoint will be automatically released afterwards. The savepoint to roll back to. If the rollback failed. Explicitly release the given savepoint.

Note that most transaction managers will automatically release savepoints at transaction completion.

Implementations should fail as silently as possible if proper resource cleanup will still happen at transaction completion.

The savepoint to release. If the release failed.
Interface to be implemented by transaction objects that are able to return an internal rollback-only marker, typically from a another transaction that has participated and marked it as rollback-only.

Autodetected by , to always return a current rollbackOnly flag even if not resulting from the current .

Juergen Hoeller Griffin Caprio (.NET)
Return whether the transaction is internally marked as rollback-only. True of the transaction is marked as rollback-only. The shared log instance for this class (and derived classes). Create a new savepoint. The name of the savepoint to create. You can roll back to a specific savepoint via , and explicitly release a savepoint that you don't need anymore via .

Note that most transaction managers will automatically release savepoints at transaction completion.

If the savepoint could not be created, either because the backend does not support it or because the transaction is not in an appropriate state. A savepoint object, to be passed into or .
Roll back to the given savepoint. The savepoint will be automatically released afterwards. The savepoint to roll back to. If the rollback failed. Explicitly release the given savepoint.

Note that most transaction managers will automatically release savepoints at transaction completion.

Implementations should fail as silently as possible if proper resource cleanup will still happen at transaction completion.

The savepoint to release. If the release failed.
Return whether the transaction is internally marked as rollback-only. True of the transaction is marked as rollback-only. Sets the rollback only. Return whether the transaction is internally marked as rollback-only. True of the transaction is marked as rollback-only. This is the central class in the Spring.Data namespace. It simplifies the use of ADO.NET and helps to avoid commons errors. Mark Pollack (.NET) Interface that defines ADO.NET related database operations. Mark Pollack (.NET) Execute the query with the specified command text returning a scalar result No parameters are used. As with IDbCommand.ExecuteScalar, it returns the first column of the first row in the resultset returned by the query. Extra columns or row are ignored. The command type The command text to execute. The first column of the first row in the result set. Execute the query with the specified command text and parameter returning a scalar result The command type The command text to execute. The name of the parameter to map. One of the database parameter type enumerations. The length of the parameter. 0 if not applicable to parameter type. The parameter value. The first column of the first row in the result set Execute the query with the specified command text and parameters returning a scalar result The command type The command text to execute. The parameter collection to map. The first column of the first row in the result set Execute the query with the specified command text and parameters set via the command setter, returning a scalar result The command type The command text to execute. The command setter. The first column of the first row in the result set Execute the query with a command created via IDbCommandCreator and parameters Output parameters can be retrieved via the returned dictionary. More commonly used as a lower level support method within the framework, for example StoredProcedure/AdoScalar. The callback to create a IDbCommand. A dictionary containing output parameters, if any Executes a non query returning the number of rows affected. The command type. The command text to execute. The number of rows affected. Executes a non query returning the number of rows affected. The command type. The command text to execute. The name of the parameter to map. One of the database parameter type enumerations. The length of the parameter. 0 if not applicable to parameter type. The parameter value. The number of rows affected. Executes a non query returning the number of rows affected. The command type. The command text to execute. The parameter collection to map. The number of rows affected. Executes a non query with parameters set via the command setter, returning the number of rows affected. The command type. The command text to execute. The command setter. The number of rows affected. Executes a non query with a command created via IDbCommandCreator and parameters. Output parameters can be retrieved via the returned dictionary. More commonly used as a lower level support method within the framework, for example StoredProcedure/AdoScalar. The callback to create a IDbCommand. The number of rows affected. Execute a query given IDbCommand's type and text, reading a single result set on a per-row basis with a . The type of command. The text of the query. callback that will extract results one row at a time. Execute a query given IDbCommand's type and text and provided parameter information, reading a single result set on a per-row basis with a . The type of command The text of the query. callback that will extract results one row at a time. The name of the parameter to map. One of the database parameter type enumerations. The length of the parameter. 0 if not applicable to parameter type. The parameter value. Execute a query given IDbCommand's type and text and provided IDbParameters, reading a single result set on a per-row basis with a . Type of the command. The text of the query. callback that will extract results one row at a time. The parameter collection to map. Execute a query given IDbCommand's type and text by passing the created IDbCommand to a ICommandSetter implementation that knows how to bind values to the IDbCommand, reading a single result set on a per-row basis with a . The type of command The text of the query. callback that will extract results one row at a time. The command setter. Execute a ADO.NET operation on a command object using a delegate callback. This allows for implementing arbitrary data access operations on a single command within Spring's managed ADO.NET environment. The delegate called with a command object. A result object returned by the action or null Execute a ADO.NET operation on a command object using an interface based callback. the callback to execute object returned from callback Executes ADO.NET operations on a command object, created by the provided IDbCommandCreator, using the interface based callback IDbCommandCallback. The command creator. The callback to execute based on IDbCommand A result object returned by the action or null Execute ADO.NET operations on a IDbDataAdapter object using an interface based callback. This allows for implementing abritrary data access operations on a single DataAdapter within Spring's managed ADO.NET environment. The data adapter callback. A result object returned by the callback or null Execute a query given IDbCommand's type and text, processing a single result set with an instance of IResultSetExtractor The type of command The text of the query. Object that will extract all rows of a result set An arbitrary result object, as returned by the IResultSetExtractor If there is any problem executing the query. Execute a query given the CommandType and text with parameters set via the command setter, processing a single result set with an instance of IResultSetExtractor The command type. The command text to execute. The result set extractor. The command setter. An arbitrary result object, as returned by the IResultSetExtractor If there is any problem executing the query. Execute a query given the CommandType and text specifying a single parameter and process a single result set with an instance of IResultSetExtractor. Convention is to use 0 For the size if it does not make sense for the given data type The command type. The command text to execute. The result set extractor. The name of the parameters The enumeration of the parameter type The size of the parmeter - e.g. string length. Use 0 if not relevant for specific data type The value of the parameters An arbitrary result object, as returned by the IResultSetExtractor If there is any problem executing the query. Execute a query given the CommandType and text specifying a collection of parameters and process a single result set with an instance of IResultSetExtractor. The command type. The command text to execute. The result set extractor. The query parameters An arbitrary result object, as returned by the IResultSetExtractor If there is any problem executing the query. Execute a query given static SQL/Stored Procedure name and process a single result set with an instance of ResultSetExtractorDelegate The type of command. The command text. Delegate that will process all rows of a result set An arbitrary result object, as returned by the IResultSetExtractor If there is any problem executing the query. Execute a query given the CommandType and text with parameters set via the command setter, processing a single result set with an instance of IResultSetExtractor The command type. The command text to execute. Delegate that will process all rows of a result set The command setter. An arbitrary result object, as returned by the IResultSetExtractor If there is any problem executing the query. Execute a query given the CommandType and text specifying a single parameter and process a single result set with an instance of IResultSetExtractor. Convention is to use 0 For the size if it does not make sense for the given data type The command type. The command text to execute. Delegate that will process all rows of a result set The name of the parameters The enumeration of the parameter type The size of the parmeter - e.g. string length. Use 0 if not relevant for specific data type The value of the parameters An arbitrary result object, as returned by the IResultSetExtractor If there is any problem executing the query. Execute a query given the CommandType and text specifying a collection of parameters and process a single result set with an instance of IResultSetExtractor. The command type. The command text to execute. Delegate that will process all rows of a result set The query parameters An arbitrary result object, as returned by the IResultSetExtractor If there is any problem executing the query. Execute a query given static SQL, mapping each row to a .NET object via a RowMapper The type of command SQL query to execute delegate/lambda that will map one object per row The result list containing mapped objects Execute a query given static SQL, mapping each row to a .NET object via a RowMapper The type of command SQL query to execute object that will map one object per row the result list containing mapped objects Execute a query with the specified command text, mapping a single result row to an object via a RowMapper. The command type. The command text to execute. object that will map one object per row The single mapped object. If the query does not return exactly one row. If there is any problem executing the query. Execute a query with the specified command text and parameters set via the command setter, mapping a single result row to an object via a RowMapper. The command type. The command text to execute. object that will map one object per row The command setter. The single mapped object. If the query does not return exactly one row. If there is any problem executing the query. Execute a query with the specified command text and parameters, mapping a single result row to an object via a RowMapper. The command type. The command text to execute. object that will map one object per row The parameter collection to use in the query. The single mapped object. If the query does not return exactly one row. If there is any problem executing the query. Execute a query with the specified command text and parameter, mapping a single result row to an object via a RowMapper. The command type. The command text to execute. object that will map one object per row The name of the parameter to map. One of the database parameter type enumerations. The length of the parameter. 0 if not applicable to parameter type. The parameter value. The single mapped object. If the query does not return exactly one row. If there is any problem executing the query. Execute a query with the specified command text, mapping a single result row to an object via a RowMapper. The command type. The command text to execute. delegate that will map one object per row The single mapped object. If the query does not return exactly one row. If there is any problem executing the query. Execute a query with the specified command text and parameters set via the command setter, mapping a single result row to an object via a RowMapper. The command type. The command text to execute. delegate that will map one object per row The command setter. The single mapped object. If the query does not return exactly one row. If there is any problem executing the query. Execute a query with the specified command text and parameters, mapping a single result row to an object via a RowMapper. The command type. The command text to execute. delegate that will map one object per row The parameter collection to use in the query. The single mapped object. If the query does not return exactly one row. If there is any problem executing the query. Execute a query with the specified command text and parameter, mapping a single result row to an object via a RowMapper. The command type. The command text to execute. delegate that will map one object per row The name of the parameter to map. One of the database parameter type enumerations. The length of the parameter. 0 if not applicable to parameter type. The parameter value. Fill a based on a select command that requires no parameters. The to populate The type of command SQL query to execute The number of rows successfully added to or refreshed in the Fill a based on a select command that requires no parameters. The to populate The type of command SQL query to execute The number of rows successfully added to or refreshed in the Fill a based on a select command that requires no parameters that returns one or more result sets that are added as s to the The to populate The type of command SQL query to execute The mapping of table names for each created Note that output parameters are marked input/output after derivation.... (TODO - double check....) An instance of a DbProvider implementation. Gets or set the System.Type to use to create an instance of IDataReaderWrapper for the purpose of having defaults values to use in case of DBNull values read from IDataReader. The type of the data reader wrapper. Gets or sets the command timeout for IDbCommands that this AdoTemplate executes. Default is 0, indicating to use the database provider's default. Any timeout specified here will be overridden by the remaining transaction timeout when executing within a transaction that has a timeout specified at the transaction level. The command timeout. Initializes a new instance of the class. Initializes a new instance of the class. The database provider. Initializes a new instance of the class. The database provider. if set to false lazily initialize the ErrorCodeExceptionTranslator. Execute a ADO.NET operation on a command object using a delegate callback. The delegate called with a command object. A result object returned by the action or null This allows for implementing arbitrary data access operations on a single command within Spring's managed ADO.NET environment. Callback to execute a IDbCommand. the callback to execute object returned from callback Executes ADO.NET operations on a command object, created by the provided IDbCommandCreator, using the interface based callback IDbCommandCallback. The command creator. The callback to execute based on IDbCommand A result object returned by the action or null Execute ADO.NET operations on a IDbDataAdapter object using an interface based callback. This allows for implementing abritrary data access operations on a single DataAdapter within Spring's managed ADO.NET environment. The data adapter callback. A result object returned by the callback or null Executes a non query returning the number of rows affected. The command type. The command text to execute. The number of rows affected. Executes a non query returning the number of rows affected. The command type. The command text to execute. The name of the parameter to map. One of the database parameter type enumerations. The length of the parameter. 0 if not applicable to parameter type. The parameter value. The number of rows affected. Executes a non query returning the number of rows affected. The command type. The command text to execute. The parameter collection to map. The number of rows affected. Executes a non query with parameters set via the command setter, returning the number of rows affected. The command type. The command text to execute. The command setter. The number of rows affected. Executes a non query with a command created via IDbCommandCreator and parameters. Output parameters can be retrieved via the returned dictionary. More commonly used as a lower level support method within the framework, for example StoredProcedure/AdoScalar. The callback to create a IDbCommand. The number of rows affected. Execute the query with the specified command text. No parameters are used. As with IDbCommand.ExecuteScalar, it returns the first column of the first row in the resultset returned by the query. Extra columns or row are ignored. The command type The command text to execute. The first column of the first row in the result set Execute the query with the specified command text and parameter returning a scalar result The command type The command text to execute. The name of the parameter to map. One of the database parameter type enumerations. The length of the parameter. 0 if not applicable to parameter type. The parameter value. The first column of the first row in the result set Execute the query with the specified command text and parameters returning a scalar result The command type The command text to execute. The parameter collection to map. The first column of the first row in the result set Execute the query with the specified command text and parameters set via the command setter, returning a scalar result The command type The command text to execute. The command setter. The first column of the first row in the result set Execute the query with a command created via IDbCommandCreator and parameters Output parameters can be retrieved via the returned dictionary. More commonly used as a lower level support method within the framework, for example for StoredProcedure/AdoScalar. The callback to create a IDbCommand. A dictionary containing output parameters, if any Execute a query given IDbCommand's type and text, reading a single result set on a per-row basis with a . The type of command The text of the query. callback that will extract results one row at a time. Execute a query given IDbCommand's type and text by passing the created IDbCommand to a ICommandSetter implementation that knows how to bind values to the IDbCommand, reading a single result set on a per-row basis with a . The type of command The text of the query. callback that will extract results one row at a time. The command setter. Execute a query given IDbCommand's type and text and provided parameter information, reading a single result set on a per-row basis with a . The type of command The text of the query. callback that will extract results one row at a time. The name of the parameter to map. One of the database parameter type enumerations. The length of the parameter. 0 if not applicable to parameter type. The parameter value. Execute a query given static SQL/Stored Procedure name and process a single result set with an instance of IResultSetExtractor The type of command. The SQL/Stored Procedure to execute Object that will extract all rows of a result set An arbitrary result object, as returned by the IResultSetExtractor Execute a query given static SQL/Stored Procedure name and process a single result set with an instance of IResultSetExtractor The type of command. The SQL/Stored Procedure to execute Delegate that will extract all rows of a result set An arbitrary result object, as returned by the IResultSetExtractor Execute a query with the specified command text, mapping a single result row to an object via a RowMapper. The command type. The command text to execute. object that will map one object per row The single mapped object. If the query does not return exactly one row. If there is any problem executing the query. Execute a query with the specified command text and parameters set via the command setter, mapping a single result row to an object via a RowMapper. The command type. The command text to execute. object that will map one object per row The command setter. The single mapped object. If the query does not return exactly one row. If there is any problem executing the query. Execute a query with the specified command text and parameters, mapping a single result row to an object via a RowMapper. The command type. The command text to execute. object that will map one object per row The parameter collection to use in the query. The single mapped object. If the query does not return exactly one row. If there is any problem executing the query. Execute a query with the specified command text and parameter, mapping a single result row to an object via a RowMapper. The command type. The command text to execute. object that will map one object per row The name of the parameter to map. One of the database parameter type enumerations. The length of the parameter. 0 if not applicable to parameter type. The parameter value. The single mapped object. If the query does not return exactly one row. If there is any problem executing the query. Execute a query with the specified command text, mapping a single result row to an object via a RowMapper. The command type. The command text to execute. delegate that will map one object per row The single mapped object. If the query does not return exactly one row. If there is any problem executing the query. Execute a query with the specified command text and parameters set via the command setter, mapping a single result row to an object via a RowMapper. The command type. The command text to execute. delegate that will map one object per row The command setter. The single mapped object. If the query does not return exactly one row. If there is any problem executing the query. Execute a query with the specified command text and parameters, mapping a single result row to an object via a RowMapper. The command type. The command text to execute. delegate that will map one object per row The parameter collection to use in the query. The single mapped object. If the query does not return exactly one row. If there is any problem executing the query. Execute a query with the specified command text and parameter, mapping a single result row to an object via a RowMapper. The command type. The command text to execute. delegate that will map one object per row The name of the parameter to map. One of the database parameter type enumerations. The length of the parameter. 0 if not applicable to parameter type. The parameter value. The single mapped object. If the query does not return exactly one row. If there is any problem executing the query. Fill a based on a select command that requires no parameters. The to populate The type of command SQL query to execute The number of rows successfully added to or refreshed in the Creates the data reader wrapper for use in AdoTemplate callback methods. The reader to wrap. The data reader used in AdoTemplate callbacks An instance of a DbProvider implementation. Gets or sets a value indicating whether to lazily initialize the IAdoExceptionTranslator for this accessor, on first encounter of a exception from the data provider. Default is "true"; can be switched to "false" for initialization on startup. true if to lazy initialize the IAdoExceptionTranslator; otherwise, false. Gets or sets the exception translator. If no custom translator is provided, a default is used. The exception translator. Gets or set the System.Type to use to create an instance of IDataReaderWrapper for the purpose of having defaults values to use in case of DBNull values read from IDataReader. The type of the data reader wrapper. Generic callback interface for code that operates on a IDbDataAdapter.

Allows you to execute any number of operations on a IDbDataAdapter, for example to Fill a DataSet or other more advanced operations such as the transfering data between two different DataSets.

Note that the passed in IDbDataAdapter has been created by the framework and its SelectCommand will be populated with values for CommandType and Text properties along with Connection/Transaction properties based on the calling transaction context.

Execute(IDataAdapterCallback dataAdapterCallback) method.
Mark Pollack (.NET)
Called by AdoTemplate.Execute with an preconfigured ADO.NET IDbDataAdapter instance with its SelectCommand property populated with CommandType and Text values along with Connection/Transaction properties based on the calling transaction context. An active IDbDataAdapter instance The result object Generic callback interface for code that operates on a IDbCommand.

Allows you to execute any number of operations on a single IDbCommand, for example a single ExecuteScalar call or repeated execute calls with varying parameters.

Used internally by AdoTemplate, but also useful for application code. Note that the passed in IDbCommand has been created by the framework.

Mark Pollack
Called by AdoTemplate.Execute with an active ADO.NET IDbCommand. The calling code does not need to care about closing the command or the connection, or about handling transactions: this will all be handled by Spring's AdoTemplate An active IDbCommand instance The result object Interface to be implemented by objects that can provide SQL strings Typically implemented by IDbCommandCreator and ICommandCallbacks that want to expose the CommandText they use to create their ADO.NET commands, to allow for better contextual information in case of exceptions Mark Pollack(.NET) Juergen Hoeller Adapter implementation of the ResultSetExtractor interface that delegates to a RowMapper which is supposed to create an object for each row. Each object is added to the results List of this ResultSetExtractor. Useful for the typical case of one object per row in the database table. The number of entries in the results list will match the number of rows.

Note that a RowMapper object is typically stateless and thus reusable; just the RowMapperResultSetExtractor adapter is stateful.

As an alternative consider subclassing MappingAdoQuery from the Spring.Data.Objects namespace: Instead of working with separate AdoTemplate and IRowMapper objects you can have executable query objects (containing row-mapping logic) there.

Mark Pollack (.NET)
Callback interface to process all result sets and rows in an AdoTemplate query method. Implementations of this interface perform the work of extracting results but don't need worry about managing ADO.NET resources, such as closing the reader or transaction management.

This interface is mainly used within the ADO.NET framework. An IResultSetExtractor is usually a simpler choice for result set (DataReader) processing, in particular a RowMapperResultSetExtractor in combination with a IRowMapper.

Note: in contracts to a IRowCallbackHandler, a ResultSetExtractor is usually stateless and thus reusable, as long as it doesn't access stateful resources or keep result state within the object.
Implementations must implement this method to process all result set and rows in the IDataReader. The IDataReader to extract data from. Implementations should not close this: it will be closed by the AdoTemplate. An arbitrary result object or null if none. The extractor will typically be stateful in the latter case. Initializes a new instance of the class. Transaction Manager that uses EnterpriseServices to access the MS-DTC. It requires the support of 'Services without Components' functionality which is available on Win 2003 and Win XP SP2. Mark Pollack (.NET) Initializes a new instance of the class. Initializes a new instance of the class. This is indented only for unit testing purposes and should not be called by production application code. The tx adapter. Gets or sets a value indicating whether tracking is enabled. true if tracking is enabled; otherwise, false. Gets or sets a text string that corresponds to the application ID under which tracker information is reported. The default value is 'Spring.NET' The name of the tracking app. Gets or sets a text string that corresponds to the context name under which tracker information is reported. The name of the tracking component. TransactionManager that uses TransactionScope provided by System.Transactions. Mark Pollack (.NET) Initializes a new instance of the class. Initializes a new instance of the class. This is indented only for unit testing purposes and should not be called by production application code. The tx adapter. No-op initialization The transaction resource object that encapsulates the state and functionality contained in TransactionScope and Transaction.Current via the ITransactionScopeAdapter property. Initializes a new instance of the class. Will create an instance of . Gets or sets the transaction scope adapter. The transaction scope adapter. Return whether the transaction is internally marked as rollback-only. True of the transaction is marked as rollback-only. Convenient super class for ADO.NET data access objects using generics. Requires a IDBProvider to be set, providing a AdoTemplate based on it to subclasses. This base class is mainly intended for AdoTemplate usage. Create a AdoTemplate for a given DbProvider Only invoked if populating the DAO with a DbProvider reference. Can be overriden in subclasses to provide AdoTemplate instances with a different configuration, or a cusotm AdoTemplate subclass. The DbProvider to create a AdoTemplate for Convenience method to create a parameters builder. Virtual for sublcasses to override with custom implementation. A new DbParameterBuilder The DbProvider instance used by this DAO Set the AdoTemplate for this DAO explicity, as an alternative to specifying a IDbProvider This is the central class in the Spring.Data.Generic namespace. It simplifies the use of ADO.NET and helps to avoid commons errors. Mark Pollack (.NET) Interface that defines ADO.NET related database operations using generics Mark Pollack (.NET) Execute a ADO.NET operation on a command object using a generic interface based callback. The type of object returned from the callback. the callback to execute based on DbCommand An object returned from callback Execute a ADO.NET operation on a command object using a generic interface based callback. The type of object returned from the callback. The callback to execute based on IDbCommand An object returned from callback Execute a ADO.NET operation on a command object using a generic delegate callback. The type of object returned from the callback. This allows for implementing arbitrary data access operations on a single command within Spring's managed ADO.NET environment. The delegate called with a DbCommand object. A result object returned by the action or null Execute a ADO.NET operation on a command object using a generic delegate callback. The type of object returned from the callback. This allows for implementing arbitrary data access operations on a single command within Spring's managed ADO.NET environment. The delegate called with a IDbCommand object. A result object returned by the action or null Executes ADO.NET operations on a command object, created by the provided IDbCommandCreator, using the interface based callback IDbCommandCallback. The type of object returned from the callback. The command creator. The callback to execute based on IDbCommand A result object returned by the action or null Execute ADO.NET operations on a IDbDataAdapter object using an interface based callback. This allows for implementing abritrary data access operations on a single DataAdapter within Spring's managed ADO.NET environment. The type of object returned from the callback. The data adapter callback. A result object returned by the callback or null Execute ADO.NET operations on a IDbDataAdapter object using an delgate based callback. This allows for implementing abritrary data access operations on a single DataAdapter within Spring's managed ADO.NET environment. The type of object returned from the callback. The delegate called with a IDbDataAdapter object. A result object returned by the callback or null Note that output parameters are marked input/output after derivation.... (TODO - double check....) An instance of a DbProvider implementation. Gets or set the System.Type to use to create an instance of IDataReaderWrapper for the purpose of having defaults values to use in case of DBNull values read from IDataReader. The type of the data reader wrapper. Gets or sets the command timeout for IDbCommands that this AdoTemplate executes. Default is 0, indicating to use the database provider's default. Any timeout specified here will be overridden by the remaining transaction timeout when executing within a transaction that has a timeout specified at the transaction level. The command timeout. Initializes a new instance of the class. Initializes a new instance of the class. The provider. Initializes a new instance of the class. The database provider. if set to false lazily initialize the ErrorCodeExceptionTranslator. Initializes a new instance of the class. Useful if you have a subclass of Spring.Data.Core.AdoTemplate. The classic ADO template. Execute a ADO.NET operation on a command object using a interface based callback. the callback to execute object returned from callback Execute a ADO.NET operation on a command object using a delegate callback. This allows for implementing arbitrary data access operations on a single command within Spring's managed ADO.NET environment. The delegate called with a command object. A result object returned by the action or null Execute a ADO.NET operation on a command object using a interface based callback. the callback to execute object returned from callback Execute a ADO.NET operation on a command object using a delegate callback. This allows for implementing arbitrary data access operations on a single command within Spring's managed ADO.NET environment. The delegate called with a command object. A result object returned by the action or null Executes ADO.NET operations on a command object, created by the provided IDbCommandCreator, using the interface based callback IDbCommandCallback. The type of object returned from the callback. The command creator. The callback to execute based on IDbCommand A result object returned by the action or null Execute ADO.NET operations on a IDbDataAdapter object using an interface based callback. The type of object returned from the callback. The data adapter callback. A result object returned by the callback or null This allows for implementing abritrary data access operations on a single DataAdapter within Spring's managed ADO.NET environment. Execute ADO.NET operations on a IDbDataAdapter object using an delgate based callback. This allows for implementing abritrary data access operations on a single DataAdapter within Spring's managed ADO.NET environment. The type of object returned from the callback. The delegate called with a IDbDataAdapter object. A result object returned by the callback or null Executes a non query returning the number of rows affected. The command type. The command text to execute. The number of rows affected. Executes a non query returning the number of rows affected. The command type. The command text to execute. The name of the parameter to map. One of the database parameter type enumerations. The length of the parameter. 0 if not applicable to parameter type. The parameter value. The number of rows affected. Executes a non query returning the number of rows affected. The command type. The command text to execute. The parameter collection to map. The number of rows affected. Executes a non query with parameters set via the command setter, returning the number of rows affected. The command type. The command text to execute. The command setter. The number of rows affected. Executes a non query with a command created via IDbCommandCreator and parameters. Output parameters can be retrieved via the returned dictionary. More commonly used as a lower level support method within the framework, for example StoredProcedure/AdoScalar. The callback to create a IDbCommand. The number of rows affected. Execute the query with the specified command text. No parameters are used. As with IDbCommand.ExecuteScalar, it returns the first column of the first row in the result set returned by the query. Extra columns or row are ignored. The command type The command text to execute. The first column of the first row in the result set Execute the query with the specified command text and parameter returning a scalar result The command type The command text to execute. The name of the parameter to map. One of the database parameter type enumerations. The length of the parameter. 0 if not applicable to parameter type. The parameter value. The first column of the first row in the result set Execute the query with the specified command text and parameters returning a scalar result The command type The command text to execute. The parameter collection to map. The first column of the first row in the result set Execute the query with the specified command text and parameters set via the command setter, returning a scalar result The command type The command text to execute. The command setter. The first column of the first row in the result set Execute the query with a command created via IDbCommandCreator and parameters Output parameters can be retrieved via the returned dictionary. More commonly used as a lower level support method within the framework, for example for StoredProcedure/AdoScalar. The callback to create a IDbCommand. A dictionary containing output parameters, if any Execute a query given IDbCommand's type and text by passing the created IDbCommand to a ICommandSetter implementation that knows how to bind values to the IDbCommand, reading a single result set on a per-row basis with a . The type of command The text of the query. callback that will extract results one row at a time. The command setter. Execute a query given IDbCommand's type and text, reading a single result set on a per-row basis with a . The type of command The text of the query. callback that will extract results one row at a time. Execute a query given IDbCommand's type and text and provided parameter information, reading a single result set on a per-row basis with a . The type of command The text of the query. callback that will extract results one row at a time. The name of the parameter to map. One of the database parameter type enumerations. The length of the parameter. 0 if not applicable to parameter type. The parameter value. Execute a query given IDbCommand's type and text and provided IDbParameters, reading a single result set on a per-row basis with a . Type of the command. The text of the query. callback that will extract results one row at a time. The parameter collection to map. Checks if DbProvider is not null and creates ExceptionTranslator if not LazyInit. Creates the data reader wrapper for use in AdoTemplate callback methods. The reader to wrap. The data reader used in AdoTemplate callbacks Derives the parameters of a stored procedure including the return parameter Name of the procedure. if set to true to include return parameter. The stored procedure parameters An instance of a DbProvider implementation. Gets or sets a value indicating whether to lazily initialize the IAdoExceptionTranslator for this accessor, on first encounter of a exception from the data provider. Default is "true"; can be switched to "false" for initialization on startup. true if to lazy initialize the IAdoExceptionTranslator; otherwise, false. Gets or sets the exception translator. If no custom translator is provided, a default is used. The exception translator. Gets or set the System.Type to use to create an instance of IDataReaderWrapper for the purpose of having defaults values to use in case of DBNull values read from IDataReader. The type of the data reader wrapper. Gets the 'Classic' AdoTemplate in Spring.Data Useful to access methods that return non-generic collections. The 'Classic; AdoTemplate in Spring.Data. Gets or sets the command timeout for IDbCommands that this AdoTemplate executes. It also sets the value of the contained 'ClassicAdoTemplate'. The command timeout. Default is 0, indicating to use the database provider's default. Any timeout specified here will be overridden by the remaining transaction timeout when executing within a transaction that has a timeout specified at the transaction level. Generic callback interface for code that operates on a IDbCommand. The return type from executing the callback

Allows you to execute any number of operations on a single IDbCommand, for example a single ExecuteScalar call or repeated execute calls with varying parameters.

Used internally by AdoTemplate, but also useful for application code. Note that the passed in IDbCommand has been created by the framework and will have its Connection property set and the Transaction property set based on the transaction context.

As an alternative to using this interface you can use the delegate version which is particularly nice when using anonymous delegates for writing more terse code and having easy access to the variables in the calling class.

See for a version that has the base class DbCommand as the callback argument.

Mark Pollack
Called by AdoTemplate.Execute with an active ADO.NET IDbCommand. The calling code does not need to care about closing the command or the connection, or about handling transactions: this will all be handled by Spring's AdoTemplate An active IDbCommand instance The result object Generic callback delegate for code that operates on a DbCommand.

Allows you to execute any number of operations on a single DbCommand, for example a single ExecuteScalar call or repeated execute calls with varying parameters.

Used internally by AdoTemplate, but also useful for application code. Note that the passed in DbCommand has been created by the framework and will have its Connection property set and the Transaction property set based on the transaction context.

The return type from executing the callback The ADO.NET DbCommand object The object returned from processing with the provided DbCommand Mark Pollack
Called by AdoTemplate.Execute with an preconfigured ADO.NET IDbDataAdapter instance with its SelectCommand property populated with CommandType and Text values along with Connection/Transaction properties based on the calling transaction context. An active IDbDataAdapter instance The result object Generic callback interface for code that operates on a DbCommand. The return type from executing the callback

Allows you to execute any number of operations on a single DbCommand, for example a single ExecuteScalar call or repeated execute calls with varying parameters.

Used internally by AdoTemplate, but also useful for application code. Note that the passed in DbCommand has been created by the framework and will have its Connection property set and the Transaction property set based on the transaction context.

Mark Pollack
Called by AdoTemplate.Execute with an active ADO.NET IDbCommand. The calling code does not need to care about closing the command or the connection, or about handling transactions: this will all be handled by Spring's AdoTemplate An active IDbCommand instance The result object Generic callback interface for code that operates on a IDbDataAdapter.

Allows you to execute any number of operations on a IDbDataAdapter, for example to Fill a DataSet or other more advanced operations such as the transfering data between two different DataSets.

Note that the passed in IDbDataAdapter has been created by the framework and its SelectCommand will be populated with values for CommandType and Text properties along with Connection/Transaction properties based on the calling transaction context.

Execute(IDataAdapterCallback dataAdapterCallback) method.
Mark Pollack (.NET)
Called by AdoTemplate.Execute with an preconfigured ADO.NET IDbDataAdapter instance with its SelectCommand property populated with CommandType and Text values along with Connection/Transaction properties based on the calling transaction context. An active IDbDataAdapter instance The result object Generic callback delegate for code that operates on a IDbCommand.

Allows you to execute any number of operations on a single IDbCommand, for example a single ExecuteScalar call or repeated execute calls with varying parameters.

Used internally by AdoTemplate, but also useful for application code. Note that the passed in DbCommand has been created by the framework and will have its Connection property set and the Transaction property set based on the transaction context.

The return type from executing the callback The ADO.NET DbCommand object The object returned from processing with the provided DbCommand Mark Pollack
Callback interface to process all results sets and rows in an AdoTemplate query method. Implementations of this interface perform the work of extracting results but don't need worry about managing ADO.NET resources, such as closing the reader.

This interface is mainly used within the ADO.NET framework. An IResultSetExtractor is usually a simpler choice for result set (DataReader) processing, in particular a RowMapperResultSetExtractor in combination with a IRowMapper.

Note: in contracts to a IRowCallbackHandler, a ResultSetExtractor is usually stateless and thus reusable, as long as it doesn't access stateful resources or keep result state within the object.
Implementations must implement this method to process all result set and rows in the IDataReader. The IDataReader to extract data from. Implementations should not close this: it will be closed by the AdoTemplate. An arbitrary result object or null if none. The extractor will typically be stateful in the latter case. Generic callback to process each row of data in a result set to an object. Implementations of this interface perform the actual work of mapping rows, but don't need worry about managing ADO.NET resources, such as closing the reader.

Typically used for AdoTemplate's query methods (with RowMapperResultSetExtractor adapters). RowMapper objects are typically stateless and thus reusable; they are ideal choices for implementing row-mapping logic in a single place.

Alternatively, consider subclassing MappingSqlQuery from the Spring.Data.Object namespace: Instead of working with separate AdoTemplate and RowMapper objects, you can have executable query objects (containing row-mapping logic) there.

Mark Pollack (.NET)
Implementations must implement this method to map each row of data in the result set (DataReader). This method should not call Next() on the DataReader; it should only extract the values of the current row. The IDataReader to map (pre-initialized to the current row) The number of the current row.. The specific typed result object for the current row. Provides a name to a ResultSetProcessor for use with AdoOperation subclasses such as StoredProcedure. Mark Pollack (.NET) Initializes a new instance of the class with a IRowCallback instance The name of the associated row callback for use with output result set mappers. A row callback instance. Initializes a new instance of the class with a IRowMapper instance The name of the associated row mapper. A IRowMapper instance. Initializes a new instance of the class with a IResultSetExtractor instance The name of the associated result set extractor. A IResultSetExtractor instance. Callback delegate to process all result sets and row in an AdoTemplate query method. The type returned from the result set mapping. The IDataReader to extract data from. Implementations should not close this: it will be closed by the AdoTemplate. An arbitrary result object or null if none. Callback delegate to process each row of data in a result set to an object. The type of the object returned from the mapping operation. The IDataReader to map the number of the current row. An abrirary object, typically derived from data in the result set. Adapter implementation of the ResultSetExtractor interface that delegates to a RowMapper which is supposed to create an object for each row. Each object is added to the results List of this ResultSetExtractor. Useful for the typical case of one object per row in the database table. The number of entries in the results list will match the number of rows.

Note that a RowMapper object is typically stateless and thus reusable; just the RowMapperResultSetExtractor adapter is stateful.

As an alternative consider subclassing MappingAdoQuery from the Spring.Data.Objects namespace: Instead of working with separate AdoTemplate and IRowMapper objects you can have executable query objects (containing row-mapping logic) there.

Mark Pollack (.NET)
Initializes a new instance of the class. Initializes a new instance of the class. The row mapper. The rows expected. A "AdoOperation" is a thread-safe, reusable object representing an ADO Query, "NonQuery" (Create, Update, Delete), stored procedure or DataSet manipualtions. Subclasses should set Command Text and add parameters before invoking Compile(). The order in which parameters are added is generally significant when using providers or functionality that do not use named parameters. Mark Pollack (.NET) Abstract base class providing common functionality for generic and non generic implementations of "AdoOperation" subclasses. Mark Pollack (.NET) Has this operation been compiled? Compilation means at least checking that a IDbProvider and sql have been provided, but subclasses may also implement their own custom validation. Object enabling us to create IDbCommands efficiently, based on this class's declared parameters. Ensures compilation if used in an IApplicationContext Compiles this operation. Ignores subsequent attempts to compile. Check whether this operation has been compiled already; lazily compile it if not already compiled. Automatically called by ValidateParameters and ValidateNamedParameters Validates the named parameters passed to an AdoTemplate ExecuteXXX method based on declared parameters. Subclasses should invoke this method very every ExecuteXXX method. The parameter dictionary supplied. May by null. Subclasses must implement to perform their own compilation. Invoked after this class's compilation is complete. Subclasses can assume that SQL has been supplied and that a IDbProvider has been supplied. Hook method that subclasses may override to react to compilation. This implementation does nothing. Gets or sets the type of the command. The type of the command. Gets or sets the db provider. The db provider. Gets or sets the SQL to execute The SQL. Gets or sets the declared parameters. The declared parameters. Gets a value indicating whether this is compiled. Compilation means that the operation is fully configured, and ready to use. The exact meaning of compilation will vary between subclasses. true if compiled; otherwise, false. Sets the command timeout for IDbCommands that this AdoTemplate executes. Default is 0, indicating to use the database provider's default. Any timeout specified here will be overridden by the remaining transaction timeout when executing within a transaction that has a timeout specified at the transaction level. The command timeout. Initializes a new instance of the class. A DbProvider, SQL and any parameters must be supplied before invoking the compile method and using this object. Initializes a new instance of the class. A DbProvider, SQL and any parameters must be supplied before invoking the compile method and using this object. Database provider to use. Initializes a new instance of the class. A DbProvider, SQL and any parameters must be supplied before invoking the compile method and using this object. Database provider to use. SQL query or stored procedure name. Compiles this operation. Ignores subsequent attempts to compile. Gets or sets the ADO template. The ADO template. Gets or sets the db provider. The db provider. Sets the command timeout for IDbCommands that this AdoTemplate executes. Default is 0, indicating to use the database provider's default. Any timeout specified here will be overridden by the remaining transaction timeout when executing within a transaction that has a timeout specified at the transaction level. The command timeout. Place together the mapping logic to a plain .NET object for one result set within the same class. Mark Pollack (.NET) Initializes a new instance of the class. Initializes a new instance of the class. The database provider. The SQL to execute Convenient method to execute query without parameters or calling context. The type parameter for the returned collection List of mapped objects Convenient method to execute query with parameters but without calling context. The type parameter for the returned collection The parameters for the query. Convenient method to execute query with parameters and access to output parameter values. The type parameter for the returned collection The parameters for the query. The returned output parameters. Central execution method. All named parameter execution goes through this method. the type parameter for the returned collection The in params. The out params. The calling context. Reusable query in which concrete subclasses must implement the MapRow method to map each row of a single result set into an object. Simplifies MappingSqlQueryWithContext API by dropping parameters and context. Most subclasses won't care about parameters. If you don't use contextual information, subclass this instead of MappingSqlQueryWithContext. Mark Pollack (.NET) Reusable query in which concrete subclasses must implement the abstract MapRow method to map each row of a single result set into an object. The MapRow method is also passed the input parameters and a dictionary to provide the method with calling context information (if necessary). If you do not need these additional parameters, use the subclass MappingAdoQuery. Mark Pollack (.NET) Initializes a new instance of the class. Initializes a new instance of the class. A superclass for object based abstractions of RDBMS stored procedures. Mark Pollack (.NET) Initializes a new instance of the class. Execute the stored procedure using 'ExecuteScalar' Value of input parameters. Dictionary with any named output parameters and the value of the scalar under the key "scalar". Encapsulate Command.ExecuteNonQuery operations within a reusable class. Mark Pollack (.NET) The default CommandType is CommandType.Text A "AdoOperation" is a thread-safe, reusable object representing an ADO Query, "NonQuery" (Create, Update, Delete), stored procedure or DataSet manipualtions. Subclasses should set Command Text and add parameters before invoking Compile(). The order in which parameters are added is generally significant when using providers or functionality that do not use named parameters. Mark Pollack (.NET) Initializes a new instance of the class. A DbProvider, SQL and any parameters must be supplied before invoking the compile method and using this object. Initializes a new instance of the class. A DbProvider, SQL and any parameters must be supplied before invoking the compile method and using this object. Database provider to use. Initializes a new instance of the class. A DbProvider, SQL and any parameters must be supplied before invoking the compile method and using this object. Database provider to use. SQL query or stored procedure name. Compiles this operation. Ignores subsequent attempts to compile. Gets or sets the ADO template. The ADO template. Gets or sets the db provider. The db provider. Sets the command timeout for IDbCommands that this AdoTemplate executes. Default is 0, indicating to use the database provider's default. Any timeout specified here will be overridden by the remaining transaction timeout when executing within a transaction that has a timeout specified at the transaction level. The command timeout. Initializes a new instance of the class. Initializes a new instance of the class. Initializes a new instance of the class. Place together the mapping logic to a plain .NET object for one result set within the same class. Mark Pollack (.NET) Initializes a new instance of the class. Encapsulate Command ExecuteScalar operations within a reusable class. The default CommandType is CommandType.Text Mark Pollack (.NET) Initializes a new instance of the class. Initializes a new instance of the class. Initializes a new instance of the class. Reusable query in which concrete subclasses must implement the MapRow method to map each row of a single result set into an object. Simplifies MappingAdoQueryWithContext API by dropping parameters and context. Most subclasses won't care about parameters. If you don't use contextual information, subclass this instead of MappingSqlQueryWithContext. Mark Pollack (.NET) Reusable query in which concrete subclasses must implement the MapRow method to map each row of a single result set into an object. The MapRow method is also passed the input parameters and a dictionary to provide the method with calling context information (if necessary). If you do not need these additional parameters, use the subclass MappingAdoQuery. Mark Pollack (.NET) Initializes a new instance of the class. Callback to process each row of data in a result set to an object. Implementations of this interface perform the actual work of mapping rows, but don't need worry about managing ADO.NET resources, such as closing the reader.

Typically used for AdoTemplate's query methods (with RowMapperResultSetExtractor adapters). RowMapper objects are typically stateless and thus reusable; they are ideal choices for implementing row-mapping logic in a single place.

Alternatively, consider subclassing MappingSqlQuery from the Spring.Data.Object namespace: Instead of working with separate AdoTemplate and RowMapper objects, you can have executable query objects (containing row-mapping logic) there.

Mark Pollack (.NET)
Implementations must implement this method to map each row of data in the result set (DataReader). This method should not call Next() on the DataReader; it should only extract the values of the current row. The IDataReader to map (pre-initialized for the current row) The number of the current row. The result object for the current row. Initializes a new instance of the class. A superclass for object based abstractions of RDBMS stored procedures. Mark Pollack (.NET) Initializes a new instance of the class. Initializes a new instance of the class. The db provider. Name of the stored procedure. Execute the stored procedure using 'ExecuteScalar' Value of input parameters. Dictionary with any named output parameters and the value of the scalar under the key "scalar". Summary description for AdoUtils. Order value for TransactionSynchronization objects that clean up ADO.NET Connections. Property dispose of the command. Useful in finally or catch blocks. command to dispose Connection holder, wrapping a ADO.NET connection and transaction. AdoTransactionManager binds instances of this class to the thread for a given DbProvider. Jurgen Hoeller Mark Pollack (.NET) Convenient base class for resource holders.

Features rollback-only support transactions. Can expire after a certain number of seconds or milliseconds, to determine transactional timeouts.

Juergen Hoeller Griffin Caprio (.NET)
Clear the transaction state of this resource holder. Increase the reference count by one because the holder has been requested. Decrease the reference count by one because the holder has been released. Mark the resource as synchronized with a transaction. Get or set whether the resource is synchronized with a transaction. true if synchronized; otherwise, false. Return the expiration deadline of this object. Return whether this object has an associated timeout. Return the time to live for this object in seconds.

Rounds up eagerly, e.g. '9.00001' to '10'.

If no deadline has been set.
Return the time to live for this object in milliseconds. If no deadline has been set. Sets the timeout for this object in milliseconds. Number of milliseconds until expiration. Sets the timeout for this object in seconds. Number of seconds until expiration. Return wheterh there are still open references to this holder Create a new ConnectionHolder The connection to hold The transaction to hold Callback for resource cleanup at end of transaction. Adapter for the interface. Contains empty implementations of all interface methods, for easy overriding of single methods. Juergen Hoeller Griffin Caprio (.NET) Mark Pollack (.NET) Interface for transaction synchronization callbacks. Supported by . Juergen Hoeller Griffin Caprio (.NET) Mark Pollack (.NET) Suspend this synchronization.

Supposed to unbind resources from if managing any.

Resume this synchronization.

Supposed to rebind resources from if managing any.

Invoked before transaction commit (before ) Can e.g. flush transactional O/R Mapping sessions to the database This callback does not mean that the transaction will actually be commited. A rollback decision can still occur after this method has been called. This callback is rather meant to perform work that's only relevant if a commit still has a chance to happen, such as flushing SQL statements to the database. Note that exceptions will get propagated to the commit caller and cause a rollback of the transaction. (note: do not throw TransactionException subclasses here!) If the transaction is defined as a read-only transaction. Invoked after transaction commit. Can e.g. commit further operations that are supposed to follow on a successful commit of the main transaction. Throws exception in case of errors; will be propagated to the caller. Note: To not throw TransactionExeption sbuclasses here! Invoked before transaction commit/rollback (after , even if threw an exception).

Can e.g. perform resource cleanup.

Note that exceptions will get propagated to the commit caller and cause a rollback of the transaction.

Invoked after transaction commit/rollback. Status according to Can e.g. perform resource cleanup, in this case after transaction completion.

Note that exceptions will get propagated to the commit or rollback caller, although they will not influence the outcome of the transaction.

Suspend this synchronization.

Supposed to unbind resources from if managing any.

Resume this synchronization.

Supposed to unbind resources from if managing any.

Invoked before transaction commit (before ) If the transaction is defined as a read-only transaction.

Can flush transactional sessions to the database.

Note that exceptions will get propagated to the commit caller and cause a rollback of the transaction.

Invoked after transaction commit. Can e.g. commit further operations that are supposed to follow on a successful commit of the main transaction. Throws exception in case of errors; will be propagated to the caller. Note: To not throw TransactionExeption sbuclasses here! Invoked before transaction commit/rollback (after , even if threw an exception).

Can e.g. perform resource cleanup.

Note that exceptions will get propagated to the commit caller and cause a rollback of the transaction.

Invoked after transaction commit/rollback. Status according to Can e.g. perform resource cleanup, in this case after transaction completion.

Note that exceptions will get propagated to the commit or rollback caller, although they will not influence the outcome of the transaction.

Compares the current instance with another object of the same type. A 32-bit signed integer that indicates the relative order of the objects being compared. The return value has these meanings: Value Meaning Less than zero This instance is less than obj. Zero This instance is equal to obj. Greater than zero This instance is greater than obj. An object to compare with this instance. obj is not the same type as this instance. 2 Create a new instance. Compares the current instance with another object of the same type. An object to compare with this instance. The value of the order property. Suspend this synchronization.

Supposed to unbind resources from if managing any.

Resume this synchronization.

Supposed to unbind resources from if managing any.

Invoked before transaction commit/rollback (after , even if threw an exception).

Can e.g. perform resource cleanup.

Note that exceptions will get propagated to the commit caller and cause a rollback of the transaction.

Invoked after transaction commit/rollback. Status according to Can e.g. perform resource cleanup, in this case after transaction completion.

Note that exceptions will get propagated to the commit or rollback caller, although they will not influence the outcome of the transaction.

A simple holder for the current Connection/Transaction objects to use within a given AdoTemplate Execute operation. Used internally. Initializes a new instance of the class. The connection. The transaction. Gets the connection. The connection. Gets the transaction. The transaction. Summary description for DbProviderUtils. Dispose of the given Connection, created via the given IDbProvider, if it is not managed externally (that is, not bound to the thread). The connection to close if necessary. If this is null the call will be ignored. The IDbProvider the connection came from Get a ADO.NET Connection/Transaction Pair for the given IDbProvider. Changes any exception into the Spring hierarchy of generic data access exceptions, simplifying calling code and making any exception that is thrown more meaningful. Is aware of a corresponding Connection/Transaction bound to the current thread, for example when using AdoPlatformTransactionManager. Will bind a IDbConnection to the thread if transaction synchronization is active The provider. A Connection/Transaction pair. Get a ADO.NET Connection/Transaction Pair for the given IDbProvider. Same as but throwing original provider exception. Is aware of a corresponding Connection/Transaction bound to the current thread, for example when using AdoPlatformTransactionManager. Will bind a IDbConnection to the thread if transaction synchronization is active The provider. Do the connection mgmt. Applies the current transaction timeout, if any, to the given ADO.NET IDbCommand object. The command. The db provider. Applies the specified timeout - overridden by the current transaction timeout, if any, to to the given ADO.NET IDb command object. The command. The db provider the command was obtained from. The timeout to apply (or 0 for no timeout outside of a transaction. Implementation that delegates to ServiceDomain and ContextUtil for all functionality. Introduced for purposes of unit testing. Mark Pollack (.NET) Provides the necessary transactional state and operations for ServiceDomainTransactionManager to work with ServiceDomain and ContextUtil. Introduced for purposes of unit testing. Mark Pollack (.NET) Creates the context specified by the ServiceConfig object and pushes it onto the context stack to become the current context. A ServiceConfig that contains the configuration information for the services to be used within the enclosed code. Leaves this ServiceDomain. The current context is then popped from the context stack, and the context that was running when Enter was called becomes the current context. One of the TransactionStatus values Sets the consistent bit and the done bit to true in the COM+ context Sets the consistent bit to false and the done bit to true in the COM+ context. Gets or sets the consistent bit in the COM+ context. My transaction vote. Gets a value indicating whether the current context is transactional. true if this instance is existing transaction; otherwise, false. Creates the context specified by the ServiceConfig object and pushes it onto the context stack to become the current context. A ServiceConfig that contains the configuration information for the services to be used within the enclosed code. Leaves this ServiceDomain. The current context is then popped from the context stack, and the context that was running when Enter was called becomes the current context. One of the TransactionStatus values Sets the consistent bit and the done bit to true in the COM+ context Sets the consistent bit to false and the done bit to true in the COM+ context. Gets or sets the consistent bit in the COM+ context. My transaction vote. Gets a value indicating whether the current context is transactional. true if this instance is existing transaction; otherwise, false. Uses and System.Transactions.Transaction.Current to provide necessary state and operations to TxScopeTransactionManager. Mark Pollack (.NET) Provides the necessary transactional state and operations for TxScopeTransactionManager to work with TransactionScope and Transaction.Current. Introduced for purposes of unit testing. Mark Pollack (.NET) Creates the transaction scope. The tx scope option. The tx options. The interop option. Call Complete() on the TransactionScope object created by this instance. Call Disponse() on the TransactionScope object created by this instance. Gets a value indicating whether there is a new transaction or an existing transaction. true if this instance is existing transaction; otherwise, false. Gets a value indicating whether rollback only has been called (i.e. Rollback() on the Transaction object) and therefore voting that the transaction will be aborted. true if rollback only; otherwise, false. Call Complete() on the TransactionScope object created by this instance. Call Disponse() on the TransactionScope object created by this instance. Creates the transaction scope. The tx scope option. The tx options. The interop option. Gets a value indicating whether there is a new transaction or an existing transaction. true if this instance is existing transaction; otherwise, false. Gets a value indicating whether rollback only has been called (i.e. Rollback() on the Transaction object) and therefore voting that the transaction will be aborted. true if rollback only; otherwise, false. Implementation of IAdoExceptionTranslator that analyzes provider specific error codes and translates into the DAO exception hierarchy. This class loads the obtains error codes from the IDbProvider metadata property ErrorCodes which defines error code mappings for various providers. Mark Pollack (.NET) Interface to be implemented by classes that can translate between properietary SQL exceptions and Spring.NET's data access strategy-agnostic .

Implementations can be generic (for example, ADO.NET Exceptions) or proprietary (for example, using SQL Server or Oracle error codes) for greater precision.

Rod Johnson Griffin Caprio (.NET) Mark Pollack
Translate the given into a generic data access exception. A readable string describing the task being attempted. The SQL query or update that caused the problem. May be null. The encountered by the ADO.NET implementation. A appropriate for the supplied . The shared log instance for this class (and derived classes). Initializes a new instance of the class. The data provider. Initializes a new instance of the class. The data provider. The error code collection. Translate the given into a generic data access exception. A readable string describing the task being attempted. The SQL query or update that caused the problem. May be null. The encountered by the ADO.NET implementation. A appropriate for the supplied . Template method for actually translating the given exception. given into a generic data access exception. A readable string describing the task being attempted. The SQL query or update that caused the problem. May be null. The error code. The encountered by the ADO.NET implementation. A appropriate for the supplied . The passed-in arguments will have been pre-checked. furthermore, this method is allowed to return null to indicate that no exception match has been found and that fallback translation should kick in. Subclasses can override this method to attempt a custom mapping from a data access Exception to DataAccessException. Readable text describing the task being attempted. SQL query or update that caused the problem. May be null. The error code extracted from the generic data access exception for a particular provider. The exception thrown from a data access operation. null if no custom translation was possible, otherwise a DataAccessException resulting from custom translation. This exception should include the exception parameter as a nested root cause. This implementation always returns null, meaning that the translator always falls back to the default error codes. Builds the message. The task. The SQL. The exception. Determines whether the specified exception is valid data access exception. The exception. true if is valid data access exception; otherwise, false. Logs the translation. The task. The SQL. The error code. The exception. if set to true [b]. Sets the db provider. The db provider. Gets the error codes for the provider The error codes. Gets or sets the fallback translator to use in case error code based translation fails. The fallback translator. Translates all exceptions to an UncategorizedAdoException. This exception translator used when an exception is thrown using the "primary" implementation of IAdoExceptionTranslator, i.e. AdoExceptionTranslator. Mark Pollack (.NET) Initializes a new instance of the class. Translate the given into a generic data access exception. A readable string describing the task being attempted. The SQL query or update that caused the problem. May be null. The encountered by the ADO.NET implementation. A appropriate for the supplied . Provides a name to a ResultSetProcessor for use with AdoOperation subclasses such as StoredProcedure. Mark Pollack (.NET) Initializes a new instance of the class with a IRowCallback instance The name of the associated row callback for use with output result set mappers. A row callback instance. Initializes a new instance of the class with a IRowMapper instance The name of the associated row mapper. A IRowMapper instance. Initializes a new instance of the class with a IResultSetExtractor instance The name of the associated result set extractor. A IResultSetExtractor instance. A data reader implementation that mapps DBNull values to sensible defaults. IDataRecord methods are virtual. Mark Pollack (.NET) Custom data reader implementations often delegate to an underlying instance. This interface captures that relationship for reuse in the framework. Implementations will typically add behavior to standard IDataReader methods, for example, by providing default values for DbNull values. See as an example. Mark Pollack (.NET) The underlying reader implementation to delegate to for accessing data from a returned result sets. The wrapped reader. Initializes a new instance of the class. Initializes a new instance of the class. The data reader to delegate operations to. Gets the 32-bit signed integer value of the specified field. The index of the field to find. The 32-bit signed integer value of the specified field or 0 if null The index passed was outside the range of 0 through . Return the value of the specified field, null if value equals DBNull.Value The index of the field to find. The which will contain the field value upon return. Returns null if value equals DBNull.Value The index passed was outside the range of 0 through . Return whether the specified field is set to null. The index of the field to find. if the specified field is set to null, otherwise . The index passed was outside the range of 0 through . Gets the with the specified name. Returns null if value equals DBNull.Value Gets the with the specified i. Returns null if value equals DBNull.Value Return the object or null if the value equals DBNull.Value Miscellaneous utility methods for manipulating parameter objects. Mark Pollack (.NET) The shared log instance for this class (and derived classes). Initializes a new instance of the class. Copies the parameters from IDbParameters to the parameter collection in IDbCommand The command. The spring param collection. Copies the parameters in IDbCommand to IDbParameters The spring param collection. The command. Adapter to enable use of a IRowCallback inside a ResultSetExtractor. We don't use it for navigating since this could lead to unpredictable consequences. Mark Pollack Initializes a new instance of the class. The row callback. Initializes a new instance of the class. The row callback delegate. All rows of the data reader are passed to the IRowCallback associated with this class. The IDataReader to extract data from. Implementations should not close this: it will be closed by the AdoTemplate. Null is returned since IRowCallback manages its own state. A class that contains the properties of ServiceConfig used by ServiceDomainPlatformTransactionManager. This is done to enhance testability of the transaction manager since ServiceConfig does not override Equals or Hashcode Mark Pollack (.NET) Using reflection on VS.NET 2005 a generated typed dataset, apply the connection/transaction pair associated with the current Spring based transaction scope. This avoids the limitations of using System.Transaction based transaction scope for multiple operation on typed datasets withone one transaction. Reflection was used rather than partial classes to provide a general solution that can be written and applied once. Usage within a DAO method, FindAll() is shown below. Note: Convenience methods to simplify calling syntax maybe provided in the future, it is a trade off on type safety calling the typed adapter defined outside the anonymous method as compared to casting inside a "DoInDbAdapter(object dbAdapter) method. public PrintGroupMappingDataSet FindAll() { PrintGroupMappingTableAdapter adapter = new PrintGroupMappingTableAdapter(); PrintGroupMappingDataSet printGroupMappingDataSet = new PrintGroupMappingDataSet(); printGroupMappingDataSet = AdoTemplate.Execute(delegate(IDbCommand command) { TypedDataSetUtils.ApplyConnectionAndTx(adapter, command); adapter.Fill(printGroupMappingDataSet.PrintGroupMapping); return printGroupMappingDataSet; }) as PrintGroupMappingDataSet; return printGroupMappingDataSet; } See http://www.code-magazine.com/articleprint.aspx?quickid=0605031 for a more complete discussion. Applies the connection and tx to the provided typed dataset. The connection and transaction used are taken from the Spring's current transactional context. See ConnectionUtils.GetConnectionTxPair for more information The typed data set adapter. The db provider. Applies the connection and tx to the provided typed dataset. Generated dataset to not inherit from a common base class so that we must pass in the generic object type. The typed data set adapter. The IDbCommand managed by Spring and set with the connection/transaction of the current Spring transaction scope. Exception thrown when SQL specified is invalid. Mark Pollack (.NET) SQL that led to the problem Initializes a new instance of the class. Initializes a new instance of the class. A message about the exception. Initializes a new instance of the class. A message about the exception. The inner exception. Initializes a new instance of the class. name of the current task. The offending SQL statment The root cause. Creates a new instance of the class. The that holds the serialized object data about the exception being thrown. The that contains contextual information about the source or destination. When overridden in a derived class, sets the with information about the exception. The that holds the serialized object data about the exception being thrown. The that contains contextual information about the source or destination. The parameter is a null reference ( in Visual Basic). Fatal exception thrown when we can't connect to an RDBMS using ADO.NET Rod Johnson Mark Pollack (.NET) Initializes a new instance of the class. Initializes a new instance of the class. A message about the exception. Initializes a new instance of the class. A message about the exception. The inner exception. Creates a new instance of the class. The that holds the serialized object data about the exception being thrown. The that contains contextual information about the source or destination. Callback delegate for code that operates on a IDbCommand. the ADO.NET command object.

Allows you to execute any number of operations on a single IDbCommand, for example a single ExecuteScalar call or repeated execute calls with varying parameters.

Used internally by AdoTemplate, but also useful for application code. Note that the passed in IDbCommand has been created by the framework and will have its Connection property set and the Transaction property set based on the transaction context.

Mark Pollack
Callback delegate to set any necessary parameters or other properties on the command object. The CommandType and CommandText properties will have already been supplied The database command object. Mark Pollack Exception thrown when an attempt to insert or update data results in violation of an primary key or unique constraint. Note that this is not necessarily a purely relational concept; unique primary keys are required by most database types. Thomas Risberg Mark Pollack (.NET) SQL that led to the problem Initializes a new instance of the class. Initializes a new instance of the class. A message about the exception. Initializes a new instance of the class. A message about the exception. The inner exception. Initializes a new instance of the class. name of the current task. The offending SQL statment The root cause. Creates a new instance of the class. The that holds the serialized object data about the exception being thrown. The that contains contextual information about the source or destination. When overridden in a derived class, sets the with information about the exception. The that holds the serialized object data about the exception being thrown. The that contains contextual information about the source or destination. The parameter is a null reference ( in Visual Basic). Gets the SQL that caused the exception The SQL that caused the exception. Called by the AdoTemplate class to allow implementations to set any necessary parameters on the command object. The CommandType and CommandText will have already been supplied. Mark Pollack (.NET) Called by the AdoTemplate class to allow implementations to set any necessary properties on the DbDataAdapter object.

For example, this callback can be used to set the AcceptChangesDuringFill property, register an event handler for the FillErrors event, set update batch sizes if your provider supports such functionality, set the ContinueUpdateOnError property, or in .NET 2.0 to set the property AcceptChangesDuringUpdate.

Downcast to the appropriate subtype to access vendor specific functionality.

The DataAdapter SelectCommand will be already be populated with values for CommandType and Text properties along with Connection/Transaction properties based on the calling transaction context.

Mark Pollack (.NET)
Lifecycle callback methods that can be registered when performing Fill operations with AdoTemplate.

The methods let you set various properties and invoke methods on the DataSet before and after it gets filled by a DataAdapter. For example, EnforceConstraints, BeginLoadData, and EndLoadData can be called to optimize the loading of large DataSets with many related tables.

Vendors may expose other propriety methods on their DataSet implementation, downcast to access this specific functionality.

Mark Pollack (.NET)
Called before a DataAdapter is used to fill a DataSet the the provided tablename. The DataSet to be filled with a DataTable The table collection to be filled Called after a DataAdapter is used to fill a DataSet the the provided tablename. The DataSet to be filled with a DataTable The table collection to be filled One of the central callback interfaces used by the AdoTemplate class This interface creates a IDbCommand. Implementations are responsible for configuring the created command with command type, command text and any necessary parameters. Mark Pollack (.NET) Creates a IDbCommand. The IDbProvider reference that can be used to create the command in a provider independent manner. The provider supplied is the same as used in configuration of AdoTemplate. Helper class that can efficiently create multiple IDbCommand objects with different parameters based on a SQL statement and a single set of parameter declarations. Mark Pollack (.NET) Initializes a new instance of the class. This interface creates a IDbDataAdapterCommand. Implementations are responsible for configuring the created command with appropriate select and actions commands along with their parameters. Generally used to to support the DataSet functionality in the Spring.Data.Objects namespace. Mark Pollack (.NET) Creates the data adapter. A new IDbDataAdapter instance Exception thrown when a result set has been accessed in an invalid fashion. Mark Pollack (.NET) SQL that led to the problem Initializes a new instance of the class. Initializes a new instance of the class. A message about the exception. Initializes a new instance of the class. A message about the exception. The inner exception. Initializes a new instance of the class. name of the current task. The offending SQL statment The root cause. Creates a new instance of the class. The that holds the serialized object data about the exception being thrown. The that contains contextual information about the source or destination. When overridden in a derived class, sets the with information about the exception. The that holds the serialized object data about the exception being thrown. The that contains contextual information about the source or destination. The parameter is a null reference ( in Visual Basic). Gets the SQL that caused the exception The SQL that caused the exception. Callback to process each row of data in an AdoOperation's Query method. Implementations of this interface perform the actual work of extracting results. In contrast to a IResultSetExtractor, a IRowCallback object is typically stateful. It keeps the result state within the object, to be available for later inspection. Implementations must implement this method to process each row of data in the data reader. This method should not advance the cursor by calling Read() on IDataReader but only extract the current values. The caller does not need to care about closing the reader, command, connection, or about handling transactions: this will all be handled by Spring's AdoTemplate An active IDataReader instance The result object Callback delegate to process all result sets and row in an AdoTemplate query method. Implementations of this delegate perform the work of extracting results but don't need worry about managing ADO.NET resources, such as closing the reader, or transaction management. The IDataReader to extract data from. Implementations should not close this: it will be closed by the AdoTemplate. An arbitrary result object or null if none. Callback delegate to process each row of data in a result set to an object. The IDataReader to map the number of the current row. An abrirary object, typically derived from data in the result set. Exception thrown when we can't classify a SQLException into one of our generic data access exceptions. Mark Pollack (.NET) SQL that led to the problem The error code, if available, that was unable to be categorized. Initializes a new instance of the class. Initializes a new instance of the class. A message about the exception. Initializes a new instance of the class. A message about the exception. The inner exception. Initializes a new instance of the class. name of the current task. the underlying error code that could not be translated The offending SQL statment The root cause. Creates a new instance of the class. The that holds the serialized object data about the exception being thrown. The that contains contextual information about the source or destination. When overridden in a derived class, sets the with information about the exception. The that holds the serialized object data about the exception being thrown. The that contains contextual information about the source or destination. The parameter is a null reference ( in Visual Basic). Return the underlying error code if available from the underlying provider. Return the SQL that resulted in this exception. IObjectDefinitionParser implementation that allows users to easily configure all the infrastructure objects required to enable attribute-driven transction demarcation. Rob Harrop Juergen Hoeller Mark Pollack (.NET) The 'proxy-target-type' attribute The 'order' property/attribute Central template method to actually parse the supplied XmlElement into one or more IObjectDefinitions. The element that is to be parsed into one or more s The the object encapsulating the current state of the parsing process; provides access to a The primary IObjectDefinition resulting from the parsing of the supplied XmlElement Configures the auto proxy creator. The parser context. The element. Gets a value indicating whether an ID should be generated instead of read from the passed in XmlElement. true if should generate id; otherwise, false. Note that this flag is about always generating an ID; the parser won't even check for an "id" attribute in this case. The for the <tx:advice> tag. Rob Harrop Juergen Hoeller Adrian Colyer Mark Pollack (.NET) NamespaceParser allowing for the configuration of declarative transaction management using either XML or using attributes. This namespace handler is the central piece of functionality in the Spring transaction management facilities and offers two appraoches to declaratively manage transactions. One approach uses transaction semantics defined in XML using the <tx:advice> elements, the other uses attributes in combination with the <tx:annotation-driven> element. Both approached are detailed in the Spring reference manual. Register the for the 'advice' and 'attribute-driven' tags. This is a utility class to help in parsing the transaction namespace Mark Pollack The transaction manager attribute The source of transaction metadata The property asociated with the transaction manager xml element Abstract implementation of that caches attributes for methods, and implements a default fallback policy.

The default fallback policy applied by this class is: most specific method target class attribute declaring method declaring class

Defaults to using class's transaction attribute if none is associated with the target method. Any transaction attribute associated with the target method completely overrides a class transaction attribute.

This implementation caches attributes by method after they are first used. If it's ever desirable to allow dynamic changing of transaction attributes (unlikely) caching could be made configurable. Caching is desirable because of the cost of evaluating rollback rules.

Rod Johnson Griffin Caprio (.NET) Mark Pollack (.NET)
Interface used by to source transaction attributes.

Implementations know how to source transaction attributes, whether from configuration, metadata attributes at source level, or anywhere else.

Rod Johnson Griffin Caprio (.NET)
Return the for this method. The method to check. The target . May be null, in which case the declaring class of the supplied must be used. A or null if the method is non-transactional. Canonical value held in cache to indicate no transaction attibute was found for this method, and we don't need to look again. Cache of s, keyed by method and target class. Creates a new instance of the class.

This is an class, and as such exposes no public constructors.

Subclasses should implement this to return all attributes for this method. May return null. We need all because of the need to analyze rollback rules. The method to retrieve attributes for. The transactional attributes associated with the method. Subclasses should implement this to return all attributes for this class. May return null. The to retrieve attributes for. All attributes associated with the supplied . Return the transaction attribute for this method invocation. Defaults to the class's transaction attribute if no method attribute is found method for the current invocation. Can't be null target class for this invocation. May be null. for this method, or null if the method is non-transactional Return the transaction attribute, given this set of attributes attached to a method or class. Return null if it's not transactional. Protected rather than private as subclasses may want to customize how this is done: for example, returning a affected by the values of other attributes. This implementation takes into account s, if the TransactionAttribute is a RuleBasedTransactionAttribute. Attributes attached to a method or class. May be null, in which case a null will be returned. The configured transaction attribute, or null if none was found. Does the supplied satisfy this matcher?

Must be implemented by a derived class in order to specify matching rules.

The candidate method. The target (may be , in which case the candidate must be taken to be the 's declaring class). if this this method matches statically.
Implementation of that uses s. Rod Johnson Griffin Caprio (.NET) Mark Pollack (.NET) Initializes a new instance of the class. implementation. We need all because of the need to analyze rollback rules. The method to retrieve attributes for. The transactional attributes associated with the method. implementation. The to retrieve attributes for. All attributes associated with the supplied . Transaction attribute approach to rolling back on all exceptions, no other exceptions by default. Rod Johnson Griffin Caprio (.NET) Default implementation of the interface, offering object-style configuration and sensible default values.

Base class for both and .

Juergen Hoeller Griffin Caprio (.NET) Mark Pollack (.NET)
Interface for classes that define transaction properties. Base interface for .

Note that isolation level, timeout and read-only settings will only get applied when starting a new transaction. As only and can actually cause that, it doesn't make sense to specify any of those settings else. Furthermore, not all transaction managers will support those features and thus throw respective exceptions when given non-default values.

Griffin Caprio (.NET) Mark Pollack (.NET)
Return the propagation behavior of type . Return the isolation level of type .

Only makes sense in combination with and .

Note that a transaction manager that does not support custom isolation levels will throw an exception when given any other level than .

Return the transaction timeout.

Must return a number of seconds, or -1. Only makes sense in combination with and . Note that a transaction manager that does not support timeouts will throw an exception when given any other timeout than -1.

Get whether to optimize as read-only transaction.

This just serves as hint for the actual transaction subsystem, it will not necessarily cause failure of write accesses.

Only makes sense in combination with and .

A transaction manager that cannot interpret the read-only hint will not throw an exception when given ReadOnly=true.

Return the name of this transaction. Can be null. This will be used as a transaction name to be shown in a transaction monitor, if applicable. In the case of Spring declarative transactions, the exposed name will be the fully qualified type name + "." method name + assembly (by default). Gets the enterprise services interop option. The enterprise services interop option. The default transaction timeout. Prefix for Propagation settings. Prefix for IsolationLevel settings. Prefix for transaction timeout values in description strings. Marker for read-only transactions in description strings. Creates a new instance of the class. Creates a new instance of the class with the supplied behaviour. The desired behavior. An override of the default method. The to compare to. True if the objects are equal. An override of the default method that returns the hashcode of the property. The hashcode of the property. An override of the default method that returns a string representation of the property. A string representation of the property. Gets / Sets the propagation behavior. Return the isolation level of type .

Only makes sense in combination with and .

Note that a transaction manager that does not support custom isolation levels will throw an exception when given any other level than .

Return the transaction timeout.

Must return a number of seconds, or -1. Only makes sense in combination with and . Note that a transaction manager that does not support timeouts will throw an exception when given any other timeout than -1.

Get whether to optimize as read-only transaction.

This just serves as hint for the actual transaction subsystem, it will not necessarily cause failure of write accesses.

Only makes sense in combination with and .

A transaction manager that cannot interpret the read-only hint will not throw an exception when given ReadOnly=true.

Return the name of this transaction. Can be null. This will be used as a transaction name to be shown in a transaction monitor, if applicable. In the case of Spring declarative transactions, the exposed name will be the fully qualified type name + "." method name + assembly (by default). Gets the enterprise services interop option. The enterprise services interop option. Returns a representation of the property. This interface adds a specification to . Griffin Caprio (.NET) Decides if rollback is required for the supplied . The to evaluate. True if the exception causes a rollback, false otherwise. Prefix for rollback-on-exception rules in description strings. Prefix for commit-on-exception rules in description strings. Creates a new instance of the class. Creates a new instance of the class, setting the propagation behavior to the supplied value. The desired transaction propagation behaviour. Decides if rollback is required for the supplied .

The default behavior is to rollback on any exception. Consistent with 's behavior.

The to evaluate. True if the exception causes a rollback, false otherwise.
Return a description of this transaction attribute.

The format matches the one used by the , to be able to feed any result into a instance's properties.

Advisor driven by a , used to exclude a general advice from methods that are non-transactional. To put it another way, use this advisor when you would like to associate other AOP advice based on the pointcut specified by declarative transaction demarcation, attibute based or otherwise.

Because the AOP framework caches advice calculations, this is normally faster than just letting the run and find out itself that it has no work to do.

Mark Pollack (.NET)
Creates a new instance of the class. Tests the input method to see if it's covered by the advisor. The method to match. The to match against. True if the supplied is covered by the advisor. ITransactionAttribute that delegates all calls to a give target attribute except for the name, which is specified in the constructor. Initializes a new instance of the class. The target attribute. The identification. Decides if rollback is required for the supplied . The to evaluate. True if the exception causes a rollback, false otherwise. Return a description of this transaction attribute.

The format matches the one used by the , to be able to feed any result into a instance's properties.

Return the propagation behavior of type . Return the isolation level of type .

Only makes sense in combination with and .

Note that a transaction manager that does not support custom isolation levels will throw an exception when given any other level than .

Return the transaction timeout.

Must return a number of seconds, or -1. Only makes sense in combination with and . Note that a transaction manager that does not support timeouts will throw an exception when given any other timeout than -1.

Get whether to optimize as read-only transaction.

This just serves as hint for the actual transaction subsystem, it will not necessarily cause failure of write accesses.

Only makes sense in combination with and .

A transaction manager that cannot interpret the read-only hint will not throw an exception when given ReadOnly=true.

Return the name of this transaction. The exposed name will be the fully qualified type name + "." method name + assembly (by default). Gets the enterprise services interop option. The enterprise services interop option. Very simple implementation of which will always return the same for all methods fed to it.

The may be specified, but will otherwise default to PROPAGATION_REQUIRED. This may be used in the cases where you want to use the same transaction attribute with all methods being handled by a transaction interceptor.

Colin Sampaleanu Griffin Caprio (.NET)
Creates a new instance of the class. Return the for this method. The method to check. The target . May be null, in which case the declaring class of the supplied must be used. A or null if the method is non-transactional. Determines whether the specified is equal to the current . The to compare with the current . true if the specified is equal to the current ; otherwise, false. Serves as a hash function for a particular type. is suitable for use in hashing algorithms and data structures like a hash table. A hash code for the current . Returns a that represents the current . A that represents the current . 2 Allows a transaction attribute to be specified, using the form, for example, "PROPAGATION_REQUIRED". Simple implementation of the interface that allows attributes to be stored per method in a map. Rod Johnson Juergen Hoeller Griffin Caprio (.NET) Creates a new instance of the class. Add an attribute for a transactional method. Method names can end or start with "*" for matching multiple methods. The class and method name, separated by a dot. The attribute to be associated with the method. Add an attribute for a transactional method. Method names can end or start with "*" for matching multiple methods. The target interface or class. The mapped method name. The attribute to be associated with the method. Add an attribute for a transactional method. The transactional method. The attribute to be associated with the method. Does the supplied match the supplied ? The default implementation checks for "xxx*", "*xxx" and "*xxx*" matches, as well as direct equality. This behaviour can (of course) be overridden in derived classes. The method name of the class. The name in the descriptor. True if the names match. Return the for this method. The method to check. The target . May be null, in which case the declaring class of the supplied must be used. A or null if the method is non-transactional. Set a name/attribute map, consisting of "FQCN.method, AssemblyName" method names (e.g. "MyNameSpace.MyClass.MyMethod, MyAssembly") and ITransactionAttribute instances (or Strings to be converted to instances).

The key values of the supplied must adhere to the following form:
FQCN.methodName, Assembly.

MyNameSpace.MyClass.MyMethod, MyAssembly
Simple implementation of the that allows attributes to be matched by registered name. Juergen Hoeller Griffin Caprio (.NET) Logger available to subclasses, static for optimal serialization Keys are method names; values are ITransactionAttributes Creates a new instance of the class. Enumerate the string/ mapping entries. Add a mapping. Add a mapping. Does the supplied match the supplied ? The default implementation checks for "xxx*", "*xxx" and "*xxx*" matches, as well as direct equality. Can be overridden in subclasses. The method name of the class. The name in the descriptor. True if the names match. Add an attribute for a transactional method.

Method names can end with "*" for matching multiple methods.

The transactional method name. The attribute to be associated with the method.
Parses the given properties into a name/attribute map. Expects method names as keys and string attributes definitions as values, parsable into instances via . The properties of the transaction. Return the for this method. The method to check. The target . May be null, in which case the declaring class of the supplied must be used. A or null if the method is non-transactional. Set a name/attribute map, consisting of method names (e.g. "MyMethod") and instances (or Strings to be converted to ITransactionAttribute instances). Parses the given properties into a name/attribute map. Expects method names as keys and string attributes definitions as values, parsable into instances via . The properties of the transaction. Tag class. Its class means it has the opposite behaviour to the superclass. Rod Johnson Griffin Caprio (.NET) Rule determining whether or not a given exception (and any subclasses) should cause a rollback.

Multiple such rules can be applied to determine whether a transaction should commit or rollback after an exception has been thrown.

Griffin Caprio (.NET)
Could hold exception, resolving class name but would always require FQN. This way does multiple string comparisons, but how often do we decide whether to roll back a transaction following an exception? Canonical instance representing default behavior for rolling back on all s. Creates a new instance of the class for the named . The exception name.

As always, the should be the full assembly qualified version.

Creates a new instance of the class for the suplied .

The exception class must be or a subclass.

This is the preferred way to construct a , matching the exception class and subclasses.

The class that will trigger a rollback.
Return the depth to the matching superclass execption . A return value of 0 means that the matches. The of exception to find. Return -1 if there's no match. Otherwise, return depth. Lowest depth wins. Return the depth to the matching superclass execption . A return value of 0 means that the s matches. The exception object to find. Return -1 if there's no match. Otherwise, return depth. Lowest depth wins. Returns a representation of this instance. A containing the exception covered by this instance. Override of . The hashcode of the exception name covered by this instance. Override of . The object to compare. True if the input object is equal to this instance. Strongly typed Equals() implementation. The to compare. True if the input object is equal to the supplied . Returns the name of the exception. Creates a new instance of the class. Creates a new instance of the class. The class that will trigger a rollback. The that drives this advisor. implementation that works out whether a given exception should cause transaction rollback by applying a number of rollback rules, both positive and negative. If no rules are relevant to the exception, it behaves like the class (rolling back on runtime exceptions)..

The creates objects of this class.

Rod Johnson Griffin Caprio (.NET)
Creates a new instance of the class. The desired transaction propagation behaviour. The rollback rules list for this transaction attribute. Creates a new instance of the class. Will a transaction be rolled back if the supplied is thrown during the lifecycle of a transaction to which this attribute is applied? The offending . True if the exception should cause a rollback, false otherwise. Returns a representation of this instance. A representation of this instance. Adds a to this attributes list of rollback rules. The to add. Clears the rollback rules for this attribute. Sets the rollback rules list for this transaction attribute. Superclass for transaction aspects, such as the AOP Alliance-compatible .

This enables the underlying Spring transaction infrastructure to be used to easily implement an aspect for any aspect system.

Subclasses are responsible for calling methods in this class in the correct order.

Uses the Strategy design pattern. A implementation will perform the actual transaction management

A transaction aspect is serializable if its and are serializable.

Rod Johnson Juergen Hoeller Griffin Caprio (.NET) Mark Pollack (.NET)
The name in thread local storage where the TransactionInfo object is located The currently referenced by this aspect The currently referenced by this aspect. Creates a new instance of the class. Checks that the required properties are set. Create a transaction if necessary Method about to execute Type that the method is on A object, whether or not a transaction was created.

The property on the class can be used to tell if there was a transaction created.

Creates the transaction if necessary. The source transaction attribute. The joinpoint identification. Transaction Info for declarative transaction management. Identifies the method by providing the qualfied method name. The method info. qualified mehtod name. Execute after the successful completion of call, but not after an exception was handled.

Do nothing if we didn't create a transaction.

The about the current transaction.
Handle a exception, closing out the transaction.

We may commit or roll back, depending on our configuration.

The about the current transaction. The encountered.
Resets the for this thread. Call this in all cases: exceptions or normal return. The about the current transaction. May be null. Gets and sets the for this aspect. Gets and sets the for this aspect. Returns the of the current method invocation. Mainly intended for code that wants to set the current transaction rollback-only but not throw an application exception. If the transaction info cannot be found, because the method was invoked outside of an AOP invocation context. Subclasses can use this to return the current . Only subclasses that cannot handle all operations in one method need to use this mechanism to get at the current . An around advice such as an AOP Alliance can hold a reference to the throughout the aspect method. A will be returned even if no transaction was created. The property can be used to query this. If no transaction has been created by an aspect. Set properties with method names as keys and transaction attribute descriptors (parsed via ) as values: e.g. key = "MyMethod", value = "PROPAGATION_REQUIRED,readOnly". Method names are always applied to the target class, no matter if defined in an interface or the class itself.

Internally, a will be created from the given properties.

Opaque object used to hold transaction information.

Subclasses must pass it back to method on this class, but not see its internals.

Creates a new instance of the class for the supplied . The transaction attributes to associate with any transaction. The info for diagnostic display of joinpoint Binds this instance to the thread local storage variable for the current thread and backs up the existing object for the current thread. Restores the previous object to the current thread. Does this instance currently have a transaction? True if this instance has a transaction. Gets and sets the for this object. Gets the current for this object. Gets the joinpoint identification. The joinpoint identification. .NET Attribute for describing transactional behavior of methods in a class. This attribute type is generally directly comparable to Spring's class and in fact will directly convert the data to a so that Spring's transaction support code does not have to know about attributes. If no rules are relevant to the exception it will be treaded like DefaultTransactionAttribute, (rolling back on all exceptions). The default property values are TransactionPropagation.Required, IsolationLevel.ReadCommitted, DefaultTransactionDefinition.TIMEOUT_DEFAULT (can be changed, by default is the default value of the underlying transaction subsystem) ReadOnly = false, and Type.EmtptyTypes specified for Rollbackfor and NoRollbackFor exception types. Mark Pollack (.NET) Initializes a new instance of the class. Initializes a new instance of the class. The transaction propagation. Initializes a new instance of the class. The transaction propagation. The isolation level. Initializes a new instance of the class. The isolation level. Gets the transaction propagation. Defaults to TransactionPropagation.Required The transaction propagation. Gets the isolation level. Defaults to IsolationLevel.Unspecified The isolation level. Gets or sets the timeout. Defaults to the default timeout of the underlying transaction system. The timeout. Gets or sets a value indicating whether the transaction is readonly. Defaults to false true if read-only; otherwise, false. Gets or sets the zero or more exception types which indicating which exception types must cause a transaction rollback. This is the preferred way to construct a rollback rule, matching the exception class and subclasses. The rollback types. Gets or sets zero or more exceptions types which indicationg which exception type must not cause a transaction rollback. This is the preferred way to construct a rollback rule, matching the exception type. The no rollback for. Gets or sets the enterprise services interop option. The enterprise services interop option. Type converter for objects. Takes s of the form

PROPAGATION_NAME,ISOLATION_NAME,readOnly,timeout_NNNN,+Exception1,-Exception2

where only propagation code is required. For example:

PROPAGATION_MANDATORY,ISOLATION_DEFAULT

The tokens can be in any order. Propagation and isolation codes must use the names of the values in the enumeration. Timeout values are in seconds. If no timeout is specified, the transaction manager will apply a default timeout specific to the particular transaction manager.

A "+" before an exception name substring indicates that transactions should commit even if this exception is thrown; a "-" that they should roll back.

Mark Pollack
Returns whether this converter can convert an object of the given type to an ITransactionAttribute, using the specified context. An that provides a format context. A that represents the type you want to convert from. true if this converter can perform the conversion; otherwise, false. Converts from string to ITransactionAttribute The context. The culture. The string value to convert An ITransactionAttribute instance Type converter for objects. Takes s of the form

PROPAGATION_NAME,ISOLATION_NAME,readOnly,timeout_NNNN,+Exception1,-Exception2

where only propagation code is required. For example:

PROPAGATION_MANDATORY,ISOLATION_DEFAULT

The tokens can be in any order. Propagation and isolation codes must use the names of the values in the enumeration. Timeout values are in seconds. If no timeout is specified, the transaction manager will apply a default timeout specific to the particular transaction manager.

A "+" before an exception name substring indicates that transactions should commit even if this exception is thrown; a "-" that they should roll back.

Rod Johnson Juergen Hoeller Griffin Caprio (.NET)
Parses the input properties string into a valid instance The string defining the transactional properties. Gets the from this editor. Advisor driven by a , used to include a for methods that are transactional.

Because the AOP framework caches advice calculations, this is normally faster than just letting the run and find out itself that it has no work to do.

Rod Johnson Griffin Caprio (.NET)
Initializes a new instance of the class.

This is an abstract class, and as such has no publicly visible constructors.

Creates a new instance of the class. The pre-configured transaction interceptor. Tests the input method to see if it's covered by the advisor. The method to match. The to match against. True if the supplied is covered by the advisor. Sets the tx attribute source. The transaction interceptor. Sets the transaction interceptor. The transaction interceptor. Editor that can convert values into instances. The transaction attribute string must be parseable by the in this package.

Strings must be specified in the following syntax:
FQCN.methodName=<transaction attribute string> (sans <>).

ExampleNamespace.ExampleClass.MyMethod=PROPAGATION_MANDATORY,ISOLATION_DEFAULT The specified class must be the one where the methods are defined; in the case of implementing an interface, the interface class name must be specified.

This will register all overloaded methods for a given name. Does not support explicit registration of certain overloaded methods. Supports wildcard style mappings (in the form "xxx*"), e.g. "Notify*" for "Notify" and "NotifyAll".

Rod Johnson Juergen Hoeller Griffin Caprio (.NET)
Creates a new instance of the class. Parses the input properties into a valid instance The properties string to be parsed. Gets the from this instance. Internal class to parse property values. Creates a new instance of the class. The property values to be parsed. Indexer to return values based on index value. Returns the collection of keys for properties. An AOP Alliance providing declarative transaction management using the common Spring.NET transaction infrastructure.

That class contains the necessary calls into Spring.NET's underlying transaction API: subclasses such as this are responsible for calling superclass methods such as in the correct order, in the event of normal invocation return or an exception.

s are thread-safe.

Rod Johnson Juergen Hoeller Griffin Caprio (.NET) Mark Pollack (.NET)
AOP Alliance invoke call that handles all transaction plumbing. The method that is to execute in the context of a transaction. The return value from the method invocation. Proxy factory object for simplified declarative transaction handling.

Alternative to the standard AOP with a .

This class is intended to cover the typical case of declarative transaction demarcation: namely, wrapping a (singleton) target object with a transactional proxy, proxying all the interfaces that the target implements.

Internally, a instance is used, but the user of this class does not have to care. Optionally, an can be specified to cause conditional invocation of the underlying .

The and properties can be set to add additional interceptors to the mix.

Juergen Hoeller Dmitriy Kopylenko Rod Johnson Griffin Caprio (.NET)
Creates a new instance of the class. Returns the object wrapped by this proxy factory. The target object proxy. Method run after all the properties have been set for this object. Responsible for actual proxy creation. Set the target or . The target. If this is an implementation of the interface, it is used as our ; otherwise it is wrapped in a . An for this object. Set the transaction manager for this factory. It is this instance that will perform actual transaction management: this class is just a way of invoking it. Set the target object, i.e. the object to be wrapped with a transactional proxy.

The target may be any object, in which case a will be created. If it is a , no wrapper is created: this enables the use of a pooling or prototype .

Specify the set of interfaces being proxied.

If left null (the default), the AOP infrastructure works out which interfaces need proxying by analyzing the target, proxying all of the interfaces that the target object implements.

Set properties with method names as keys and transaction attribute descriptors as values.

The various transaction attribute descriptors are parsed via an instance of the class.

Method names are always applied to the target class, no matter if defined in an interface or the class itself.

Internally, a will be created from the given properties.

An example string (method name and transaction attributes) might be:

key = "myMethod", value = "PROPAGATION_REQUIRED,readOnly".

Set the transaction attribute source which is used to find transaction attributes.

If specifying a property value, an appropriate implementation will create a from the value.

Set a pointcut, i.e an object that can cause conditional invocation of the depending on method and attributes passed. Additional interceptors are always invoked. Set additional interceptors (or advisors) to be applied before the implicit transaction interceptor. Set additional interceptors (or advisors) to be applied after the implicit transaction interceptor.

Note that this is just necessary if you rely on those interceptors in general.

Specify the to use. The default instance is the global AdvisorAdapterRegistry. Returns the object for this proxy factory. Is this object a singleton? Always returns true in this implementation. Default implementation of the interface, used by .

Holds all status information that needs internally, including a generic transaction object determined by the concrete transaction manager implementation.

Supports delegating savepoint-related methods to a transaction object that implements the interface.

Juergen Hoeller Griffin Caprio (.NET) Mark Pollack (.NET)
Representation of the status of a transaction, consisting of a transaction object and some status flags.

Transactional code can use this to retrieve status information, and to programmatically request a rollback (instead of throwing an exception that causes an implicit rollback).

Derives from the interface to provide access to savepoint management facilities. Note that savepoint management is just available if the actual transaction manager supports it.

Juergen Hoeller Griffin Caprio (.NET) Mark Pollack (.NET)
Set the transaction rollback-only. This instructs the transaction manager that the only possible outcome of the transaction may be a rollback, proceeding with the normal application workflow though (i.e. no exception).

For transactions managed by a or . An alternative way to trigger a rollback is throwing an transaction exception.

Returns true if the transaction is new, else false if participating in an existing transaction. Return whether the transaction has been marked as rollback-only, (either by the application or by the transaction infrastructure). Gets the current transaction object. Returns the current transaction object for a given connection.

Used to associate with the property.

Creates a new instance of the class. The underlying transaction object that can hold state for the internal transaction implementation. True if the transaction is new, else false if participating in an existing transaction. True if a new transaction synchronization has been opened for the given . True if the transaction is read only. if set to true, enable debug log in tx managers. The suspended resources for the given . Determines whether there is an actual transaction active. true if there is an actual transaction active; otherwise, false. Set the transaction rollback-only. This instructs the transaction manager that the only possible outcome of the transaction may be a rollback, proceeding with the normal application workflow though (i.e. no exception).

For transactions managed by a or . An alternative way to trigger a rollback is throwing an transaction exception.

This implementation delegates to the underlying transaction object (if it implements the interface) to create a savepoint. If the underlying transaction does not support savepoints. This implementation delegates to the underlying transaction object (if it implements the interface) to rollback to the supplied . The savepoint to rollback to. This implementation delegates to the underlying transaction object (if it implements the interface) to release the supplied . The savepoint to release. Create a savepoint and hold it for the transaction. If the underlying transaction does not support savepoints. Roll back to the savepoint that is held for the transaction. If no save point has been created. Release the savepoint that is held for the transaction. If no save point has been created. Gets a value indicating whether the progress of this transaction is debugged. This is used by AbstractPlatformTransactionManager as an optimization, to prevent repeated calls to log.IsDebug. Not really intended for client code. true if debug; otherwise, false. Returns the underlying transaction object. Gets or sets a value indicating whether the Transaction is completed, that is commited or rolled back. true if completed; otherwise, false. Returns true if the underlying transaction is read only. Flag indicating if a new transaction synchronization has been opened for this transaction. Returns suspended resources for this transaction. Gets and sets the savepoint for the current transaction, if any. Returns a flag indicating if the transaction has a savepoint. Return the underlying transaction as a , if possible. If the underlying transaction does not support savepoints. Return true if the underlying transaction implements the interface. Returns true if the transaction is new, else false if participating in an existing transaction. Determine the rollbackOnly flag via checking both this and the transaction object, provided that the latter implements the interface. The property can only be set to true. Determine the rollback-only flag via checking this TransactionStatus. Will only return true if the application set the property RollbackOnly to true on this TransactionStatus object. true if [local rollback only]; otherwise, false. Callback interface for transactional code.

To be used with 's Execute methods.

Typically used to gather various calls to transaction-unaware low-level services into a higher-level method implementation with transaction demarcation.

Juergen Hoeller Mark Pollack (.NET)
Gets called by TransactionTemplate.Execute within a transaction context. The associated transaction status. A result object or null. Interface specifying basic transaction exectuion operations. Implemented by . Not often used directly, but a useful option to enhance testability, as it can easily be mocked or stubbed. Juergen Hoeller Mark Pollac (.NET) Executes the the action specified by the given delegate callback within a transaction. Allows for returning a result object created within the transaction, that is, a domain object or a collection of domain objects. An exception thrown by the callback is treated as a fatal exception that enforces a rollback. Such an exception gets propagated to the caller of the template. The delegate that specifies the transactional action. A result object returned by the callback, or null if one In case of initialization or system errors. Executes the action specified by the given callback object within a transaction. Allows for returning a result object created within the transaction, that is, a domain object or a collection of domain objects. An exception thrown by the callback is treated as a fatal exception that enforces a rollback. Such an exception gets propagated to the caller of the template. The callback object that specifies the transactional action. A result object returned by the callback, or null if one In case of initialization or system errors. Simple convenience class for TransactionCallback implementation. Allows for implementing a DoInTransaction version without result, i.e. without the need for a return statement. Mark Pollack (.NET) Gets called by TransactionTemplate.execute within a transactional context when no return value is required. The status. Does not need to care about transactions itself, although it can retrieve and influence the status of the current transaction via the given status object, e.g. setting rollback-only. A RuntimeException thrown by the callback is treated as application exception that enforces a rollback. An exception gets propagated to the caller of the template. Gets called by TransactionTemplate.Execute within a transaction context. The associated transaction status. a result object or null Callback delegate for performing actions within a transactional context.

To be used with 's Execute methods.

Typically used to gather various calls to transaction-unaware low-level services into a higher-level method implementation with transaction demarcation.

The status of the transaction, can be used to trigger a rollback the current transaction by settings its RollbackOnly property to true. A result object or null.
Internal class that manages resources and transaction synchronizations per thread. Supports one resource per key without overwriting, i.e. a resource needs to be removed before a new one can be set for the same key. Supports a list of transaction synchronizations if synchronization is active.

Resource management code should check for thread-bound resources via GetResource(). It is normally not supposed to bind resources to threads, as this is the responsiblity of transaction managers. A further option is to lazily bind on first use if transaction synchronization is active, for performing transactions that span an arbitrary number of resources.

Transaction synchronization must be activated and deactivated by a transaction manager via InitSynchronization and ClearSynchronization. This is automatically supported by .

Resource management code should only register synchronizations when this manager is active, and perform resource cleanup immediately else. If transaction synchronization isn't active, there is either no current transaction, or the transaction manager doesn't support synchronizations.

Note that this class uses following naming convention for the named 'data slots' for storage of thread local data, 'Spring.Transaction:Name' where Name is either
Juergen Hoeller Griffin Caprio (.NET) Mark Pollack (.NET)
Check if there is a resource for the given key bound to the current thread. key to check if there is a value bound to the current thread Retrieve a resource for the given key that is bound to the current thread. key to check a value bound to the current thread, or null if none. Bind the given resource for teh given key to the current thread key to bind the value to value to bind Unbind a resource for the given key from the current thread key to check the previously bound value if there is no value bound to the thread Activate transaction synchronization for the current thread. Called by transaction manager at the beginning of a transaction. If synchronization is already active. Deactivate transaction synchronization for the current thread. Called by transaction manager on transaction cleanup. If synchronization is not active. Clears the entire transaction synchronization state for the current thread, registered synchronizations as well as the various transaction characteristics. Register a new transaction synchronization for the current thread. Typically called by resource management code. If synchronization is not active. Return all resources that are bound to the current thread. Main for debugging purposes. Resource manager should always invoke HasResource for a specific resource key that they are interested in. IDictionary with resource keys and resource objects or empty dictionary if none is bound. Return an unmodifiable list of all registered synchronizations for the current thread. A list of instances. If synchronization is not active. Return if transaction synchronization is active for the current thread. Can be called before InitSynchronization to avoid unnecessary instance creation. Gets or sets a value indicating whether the current transaction is read only. Called by transaction manager on transaction begin and on cleanup. Return whether the current transaction is marked as read-only. To be called by resource management code when preparing a newly created resource (for example, a Hibernate Session).

Note that transaction synchronizations receive the read-only flag as argument for the beforeCommit callback, to be able to suppress change detection on commit. The present method is meant to be used for earlier read-only checks, for example to set the flush mode of a Hibernate Session to FlushMode.Never upfront.

true if current transaction read only; otherwise, false.
Gets or sets the name of the current transaction, if any. Called by the transaction manager on transaction begin and on cleanup. To be called by resource management code for optimizations per use case, for example to optimize fetch strategies for specific named transactions. The name of the current transactio or null if none set. Gets or sets a value indicating whether there currently is an actual transaction active. This indicates wheter the current thread is associated with an actual transaction rather than just with active transaction synchronization. Called by the transaction manager on transaction begin and on cleanup. To be called by resource management code that wants to discriminate between active transaction synchronization (with or without backing resource transaction; also on PROPAGATION_SUPPORTS) and an actual transaction being active; on PROPAGATION_REQUIRES, PROPAGATION_REQUIRES_NEW, etC) true if [actual transaction active]; otherwise, false. Gets or sets the current transaction isolation level, if any. Called by the transaction manager on transaction begin and on cleanup. The current transaction isolation level. If no current transaction is active, retrun IsolationLevel.Unspecified Enumeration containing the state of transaction synchronization. Griffin Caprio (.NET) Always activate transaction synchronization, even for "empty" transactions that result from . with no existing backend transaction. Activate transaction synchronization only for actual transactions, i.e. not for empty ones that result from . with no existing backend transaction. Never active transaction synchronization. Enumeration of status values when synchronizing transactions. Griffin Caprio Completion status in case of proper commit. Completion status in case of proper rollback. Completion status in case of heuristic mixed completion or system error. Helper class that simplifies programmatic transaction demarcation and transaction exception handling.

The central methods are and supporting transactional code wrapped in the delegate instance. It handles the transaction lifecycle and possible exceptions such that neither the delegate implementation nor the calling code needs to explicitly handle transactions.

Can be used within a service implementation via direct instantiation with a transaction manager reference, or get prepared in an application context and given to services as object reference.

The transaction manager should always be configured as an object in the application context, in the first case given to the service directly, in the second case to the prepared template.

Supports setting the propagation behavior and the isolation level by name, for convenient configuration in context definitions.

Juergen Hoeller Mark Pollack (.NET) Griffin Caprio (.NET)
Creates a new instance of the class.

Mainly targeted at configuration by an object factory.

The property must be set before any calls to the or method.
Creates a new instance of the class.

Mainly targeted at configuration by an object factory.

The transaction management strategy to be used.
Ensures that the has been set. Executes the the action specified by the given delegate callback within a transaction. The delegate that specifies the transactional action. A result object returned by the callback, or null if one Allows for returning a result object created within the transaction, that is, a domain object or a collection of domain objects. An exception thrown by the callback is treated as a fatal exception that enforces a rollback. Such an exception gets propagated to the caller of the template. In case of initialization or system errors. Executes the action specified by the given callback object within a transaction. The callback object that specifies the transactional action. A result object returned by the callback, or null if one Allows for returning a result object created within the transaction, that is, a domain object or a collection of domain objects. An exception thrown by the callback is treated as a fatal exception that enforces a rollback. Such an exception gets propagated to the caller of the template. In case of initialization or system errors. Perform a rollback, handling rollback exceptions properly. The object representing the transaction. The thrown application exception or error. Gets and sets the to be used. Exception thrown when a transaction can't be created using an underlying transaction API such as COM+. Rod Johnson Griffin Caprio (.NET) Base class for all transaction exceptions. Rod Johnson Griffin Caprio (.NET) Creates a new instance of the TransactionException class. Creates a new instance of the TransactionException class, with the specified message. A message about the exception. Creates a new instance of the TransactionException class with the specified message and root cause. A message about the exception. The root exception that is being wrapped. Creates a new instance of the TransactionException class. The that holds the serialized object data about the exception being thrown. The that contains contextual information about the source or destination. Creates a new instance of the class. Creates a new instance of the class. A message about the exception. Creates a new instance of the class. A message about the exception. The root exception that is being wrapped. Creates a new instance of the class. The that holds the serialized object data about the exception being thrown. The that contains contextual information about the source or destination. Exception that represents a transaction failure caused by heuristics. Rod Johnson Juergen Hoeller Griffin Caprio (.NET) The outcome state of the transaction: have some or all resources been committed? Returns a representation of the supplied . The value that is to be stringified. A representation. Creates a new instance of the class. Creates a new instance of the class. A message about the exception. Creates a new instance of the class. A message about the exception. The root exception that is being wrapped. Creates a new instance of the class with the specified and inner exception. The for the transaction. The inner exception that is being wrapped. Creates a new instance of the class. The that holds the serialized object data about the exception being thrown. The that contains contextual information about the source or destination. Override of to allow for private serialization. The that holds the serialized object data about the exception. The that contains contextual information about the source or destination. Returns the transaction's outcome state. Exception thrown when the existence or non-existence of a transaction amounts to an illegal state according to the transaction propagation behavior that applies. Juergen Hoeller Griffin Caprio (.NET) Creates a new instance of the class. Creates a new instance of the class. A message about the exception. Creates a new instance of the class. A message about the exception. The root exception that is being wrapped. Creates a new instance of the class. The that holds the serialized object data about the exception being thrown. The that contains contextual information about the source or destination. Exception that gets thrown when an invalid isolation level is specified, i.e. an isolation level that the transaction manager implementation doesn't support. Juergen Hoeller Griffin Caprio (.NET) Superclass for exceptions caused by inappropriate usage of a Spring.NET transaction API. Juergen Hoeller Griffin Caprio (.NET) Creates a new instance of the class. Creates a new instance of the class. A message about the exception. Creates a new instance of the class. A message about the exception. The root exception that is being wrapped. Creates a new instance of the class. The that holds the serialized object data about the exception being thrown. The that contains contextual information about the source or destination. Creates a new instance of the class. Creates a new instance of the class. A message about the exception. Creates a new instance of the class. A message about the exception. The root exception that is being wrapped. Creates a new instance of the class. The that holds the serialized object data about the exception being thrown. The that contains contextual information about the source or destination. Exception that gets thrown when an invalid timeout is specified, for example when the transaction manager implementation doesn't support timeouts. Juergen Hoeller Griffin Caprio (.NET) Invalid timeout value. Creates a new instance of the class with the specified message and timeout value. A message about the exception. The (possibly invalid) timeout value. Creates a new instance of the class. Creates a new instance of the class. A message about the exception. Creates a new instance of the class. A message about the exception. The root exception that is being wrapped. Creates a new instance of the class. The that holds the serialized object data about the exception being thrown. The that contains contextual information about the source or destination. Override of to allow for private serialization. The that holds the serialized object data about the exception. The that contains contextual information about the source or destination. Returns the invalid timeout for this exception. Exception thrown when attempting to work with a nested transaction but nested transactions are not supported by the underlying backend. Juergen Hoeller Griffin Caprio (.NET) Creates a new instance of the class. Creates a new instance of the class. A message about the exception. Creates a new instance of the class. A message about the exception. The root exception that is being wrapped. Creates a new instance of the class. The that holds the serialized object data about the exception being thrown. The that contains contextual information about the source or destination. Exception thrown when an operation is attempted that relies on an existing transaction (such as setting rollback status) and there is no existing transaction. This represents an illegal usage of the transaction API. Rod Johnson Griffin Caprio (.NET) Creates a new instance of the class. Creates a new instance of the class. A message about the exception. Creates a new instance of the class. A message about the exception. The root exception that is being wrapped. Creates a new instance of the class. The that holds the serialized object data about the exception being thrown. The that contains contextual information about the source or destination. Represents a transaction's current state. Griffin Caprio (.NET) The transaction state is unknown. The transaction has been committed. The transaction has been rolled back. The transaction is in an unknown, mixed state. Enumeration describing Spring.NET's transaction propagation settings. Griffin Caprio (.NET) Support a current transaction, create a new one if none exists.

Analogous to System.EnterpriseServices.TransactionOption value of the same name. This is typically the default setting of a transaction definition.

Support a current transaction, execute non-transactionally if none exists.

Analogous to System.EnterpriseServices.TransactionOption.Supported.

Support a current transaction, throw an exception if none exists.

No corresponding System.EnterpriseServices.TransactionOption value.

Create a new transaction, suspending the current transaction if one exists.

Analogous to System.EnterpriseServices.TransactionOption value of the same name.

Execute non-transactionally, suspending the current transaction if one exists.

Analogous to System.EnterpriseServices.TransactionOption value of the same name.

Execute non-transactionally, throw an exception if a transaction exists.

Analogous to System.EnterpriseServices.TransactionOption.Disabled.

Execute within a nested transaction if a current transaction exists, else behave like .

There is no analogous feature in TransactionOption.

Exception thrown when attempting to suspend an existing transaction but transaction suspension is not supported by the underlying backend. Juergen Hoeller Griffin Caprio (.NET) Creates a new instance of the class. Creates a new instance of the class. A message about the exception. Creates a new instance of the class. A message about the exception. The root exception that is being wrapped. Creates a new instance of the class. The that holds the serialized object data about the exception being thrown. The that contains contextual information about the source or destination. Exception thrown when a general transaction system error is encountered, for instance on commit or rollback. Juergen Hoeller Griffin Caprio (.NET) Creates a new instance of the class. Creates a new instance of the class. A message about the exception. Creates a new instance of the class. A message about the exception. The root exception that is being wrapped. Creates a new instance of the class. The that holds the serialized object data about the exception being thrown. The that contains contextual information about the source or destination. Exception to be thrown when a transaction has timed out. Create a new instance Creates a new instance of the class. A message about the exception. Creates a new instance of the class. A message about the exception. The root exception that is being wrapped. Creates a new instance of the class. The that holds the serialized object data about the exception being thrown. The that contains contextual information about the source or destination. Thrown when an attempt to commit a transaction resulted in an unexpected rollback. Rod Johnson Griffin Caprio (.NET) Creates a new instance of the class. Creates a new instance of the class. A message about the exception. Creates a new instance of the class. A message about the exception. The root exception that is being wrapped. Creates a new instance of the class. The that holds the serialized object data about the exception being thrown. The that contains contextual information about the source or destination.