Fabio, You have a number of choices: 1. Code an aspect, possibly a concrete one that extends a common abstract implementation, for each application you intend to load-time weaver e.g. App1Trace, App2Trace, ... Package all the aspects together (in TraceApp) but control which is used via a separate META-INF/aop.xml at run time. 2. Code separate aspects as in (1) but package each one with the application it weaves instead i.e. App1 contains App1Trace. I prefer this solution because the aspects should be considered part of your application even if they are not actually used. 3. Code an abstract aspect then make it concrete using an aspect declared in aop.xml. Edit or use a different aop.xml for each application.
All documentation for LTW can be found here: http://www.eclipse.org/aspectj/doc/released/devguide/ltw.html. Matthew Webster AOSD Project Java Technology Centre, MP146 IBM Hursley Park, Winchester, SO21 2JN, England Telephone: +44 196 2816139 (external) 246139 (internal) Email: Matthew Webster/UK/IBM @ IBMGB, [EMAIL PROTECTED] http://w3.hursley.ibm.com/~websterm/ Fabio Fagundes Silveira <[EMAIL PROTECTED]> Sent by: [EMAIL PROTECTED] 19/12/2006 13:07 Please respond to [email protected] To [email protected] cc Subject Re: [aspectj-users] defining pointcuts in a configuration file .... Hi Matthew, Yes ... I change it ... Let me try to be a little bit more clear ... Let's say that I want to trace App1 and pointcut of interest is: pointcut logObjectCalls() : execution(* App1.method1(..)) && execution(* App1.method2(..)); So, I run: [EMAIL PROTECTED] ~]$ java -jar TraceApp App1 So far so good ... But now, I want to trace App2 and pointcut of interest is: (note that it has changed...) pointcut logObjectCalls() : execution(* App2.met*(..)) && execution(* App2.foo*(Object)); So I run: [EMAIL PROTECTED] ~]$ java -jar TraceApp App2 Currently, I have to change logObjectCall poincut and recompile TraceApp. What I really would like to do is get the poincuts from a file, so that I would not need recompile it ... Is there any way? Thank you, Fabio Matthew Webster wrote: > > Fabio, > > What is it that you are changing from one run of you application to the > next? LTW allows you to run an application with one (possibly empty) set > of aspects and then run again with a different set, without having to > rebuild the application, simply by changing the aop.xml. Do you also > what to change the implementation of the aspect(s) between runs? > > Matthew Webster > AOSD Project > Java Technology Centre, MP146 > IBM Hursley Park, Winchester, SO21 2JN, England > Telephone: +44 196 2816139 (external) 246139 (internal) > Email: Matthew Webster/UK/IBM @ IBMGB, [EMAIL PROTECTED] > http://w3.hursley.ibm.com/~websterm/ > > > *Fabio Fagundes Silveira <[EMAIL PROTECTED]>* > Sent by: [EMAIL PROTECTED] > > 19/12/2006 10:46 > Please respond to > [email protected] > > > > To > [email protected] > cc > > Subject > [aspectj-users] defining pointcuts in a configuration file .... > > > > > > > > > Hello, > > Is there any way to define a set of pointcuts in a external > configuration file? I meant, use something like: > > pointcut logObjectCalls() : execution(***from config file****); > > > This way (using LTW), it would *not* be necessary recompile an tracer > application, for instance, every time I change the target application ... > > Currently, I am using my trace application this way: > > [EMAIL PROTECTED] ~]$ java -jar TraceApp AppToBeTraced > > > TIA, > Fabio _______________________________________________ aspectj-users mailing list [email protected] https://dev.eclipse.org/mailman/listinfo/aspectj-users
_______________________________________________ aspectj-users mailing list [email protected] https://dev.eclipse.org/mailman/listinfo/aspectj-users
