"jayzaw" wrote : 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
executes.
This is more of an AspectJ question, but yes, you will have to use the reflection
utilities provided by AspectJ to retrieve the class name. Something like:
| thisJoinPointStaticPart.getSignature().getDeclaringType().getName();
|
"jayzaw" wrote :
| b1) AspectJ and Jboss Seam components will have conflicts (Seam uses annotations and
maybe other technologies which might conflict with AspectJ)
|
There should not be any conflicts as far as I know. I used annotations with an AspectJ
implementation in a previous project and there where not any issues (of course I was using
Spring/Hibernate so I could not speak to Seam specifically). The only time annotations
should come into the picture is if you want to act on the annotation within your aspect.
"jayzaw" wrote : 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
Hmm... sounds like this is your IDE complaining? You should be able to add an aspect
without any issues, simply use ajc for compilation.
"jayzaw" wrote : b3) what I should look out for when deploying the project (the
aspects should be "weaved" into the code at precompile- or compile-time.
Yes, simply make sure to use ajc for compilation and the classes become plain-old Java
byte code. Of course make sure you have the appropriate AspectJ libraries available at
run-time for calls to the AspectJ APIs (reflection calls, etc).
Hope that helps.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4100690#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...