[aspectj-users] Issue with generics

2009-12-29 Thread Michel Parisien
Hello, I have a problem that I tried boiling down to as small a code sample as possible. The following gives me the error "The method instanceOf(Class) is ambiguous for the type MyObject" on the "instanceOf" method call in the main method: public aspect MyAspect { public interface MyInter

[aspectj-users] ITD error with fields at runtime

2009-12-29 Thread Mario Scalas
Hi all, I found an odd error in my application and hope that someone here may give an explanation for this behavior. The problem is that I'm trying to enhance classes by inter-type declarations: // My enhancer aspect declares a fiew methods and a new field to be inserted into classes annotated w

Re: [aspectj-users] Aspectj scope Singleton, moitoring ?

2009-12-29 Thread Ramnivas Laddad
On Tue, Dec 29, 2009 at 9:40 AM, p...@ichthyostega.de wrote: ... > Regarding Aspects, there is only one general advice I can give, based on > my experience: You should be reluctant to do implementation-level stuff > from Advice. It is always better to invoke an API or an existing service. > (And

Re: [aspectj-users] AspectJ and code coverage?

2009-12-29 Thread Simone Gianni
Oh, by the way, I filled the Wiki with instructions on various ways of compiling AspectJ projects using maven, how to force a different version of AspectJ, how to use Cobertura, how to use AJDoc etc.. Nothing incredible, but at least it is all in a single place. Wim, I didn't incurred in your

Re: [aspectj-users] AspectJ and code coverage?

2009-12-29 Thread Simone Gianni
Hi Andy, sorry, I completely missed this mail of yours. It would be an improvement, a low priority one, to review how AspectJ assign source/line number attributes to the code it inlines in classes. This affects not only Cobertura (and any other coverage) reports, but also debugging and stack t

Re: [aspectj-users] Aspectj scope Singleton, moitoring ?

2009-12-29 Thread p...@ichthyostega.de
Jean-Louis.Pasturel schrieb: > so, for example,  if  i  increment counters, compute values ( average, > max, min, standard deviation...)  or write logs in a file, all these > part of codes *must* be synchronized as in a regular method. All these > values are shared between threads. basically yes,

Re: [aspectj-users] Aspectj scope Singleton, moitoring ?

2009-12-29 Thread Wim Deblauwe
Does it not depend where your aspect is interweaved? If you have joinpoints that are already in a synchronized section, then only 1 thread at a time will execute the advice and you don't need extra synchronization, right? regards, Wim 2009/12/29 Jean-Louis.Pasturel > thanks Ramnivas for the cl

Re: [aspectj-users] Aspectj scope Singleton, moitoring ?

2009-12-29 Thread Jean-Louis.Pasturel
thanks Ramnivas for the clarification, so, for example, if i increment counters, compute values ( average, max, min, standard deviation...) or write logs in a file, all these part of codes *must* be synchronized as in a regular method. All these values are shared between threads. Ramnivas