Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-dev] How does AspectJ trace remote methods of Objects binded in RMI runtime?

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 * 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);
	}

`

but, the RemoteInterfaceImpl Object's remote method calls defined by the interface
can not being traced by my aspect.
while at the client end, the aspect traced the call to the Remote Object's reference successfully, and printed the message as expected.

anyone can give me the sollution to resolve this problem?
whether the aspect class can not trace the Server end Object's method
calls???

the RMI runtime connect the C/S by stub/skel, if these conflicts with my needs?

and help will be appreciated, thanks advanced!!! Please!!




Back to the top