Update of /cvsroot/springnet/Spring.Net/examples/Spring/Spring.TxQuickStart/test/Spring/Spring.TxQuickStart.Tests/TxQuickStart
In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv27897/examples/Spring/Spring.TxQuickStart/test/Spring/Spring.TxQuickStart.Tests/TxQuickStart
Modified Files:
DTCAppContext.xml
Log Message:
TxExample - fix exception advice dsl - was using old syntax, add logging advice in addition
Add change in exception translation dsl to breaking changes.
Index: DTCAppContext.xml
===================================================================
RCS file: /cvsroot/springnet/Spring.Net/examples/Spring/Spring.TxQuickStart/test/Spring/Spring.TxQuickStart.Tests/TxQuickStart/DTCAppContext.xml,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** DTCAppContext.xml 9 Aug 2007 06:30:17 -0000 1.8
--- DTCAppContext.xml 13 Oct 2007 22:10:44 -0000 1.9
***************
*** 8,11 ****
--- 8,15 ----
<!-- Available Catalogs: CreditsAndDebits, Credits, Debits -->
+ <!-- Step 1: Change to use CreditsAndDebits catalog -->
+ <!-- Step 2: Create alias and comment out CreditDbProvider -->
+ <!-- Step 3: Change tx manager AdoPlatformTransactionManager -->
+
<db:provider id="DebitDbProvider"
provider="System.Data.SqlClient"
***************
*** 16,19 ****
--- 20,26 ----
connectionString="Data Source=MARKT60\SQL2005;Initial Catalog=Credits;User ID=springqa; Password=springqa"/>
+ <!--
+ <alias name="DebitDbProvider" alias="CreditDbProvider"/>
+ -->
<!-- Transaction Manager if using a single database that contain both credit and debit tables -->
***************
*** 46,50 ****
<property name="AccountCreditDao" ref="accountCreditDao"/>
<property name="AccountDebitDao" ref="accountDebitDao"/>
! <property name="ThrowException" value="true"/>
</object>
--- 53,57 ----
<property name="AccountCreditDao" ref="accountCreditDao"/>
<property name="AccountDebitDao" ref="accountDebitDao"/>
! <property name="ThrowException" value="false"/>
</object>
***************
*** 57,64 ****
<property name="exceptionHandlers">
<list>
! <value>on ArithmeticException log 'Logging an exception thrown from method ' + #method.Name </value>
</list>
</property>
</object>
<object id="txAttributePointcut" type="Spring.Aop.Support.AttributeMatchMethodPointcut, Spring.Aop">
--- 64,82 ----
<property name="exceptionHandlers">
<list>
! <value>on exception name ArithmeticException log 'Logging an exception thrown from method ' + #method.Name </value>
</list>
</property>
</object>
+
+ <object name="loggingAdvice" type="Spring.Aspects.Logging.SimpleLoggingAdvice, Spring.Aop">
+ <property name="logUniqueIdentifier" value="true"/>
+ <property name="logExecutionTime" value="true"/>
+ <property name="logMethodArguments" value="true"/>
+ <property name="Separator" value=";"/>
+
+ <property name="HideProxyTypeNames" value="true"/>
+ <property name="UseDynamicLogger" value="true"/>
+ <property name="LogLevel" value="Info"/>
+ </object>
<object id="txAttributePointcut" type="Spring.Aop.Support.AttributeMatchMethodPointcut, Spring.Aop">
***************
*** 72,75 ****
--- 90,98 ----
advice-ref="exceptionAdvice"
pointcut-ref="txAttributePointcut"/>
+
+ <aop:advisor id="loggingAdvisor" order="2"
+ advice-ref="loggingAdvice"
+ pointcut-ref="txAttributePointcut"/>
+
</aop:config>
|