• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Spring AOP

 
Ranch Hand
Posts: 441
2
Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In Spring AOP, what kind of weaving is used: Load Time, Compile Time or Run Time? And, how about AspectJ?
 
Saloon Keeper
Posts: 27808
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
To the best of my knowledge, it's your choice.

I haven't done much with Spring AOP directly, but apparently it's used internally in Spring JPA, so I've had to explicitly specify a weaver in my Tomcat server configuration when using Spring JPA and JavaServer Faces.
 
Bartender
Posts: 1155
20
Mac OS X IntelliJ IDE Oracle Spring VI Editor Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In spring aop it is run time weaving for the beans as you are using dynamic proxies that are returned by the container.  
There are two major limitations of spring aop; it only applies to public methods and only on spring beans (actually its the bean proxies that you use to access the spring beans).
   
I've not used AspectJ much, but have read that it's a more complete solution offering more features and compile time / class load time weaving.
Hopefully you will not be surprised to hear that spring offers aspectj integration.  

Here's a decent article comparing the two; Spring aop vs Aspectj
 
reply
    Bookmark Topic Watch Topic
  • New Topic