Update of /cvsroot/springnet/Spring.Net/doc/reference/src
In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv17099
Modified Files:
ado.xml dbprovider.xml objects.xml transaction.xml
Log Message:
Add section on getting callbacks for transaction lifecycle
clarify usage of RETURN_VALUE for stored procedures, add additional section names for linking
misc updates
Index: transaction.xml
===================================================================
RCS file: /cvsroot/springnet/Spring.Net/doc/reference/src/transaction.xml,v
retrieving revision 1.24
retrieving revision 1.25
diff -C2 -d -r1.24 -r1.25
*** transaction.xml 16 Jan 2008 17:21:44 -0000 1.24
--- transaction.xml 24 Jan 2008 17:32:36 -0000 1.25
***************
*** 1819,1821 ****
--- 1819,1865 ----
not difficult to configure in Spring.</para>
</sect1>
+
+ <sect1>
+ <title>Transaction lifecycle and status information</title>
+
+ <para>You can query the status of the current Spring managed transaction
+ with the class <classname>TransactionSynchronizationManager</classname>.
+ Typical application code should not need to rely on using this class but
+ in some cases it is convenient to receive events around the lifecycle of
+ the transaction, i.e. before committing, after committing.
+ <classname>TransactionSynchronizationManager</classname> provides a method
+ to register a callback object that is informed on all significant stages
+ in the transaction lifecycle. Note that you can register for lifecycle
+ call back information for any of the transaction managers you use, be it
+ NHibernate or local ADO.NET transactions. </para>
+
+ <para>The method to register a callback with the
+ <classname>TransactionSynchronizationManager</classname> is </para>
+
+ <programlisting>public static void RegisterSynchronization( ITransactionSynchronization synchronization ) </programlisting>
+
+ <para>Please refer to the SDK docs for information on other methods in
+ this class.</para>
+
+ <para>The <classname>ITransactionSynchronization</classname> interface
+ is</para>
+
+ <programlisting>public interface ITransactionSynchronization
+ {
+
+ // Typically used by Spring resource management code
+ void Suspend();
+ void Resume();
+
+ // Transaction lifeycyle callback methods
+ // Typically used by Spring resource management code but maybe useful in certain cases to application code
+ void BeforeCommit( bool readOnly );
+ void AfterCommit();
+ void BeforeCompletion();
+ void AfterCompletion( TransactionSynchronizationStatus status );
+ }</programlisting>
+
+ <para>The <classname>TransactionSynchronizationStatus</classname> is an
+ enum with the values Committed, Rolledback, and Unknown.</para>
+ </sect1>
</chapter>
\ No newline at end of file
Index: ado.xml
===================================================================
RCS file: /cvsroot/springnet/Spring.Net/doc/reference/src/ado.xml,v
retrieving revision 1.22
retrieving revision 1.23
diff -C2 -d -r1.22 -r1.23
*** ado.xml 16 Jan 2008 17:21:44 -0000 1.22
--- ado.xml 24 Jan 2008 17:32:36 -0000 1.23
***************
*** 1966,1970 ****
<para>This DAO method may be combined with other DAO operations inside a
transactional context and they will all share the same
! connection/transaction objects. </para>
<para>There are two overloads of the method ApplyConnectionAndTx which
--- 1966,1970 ----
<para>This DAO method may be combined with other DAO operations inside a
transactional context and they will all share the same
! connection/transaction objects.</para>
<para>There are two overloads of the method ApplyConnectionAndTx which
***************
*** 2157,2161 ****
</sect2>
! <sect2>
<title id="ado-storedproc">Stored Procedure</title>
--- 2157,2161 ----
</sect2>
! <sect2 id="ado-stored-procedure">
<title id="ado-storedproc">Stored Procedure</title>
***************
*** 2211,2215 ****
to these methods can be a variable length argument list, in which case
the order must match the parameter order of the stored procedure. If the
! argument is an IDictionary it contains parameter key/value pairs.</para>
<para>The standard in/out parameters for the stored procedure can be set
--- 2211,2217 ----
to these methods can be a variable length argument list, in which case
the order must match the parameter order of the stored procedure. If the
! argument is an IDictionary it contains parameter key/value pairs. Return
! values from stored procedures are contained under the key
! "<literal>RETURN_VALUE</literal>".</para>
<para>The standard in/out parameters for the stored procedure can be set
***************
*** 2251,2255 ****
you do not want to follow this loose shorthand convention, you can call
the method <literal>QueryByNamesParameters</literal> instead passing in
! a IDictionary of parameter key/value pairs.</para>
<para>The <classname>StoredProcedure</classname> class is threadsafe
--- 2253,2260 ----
you do not want to follow this loose shorthand convention, you can call
the method <literal>QueryByNamesParameters</literal> instead passing in
! a IDictionary of parameter key/value pairs. If you would like to have
! the return value of the stored procedure included in the returned
! dictionary, pass in <literal>true</literal> as a method parameter to
! <literal>DeriveParameters</literal>().</para>
<para>The <classname>StoredProcedure</classname> class is threadsafe
***************
*** 2263,2270 ****
<classname>IResultSetExtractor</classname> callback interfaces via the
<literal>AddRowCallback</literal> and
! <literal>AddResultSetExtractor</literal> methods. These apply to</para>
!
! <para>Return values from stored procedures are contained under the key
! "RETURN_VALUE".</para>
<para>The generic version of StoredProcedure is in the namespace
--- 2268,2272 ----
<classname>IResultSetExtractor</classname> callback interfaces via the
<literal>AddRowCallback</literal> and
! <literal>AddResultSetExtractor</literal> methods.</para>
<para>The generic version of StoredProcedure is in the namespace
Index: objects.xml
===================================================================
RCS file: /cvsroot/springnet/Spring.Net/doc/reference/src/objects.xml,v
retrieving revision 1.116
retrieving revision 1.117
diff -C2 -d -r1.116 -r1.117
*** objects.xml 18 Jan 2008 17:39:43 -0000 1.116
--- objects.xml 24 Jan 2008 17:32:36 -0000 1.117
***************
*** 2817,2821 ****
web-aware ApplicationContext).</para>
! <para> The scopes supported out of the box are listed below:</para>
<table frame="all">
--- 2817,2821 ----
web-aware ApplicationContext).</para>
! <para>The scopes supported out of the box are listed below:</para>
<table frame="all">
***************
*** 4174,4178 ****
<classname>PropertyPlaceholderConfigurer</classname> refers to these
two sections via a comma delimited list of section names in the
! <literal>configSections</literal> property.</para>
<para>The <classname>PropertyPlaceholderConfigurer</classname> class
--- 4174,4180 ----
<classname>PropertyPlaceholderConfigurer</classname> refers to these
two sections via a comma delimited list of section names in the
! <literal>configSections</literal> property. If you are using section
! groups, prefix the section group name, for example
! myConfigSection/DaoConfiguraiton.</para>
<para>The <classname>PropertyPlaceholderConfigurer</classname> class
***************
*** 4400,4404 ****
<para>The <classname>Spring.Objects.Factory.IFactoryObject</classname>
interface is to be implemented by objects that <emphasis>are themselves
! factories</emphasis>. </para>
<para>The <literal>IFactoryObject</literal> interface is a point of
--- 4402,4406 ----
<para>The <classname>Spring.Objects.Factory.IFactoryObject</classname>
interface is to be implemented by objects that <emphasis>are themselves
! factories</emphasis>.</para>
<para>The <literal>IFactoryObject</literal> interface is a point of
***************
*** 4433,4437 ****
</itemizedlist></para>
! <para><classname>IFactoryObject</classname> </para>
<para>The IFactoryObject concept and interface is used in a number of
--- 4435,4439 ----
</itemizedlist></para>
! <para><classname>IFactoryObject</classname></para>
<para>The IFactoryObject concept and interface is used in a number of
***************
*** 5413,5417 ****
creating the configuration metadata, i.e., implementations of
RootObjectDefinition, etc. Note a web version of this application class
! has not yet been implemented. </para>
<para>An example, with a<emphasis> yet to be created</emphasis> DLL
--- 5415,5419 ----
creating the configuration metadata, i.e., implementations of
RootObjectDefinition, etc. Note a web version of this application class
! has not yet been implemented.</para>
<para>An example, with a<emphasis> yet to be created</emphasis> DLL
Index: dbprovider.xml
===================================================================
RCS file: /cvsroot/springnet/Spring.Net/doc/reference/src/dbprovider.xml,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -d -r1.16 -r1.17
*** dbprovider.xml 16 Jan 2008 17:21:44 -0000 1.16
--- dbprovider.xml 24 Jan 2008 17:32:36 -0000 1.17
***************
*** 244,250 ****
property DBPROVIDER_ADDITIONAL_RESOURCE_NAME in
<classname>DbProviderFactory</classname> to a Spring resource location.
! The default value is <code>file://dbProviders.xml</code>. This crude
! mechanism will eventually be replaced with one based on a custom
! configuration section in App.config/Web.config.</para>
<para>It may happen that the version number of an assembly you have
--- 244,251 ----
property DBPROVIDER_ADDITIONAL_RESOURCE_NAME in
<classname>DbProviderFactory</classname> to a Spring resource location.
! The default value is <code>file://dbProviders.xml</code>. (That isn't a
! typo, there is a difference in case with the name of the embedded
! resource). This crude mechanism will eventually be replaced with one based
! on a custom configuration section in App.config/Web.config.</para>
<para>It may happen that the version number of an assembly you have
|