How does AspectJ trace the rmi impl Object? [message #24556] |
Mon, 11 August 2003 03:49  |
Eclipse User |
|
|
|
Originally posted by: zhangfan.sunyard.com
Hi!
I created a aspectj project in eclipse v3,
within a package named myrmi,
I created a RemoteInterface.java and RemoteInterfaceImpl.java
and aspect class Asj.java, and a rmi client class.
I want to trace the Server end RemoteInterfaceImpl.java object's
method calls.
when I create and bind a RemoteInterfaceImpl.java Object to Naming Context.
from the rmi client,
I invoke the method defined in RemoteInterface.java which implemented by
the RemoteInterfaceImpl.java,
the aspect class's code frag like following:
`
pointcut remoteCall(Object o):
(call(public * rmi.*.*(..))) && target(o);
before(Object o) : remoteCall(o){
System.out.println("before remoteCall " +
thisJoinPoint + " on " + o);
}
after(Object o) : remoteCall(o){
System.out.println("after remoteCall " +
thisJoinPoint + " on " + o);
}
`
but, the RemoteInterfaceImpl Object's method call can not being traced
by my aspect.
while at the client end, the aspect traced the call successfully, and
printed the message as shown upon.
anyone can give me the sollution to resolve this problem?
whether the aspect class can not trace the Server end Object's method
calls???
and help will be appreciated, thanks advanced!!! Please!!
|
|
|
|
Re: How does AspectJ trace the rmi impl Object? [message #24714 is a reply to message #24597] |
Fri, 15 August 2003 04:05  |
Eclipse User |
|
|
|
Originally posted by: zhangfan.sunyard.com
Rogers.Zhang wrote:
change the `call(public * myrmi.*.*(..))`
to `execution(public * myrmi.*.*(..))`
I can traced the remote method successfully
thanks to Williams.
> Rogers.Zhang wrote:
> at above, my question,
> the code fragment should be (package from rmi to myrmi):
> `
> pointcut remoteCall(Object o):
> (call(public * myrmi.*.*(..))) && target(o);
> before(Object o) : remoteCall(o){
> System.out.println("before remoteCall "
> + thisJoinPoint + " on " + o);
> }
> after(Object o) : remoteCall(o){
> System.out.println("after remoteCall "
> + thisJoinPoint + " on " + o);
> }
> `
|
|
|
Re: How does AspectJ trace the rmi impl Object? [message #569833 is a reply to message #24556] |
Mon, 11 August 2003 04:04  |
Eclipse User |
|
|
|
Originally posted by: zhangfan.sunyard.com
Rogers.Zhang wrote:
at above, my question,
the code fragment should be (package from rmi to myrmi):
`
pointcut remoteCall(Object o):
(call(public * myrmi.*.*(..))) && target(o);
before(Object o) : remoteCall(o){
System.out.println("before remoteCall "
+ thisJoinPoint + " on " + o);
}
after(Object o) : remoteCall(o){
System.out.println("after remoteCall "
+ thisJoinPoint + " on " + o);
}
`
|
|
|
Re: How does AspectJ trace the rmi impl Object? [message #569953 is a reply to message #24597] |
Fri, 15 August 2003 04:05  |
Eclipse User |
|
|
|
Originally posted by: zhangfan.sunyard.com
Rogers.Zhang wrote:
change the `call(public * myrmi.*.*(..))`
to `execution(public * myrmi.*.*(..))`
I can traced the remote method successfully
thanks to Williams.
> Rogers.Zhang wrote:
> at above, my question,
> the code fragment should be (package from rmi to myrmi):
> `
> pointcut remoteCall(Object o):
> (call(public * myrmi.*.*(..))) && target(o);
> before(Object o) : remoteCall(o){
> System.out.println("before remoteCall "
> + thisJoinPoint + " on " + o);
> }
> after(Object o) : remoteCall(o){
> System.out.println("after remoteCall "
> + thisJoinPoint + " on " + o);
> }
> `
|
|
|
Powered by
FUDForum. Page generated in 0.04839 seconds