On 7/8/07, Dale Newfield <[EMAIL PROTECTED]> wrote:

Matt Raible wrote:
>> > The transaction boundaries are PROPOGATION_REQUIRED, which means
>> > "participate in a transaction if one exists, otherwise, start a new
>> > one".
>>
>> Where is this set?  I've tried to update my AppFuse1.9.4 based app to
>> use spring2, and I'm now thinking that I may have done that
>> incorrectly...
>>
>
> The following line does this:
>
> <aop:advisor id="managerTx" advice-ref="txAdvice"
> pointcut="execution(* *..service.*Manager.*(..))" order="2"/>
>
> It basically says, wrap any interface in the service package that ends
> with "Manager" with a transaction. Because of this, it's important to
> set your dependencies to interfaces, not to implementations.

That makes sense--thanks for the explanation.

PROPAGATION_REQUIRED is still not set anywhere, though--is that the
default mechanism, or do I need to change this part:

<tx:advice id="txAdvice">
   <tx:attributes>
     <tx:method name="*"/>
   </tx:attributes>
</tx:advice>

to instead say:

<tx:advice id="txAdvice">
   <tx:attributes>
     <tx:method name="*" propagation="REQUIRED"/>
   </tx:attributes>
</tx:advice>



You don't need to specify the "propogation" attribute because REQUIRED is
the default:

http://www.springframework.org/docs/reference/transaction.html#tx-method-settings

Matt

?

-Dale

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




--
http://raibledesigns.com

Reply via email to