[jboss-user] [JBoss AOP] - execution pointcut....class context?

robotics80 do-not-reply at jboss.com
Thu Dec 28 09:29:08 EST 2006


My question is if I have an example class like this:

class A {
  |    private Log objLog;
  |    
  |    public A(String logFile){
  |       objLog = new Log(logFile);
  |    }
  |    
  |    //some methods....
  | }

And I have a pointcut like this in my jboss-aop.xml file:

<pointcut name="logObject" expr="execution(public Log->new(..))"/>

Is there any way to know, in my Interceptor class by the method invocation, the class where It is invoked the contructor of the Log object (in this example class A)?
I ask this because if I use a pointcut like:

<pointcut name="logObject" expr="call(public Log->new(..))"/>

I have a NullPointerException in method _getInstanceAdvisor() that I think is an internal error of Jboss AOP library.
I use Java 1.5 and Jboss AOP 1.5.2 GA with load time weaving an -javaagent option enabled.
Is there anyone with this problem?
Thanks a lot.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3996644#3996644

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3996644



More information about the jboss-user mailing list