Thx for the reply, in the end I got it working by changing the
deployment-model to perJVM.
No Instance of com.xxx.core.audit.Log is ever created (it's a static
singleton ) so maybe the aspect could never get bind wih the perinstance
setting?
Just a guess on my part..
Here is the working xml snippet
_____
From: Alexandre Vasseur [mailto:avasseur@gmail.com]
Sent: Thursday, November 08, 2007 4:39 PM
To: user@aspectwerkz.codehaus.org
Subject: Re: [aspectwerkz-user] trouble with static pointcuts 2.0
an "after returning" joinpoint kind on a "void method(stuff)" will likely
not match
use simply after perhaps
On Nov 7, 2007 10:36 PM, Michael Wyszinski < mike.wyszinski@gmail.com
> wrote:
All, I have several aspects running correctly in weblogic but, having
trouble advising a certain static method, I've tried several diff pointcut
definitions but it never works on this particular class. It has worked on a
similar non-static method..Any help to debug this would be appreciated
Here are the details
=====================================================
XML def
=====================================================
=====================================================
target
=====================================================
package com.xxx.core.audit;
public class Log
{
public static void setUser(String message)
{stuff.}
}
=====================================================
Aspect clas
=====================================================
import org.codehaus.aspectwerkz.AspectContext;
import org.codehaus.aspectwerkz.joinpoint.*;
public class GetUserAspect{
private static ThreadLocal userName = new ThreadLocal();
private AspectContext myAspectContext = null;
public NextgenGetUserAspect(AspectContext ac){
myAspectContext = ac;
System.out.println("test init->" +
myAspectContext.getParameter("test"));
}
public static void setUserName(String name) {
userName.set(name);
}
public static String getUserName() {
return (String) userName.get();
}
public Object storeUserName(StaticJoinPoint joinPoint) throws Throwable {
System.out.println("NextgenMonitoring SET USERNAME ");
return null;
}
}