• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Spring Transaction using Spring AOP

 
Ranch Hand
Posts: 70
  • 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..



 
Author
Posts: 12617
IntelliJ IDE Ruby
  • 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
  • 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 :(
 
Ranch Hand
Posts: 85
Spring Java
  • 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
  • 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
Spring Java
  • 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.
 
And when my army is complete, I will rule the world! But, for now, I'm going to be happy with this tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic