• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

aop and transations

 
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
To do a great right, do a little wrong - shakepeare. twisted little ad:
Clean our rivers and oceans from home
https://www.kickstarter.com/projects/paulwheaton/willow-feeders
reply
    Bookmark Topic Watch Topic
  • New Topic