Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] lauching applications from another one with load-time weaving

Hi Matthew,

   At first, thanks for your reply.
   Ok, let me try to explain what I really need to do ...

   I have an application (eg. App) that needs to lauch another
application (eg. Test). "Test" has some aspects applied to it, all of
them correctly specified in aop.xml. If I run:

 "[ffs@aston]$ java -javaagent:/opt/aspectj/lib/aspectjweaver.jar Test"

  everything works nice!!

  Now, let's suppose that the other application "App" creates another
aspect (it writes the source code into a file, eg. called NewAspect.aj).
This new aspect should be woven (LTW) with "Test". So, what I really
need now is to lauch "Test" with all of your aspects (as I did before,
but including this new NewAspect just created as well) from the main
method of "App".

  May you help me? ;-)

Thank you very much,
Fabio

Matthew Webster wrote:
> 
> Fabio,
> 
> Dynamic class loading is tricky. If you combine that with LTW then
> things get tricker so I suggest you keep it as simple as possible. May I
> ask what you are trying to do? There may already be some tools that do
> it for you. Most importantly if you write an aspect that targets a
> particular class, you generate an aop.xml file for it (using -outxml),
> start the JVM with the AspectJ LTW agent and load the class as you have
> described below then it will be woven.
> 
> 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, matthew_webster@xxxxxxxxxx
> http://w3.hursley.ibm.com/~websterm/
> 
> 


Back to the top