wood burning stoves 2.0*
The moose likes Spring and the fly likes Making specific method non transactional in Spring Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "Making specific method non transactional in Spring" Watch "Making specific method non transactional in Spring" New topic
Author

Making specific method non transactional in Spring

samir ware
Ranch Hand

Joined: Jul 27, 2005
Posts: 192
Hello Ranchers
I have a spring application which is based on Spring Batch. By default spring batch introduces transaction for its steps. There are certain stages where I don't really need transaction to be enabled. Because transaction is enabled unnecessary for these methods its giving me some runtime errors as I am making call to two different databases in one method.

Is there any annotation which spring provides to DISABLE transaction for a specific set of methods ?

I am even open to the solution which can disable transaction globally.
Any link , paper will greatly be appreciated.
Thanks in advance
Samir


samir ware
Ranch Hand

Joined: Jul 27, 2005
Posts: 192
In a nutshell I want to call some method which does not need to be transactional from a transactional method.

Is there any way I can do it ?

Thanks
Samir
Bill Gorder
Bartender

Joined: Mar 07, 2010
Posts: 1648
    
    7

have a look at the propation types. In particual NOT_SUPPORTED

http://static.springsource.org/spring/docs/3.2.x/javadoc-api/org/springframework/transaction/annotation/Propagation.html#NOT_SUPPORTED



[How To Ask Questions][Read before you PM me]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Making specific method non transactional in Spring
 
Similar Threads
Hibernate Transactions
Problem with ehcache
AutoCommit Issue while using JDBCTemplate
DropDown Disabled.
Jquery Event Sequence