package org.apache.axis.session;

import org.apache.axis.transport.http.SimpleAxisServer;

aspect SessionDebug {
    pointcut whenToLog() :
        within(SimpleAxisServer) &&
        (call(* put*(..)) || call(* get*(..)) || call(* set*()));

    pointcut whenToLog2() :
        within(SimpleAxisServer) &&
        call(* put(..));

    before() : whenToLog() {
        System.out.println(thisJoinPoint.getSignature());
    }

    before() : whenToLog2() {
        Object[] args = thisJoinPoint.getArgs();
        System.out.println(args[0] + ", " + args[1]);
    }

    after() returning(Object x) : whenToLog()  {
        System.out.println(thisJoinPoint.getSignature() + "-->" + x);
    }
}
