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

Hi Zhang,

Have you tried using the execution pointcut instead of the call?
Naturally, most Java RPC middleware implementations use reflection. Some
do have up calls from server skeletons which could be picked up by the
weaver.

I am still working my way through how various pointcuts are implemented
and what behavior and performance you can expect thus I must qualify any
advice.

Regards,

William Louth
JInspired
www.jinspired.com


From: "Zhang Fan&" <zhangfan@xxxxxxxxxxx>
To: aspectj-dev@xxxxxxxxxxx <aspectj-dev@xxxxxxxxxxx>
Date: Tue, 12 Aug 2003 0:28:5 +0800
Subject: [aspectj-dev] How does AspectJ trace remote methods of Objects
binded in  RMI runtime?
Reply-To: aspectj-dev@xxxxxxxxxxx
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