How to launch the AspectJ agent at runtime?   Is the AspectJ 1.6.8 support 
launching the Agent at runtime?

I read in some article that to launch the agent at runtime the Agent jar's 
manifest should contain "Agent-Class" attribute while list the Agent class 
which can be invoked at runtime.  But when I looked into manifest file there is 
no "Agent-Class" entry in AspectJ 1.6.8.  Is there is support in future release 
to add this attribute to manifest file?

 

Thanks,

Santhosh

 

 

       

 

From: Santhosh Thatipally 
Sent: Wednesday, June 16, 2010 9:58 AM
To: [email protected]
Subject: RE: [aspectj-users] How to lauch aspectjweaver at runtime?

 

Hi Simone,

 

       We are having the build time weaving option.  But, once the WAR file is 
deployed we can update the WAR file with custom extension points having 
aop.xml.  The we redeploy this WAR file.

 

        If we use the JVM's javaagent for weaving, we need to restart the 
application instead of redeploy. 

 

       So, I'm planning to launch the AspectJ agent at runtime.  I read in some 
article that to launch the agent at runtime the Agent jar's manifest should 
contain "Agent-Class" attribute while list the Agent class which can be invoked 
at runtime.  

 

       Is this possible in AspjectJ 1.6.8? If not, in current scenario how can 
I avoid restart of WAR? 

 

Thanks,

Santhosh

 

From: Simone Gianni [mailto:[email protected]] 
Sent: Wednesday, June 16, 2010 4:07 AM
To: [email protected]
Subject: Re: [aspectj-users] How to lauch aspectjweaver at runtime?

 

Hi Santhosh,
you have two options:
- control the class loading of your servlets and use one of the weaving 
classloaders provided by AspectJ.
- weave all the JARs and the classes in your WAR at build time, and deploy a 
WAR with aspects already weaved in, using ajc (command line, ant task, or maven 
plugin), and the inpath option.

I prefer the second option : 
- taking control of classloading in a JEE environment is never a "good thing"
- the weaver has a memory footprint, it is not important during build, but can 
be during runtime
- the weaver introduces a startup delay (cause classes are weaved while 
loaded), from something monolithic like a WAR it's better to spend that time 
during the build than at each deploy of the webapp


Simone

2010/6/15 Santhosh Thatipally <HYPERLINK 
"mailto:[email protected]"[email protected]>

We are using the aspjectJ 1.6.8 version and currently we are launching it using 
the JVM -javaagent option.

 

How we can launch the aspect weaver at runtime? Like from a servlet.

 

Thanks,

Santhosh

 

 


_______________________________________________
aspectj-users mailing list
HYPERLINK "mailto:[email protected]"[email protected]
https://dev.eclipse.org/mailman/listinfo/aspectj-users

 
_______________________________________________
aspectj-users mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/aspectj-users

Reply via email to