Meaningless Drivel is fun!*
The moose likes Spring and the fly likes Spring Transaction using Spring AOP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "Spring Transaction using Spring AOP" Watch "Spring Transaction using Spring AOP" New topic
Author

Spring Transaction using Spring AOP

Jayaraj Jaganathan
Ranch Hand

Joined: Jun 29, 2009
Posts: 70
i have configured Spring Transaction using Spring AOP

please find the code below




i don't like to configure the below code for every new dao class .
is there any solution ? please help me . thanks in advance..



David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Define the methods being wrapped at a higher level, like the package?
Jayaraj Jaganathan
Ranch Hand

Joined: Jun 29, 2009
Posts: 70
David Newton wrote:Define the methods being wrapped at a higher level, like the package?


do you say configure like as below ?




but it's not working :(
Vivek K Singh
Ranch Hand

Joined: Dec 22, 2009
Posts: 85

does it give any exception while loading or simply the interceptor dosent run ?


SCJP 6
Jayaraj Jaganathan
Ranch Hand

Joined: Jun 29, 2009
Posts: 70
Vivek K Singh wrote:does it give any exception while loading or simply the interceptor dosent run ?


it throws a exception that class not found
Vivek K Singh
Ranch Hand

Joined: Dec 22, 2009
Posts: 85

Try putting the interface to all the DAOImpl classes in the source property like:




If you are using java 1.5 / Spring 2.5 then you can annotate the class/methods with @Transactional



and define the bean as:



The AnnotationTransactionAttributeSource works with spring 2.0 as well, You will have to check the documentation for that.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Spring Transaction using Spring AOP