File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Spring and the fly likes aop and transations Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "aop and transations" Watch "aop and transations" New topic
Author

aop and transations

gianluca gian
Ranch Hand

Joined: Aug 14, 2009
Posts: 31
hi, I have the following situation, I begin a spring transaction and I write something on a database table like:

Boolean result = (Boolean)tt.execute(new TransactionCallback() {
public Object doInTransaction(TransactionStatus status) {

daoMethodInsert(record) Insert record in a table of database

.......................
return;
}});


when the method daoMethodInsert is called an Aop request is made on methodAop(), another method in another class. My question is, if i read the same record inserted on method daoMethodInsert(), will I be locked because of transaction or not?

the aop definition is:
<aop:config>
<aop:aspect ref="service">
<aop:pointcut id="storicoPointcut" expression="execution(* *.daoMethodInsert(..)) and target(bean)"/>
<aop:after method="methodAop" pointcut-ref="storicoPointcut" arg-names="bean"/>
</aop:aspect>
</aop:config>

Bye
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: aop and transations
 
Similar Threads
Spring AOP question
Spring Aop
AOP does not works!
How to Use Spring AOP for Auditing?
Hello world spring aop