Hi friends,
I have a question regarding spring transaction using AOP.
I can able to declare an transaction advice in spring.xml and able to apply the advice to respective methods using pointcut.
Here transactionAdvice(txAdvice) is applied to all methods starting with book present in org.simple.service.TicketBookingService.
But,
I would like to use annotation.So what i did is
This is also working fine.
Now what I feel is,here @Transactional is repeated in all methods which is starting with book.So i would like to put in some common area.
So I did the following,
1.
in spring.xml,by mentioning this spring will scan for aspect components.
2.
I created a class called TransactionLoggingAspect.
My question is,
what is the annotation equivalent of the above "txAdvice"?
In TransactionLoggingAspect.java,Where I can put the annotation equivalent?
In spring tutorial,
http://static.springsource.org/spring/docs/3.0.x/reference/transaction.html
they have mentioned for XML part,which is working fine.
But I am searching for annotation part.But not found.
Please help me in this issue.
Regards,
Anand