|Referencing current class in an advice [message #70726]
||Wed, 31 October 2007 10:15
Originally posted by: jayjj.gmail.com|
I am using AspectJ for verifying preconditions within a call to a
service's business operation method. So, to do this I use around(), which
- when entering, the preconditions applying have to be verified by calling
the methods. The method names of the preconditions are in a database
(cached). They should be called by reflection.
- the problems I have are:
a) for using reflection, I have to be able to reference the class' name.
Unfortunately, "this" - within an aspect's advice means a reference to the
aspect or the advice. But not the class in which the operation currently
b) the project is a JBoss Seam project. The Jboss Seam component
incorporating the service is annotated to be a stateless session bean. So
I wonder whether:
b1) AspectJ and Jboss Seam components will have conflicts (Seam uses
annotations and maybe other technologies which might conflict with AspectJ)
b2) how to integrate AspectJ in a Jboss Seam project - when trying to
create an aspect in my Jboss Seam project, it complains that this is not
an AspectJ project
b3) what I should look out for when deploying the project (the aspects
should be "weaved" into the code at precompile- or compile-time.
Powered by FUDForum
. Page generated in 0.01728 seconds