Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-dev] passing local state between join points?

Hello,

I've seen examples that achive this by storing partial state of the stack
frame in member fields... but this seems like overkill when all I want to
do is keep values on the stack frame within a single method call.

Moreover, when multiple threads invoke an object it seems that i need to
use synchronization because I don't create the threads; Tomcat creates
them.

For example I have many methods of the form:

public void g()  {

jp1:  Long t1 = System.getCurrentTime();

      ...

jp2:  Long t2 = System.getCurrentTime() - t1;
}

I want t1 available at join point 2 without storing t1 into a member field.

Does AspectJ provide a mechanism for this?

Thanks in advance,
Nic.


This message and any attachments (the "message") is 
intended solely for the addressees and is confidential. 
If you receive this message in error, please delete it and
immediately notify the sender. Any use not in accord with
its purpose, any dissemination or disclosure, either whole
or partial, is prohibited except formal approval. The internet
can not guarantee the integrity of this message.
BNP PARIBAS (and its subsidiaries) shall (will) not
therefore be liable for the message if modified. 

**********************************************************************************************

BNP Paribas Private Bank London Branch is authorised
by CECEI & AMF and is regulated by the Financial Services
Authority for the conduct of its investment business in
the United Kingdom.

BNP Paribas Securities Services London Branch is authorised 
by CECEI & AMF and is regulated by the Financial Services 
Authority for the conduct of its investment business in 
the United Kingdom.
  
BNP Paribas Fund Services UK Limited is authorised and 
regulated by the Financial Services Authority



Back to the top