Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] Request for help with AspectJ in distributed environment

I think the problem (without the remoting part) sounds vaguely familiar from this mailing list as well as StackOverflow.

As for remoting, if you want to keep state (e.g. the GUID) you need to transfer that state. Depending on your situation you might be able to use ITD in order to introduce a GUID member into RMI classes or into other types of (un-)marshalled or (de-)serialised objects before transfer. The ITD weaving would have to be done on both sides of the communication, of course. Maybe it is even simpler if you can introduce the request ID (GUID) via a general-purpose set or map/dictionary  meant to transfer request parameters, if something like this exists in your environment.

In order to get a more specific answer probably you would need to show the code (preferred) or describe it in much more detail (only second best).

Kind regards
-- 
Alexander Kriegisch
http://scrum-master.de


Reshma Gupta schrieb am 05.11.2014 20:23:

> Problem Statement
> 
> We are trying to build a solution using AspectJ to trace the method calls, class name, host name, application name and corresponding response time. Each request is being tied with a unique ID (GUID) to group together all method calls as part of each request. This is being done in our code using ThreadLocal and Java UUID. The aspectJ weaving and binding of GUID is working fine if all the method call corresponding to the request is within same JVM. However, GUID is lost if the call is made from one JVM to the other ( webservices call or RMI calls kind of ). This is kind of a solution similar to dyna trace. Please suggest your guidance or solution to it. Please note we cannot touch application code as we dont have access to it. We are just trying to weave the existing apps.



Back to the top