File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Spring Transaction using Spring AOP

 
Jayaraj Jaganathan
Ranch Hand
Posts: 70
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 12617
IntelliJ IDE Ruby
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Define the methods being wrapped at a higher level, like the package?
 
Jayaraj Jaganathan
Ranch Hand
Posts: 70
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 85
Java Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
does it give any exception while loading or simply the interceptor dosent run ?
 
Jayaraj Jaganathan
Ranch Hand
Posts: 70
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 85
Java Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic