Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » AJDT » How does AspectJ trace the rmi impl Object?
How does AspectJ trace the rmi impl Object? [message #24556] Mon, 11 August 2003 07:49 Go to next message
Eclipse UserFriend
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 #24597 is a reply to message #24556] Mon, 11 August 2003 08:04 Go to previous messageGo to next message
Eclipse UserFriend
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 #24714 is a reply to message #24597] Fri, 15 August 2003 08:05 Go to previous message
Eclipse UserFriend
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 08:04 Go to previous message
Eclipse UserFriend
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 08:05 Go to previous message
Eclipse UserFriend
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);
> }
> `
Previous Topic:Disabling debugging aspects
Next Topic:Disabling debugging aspects
Goto Forum:
  


Current Time: Fri Feb 23 02:03:22 GMT 2018

Powered by FUDForum. Page generated in 0.01901 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software