I'm using guice for dependency injection with aop from aopalliance. I can't quite figure out what's aopalliance all about and who implemented the version (dated from 2004) that's on their sourceforge page. Why is guice using this version instead of a more known package such as AspectJ?
Also, do you know of any tutorials on the aopalliance version?
Thanks
MethodInterceptor - MethodInterceptors are executed when a matching method is called. They can inspect the call: the method, its arguments, and the receiving instance. We can perform cross-cutting logic and then delegate to the underlying method. Finally, we may inspect the return value or exception and return.
Dependency Injection helps you decouple your application objects from each other and AOP helps you decouple cross-cutting concerns from the objects that they affect. AOP is like triggers in programming languages such as Perl, . NET, Java, and others. Spring AOP module provides interceptors to intercept an application.
This feature enables you to write code that is executed each time a matching method is invoked. It's suited for cross cutting concerns ("aspects"), such as transactions, security and logging. Because interceptors divide a problem into aspects rather than objects, their use is called Aspect Oriented Programming (AOP).
AOP Alliance is a set of interfaces that multiple frameworks implement (see AOP Alliance Motivations), including both Guice and Spring. AOP Alliance was chosen for Guice because it has a high capability and a simple API. The Guice wiki has an AOP guide.
AOP Alliance is a set of interfaces that multiple frameworks implement (see AOP Alliance Motivations), including both Guice and Spring.
AOP Alliance was chosen for Guice because it has a high capability and a simple API.
The Guice wiki has an AOP guide.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With