jQuery in Action, 2nd edition*
The moose likes Spring and the fly likes Spring Transaction Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "Spring Transaction" Watch "Spring Transaction" New topic
Author

Spring Transaction

Shasi Mitra
Ranch Hand

Joined: Nov 27, 2008
Posts: 101

Hi, I have to "update" a table and get the same data from the table in one transaction. The problem here is, unless the "update " transaction is committed i cannot fetch the data. This is my code
<aop:config>
<aop:pointcut id="allServicesOperation" expression="execution(* com.interfaces.*Services.*(..))"/>
<aop:advisor advice-ref="transactionAdvice" pointcut-ref="allServicesOperation"/>
</aop:config>
I have the two statements in one method in my Services class.
I think ibatis is taking one connection each for update and select. How can i use the same connection object so that i can update and select the same data in the same transaction.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Spring Transaction
 
Similar Threads
Spring 2.5 - Rolling back first method, when the second method throws Runtime ex
Transcation management at DO level using spring jdbc framework
Hibernate error with Spring MVC
Transaction doesn't rollback
Spring and namespace-aware parser