The infrared-agent-all-servlet-2.4.1.BETA.jar,
infrared-agent-all-weblogic-.jar and
infrared-agent-all-jboss-2.4.1.BETA.jar jars that ship with
InfraRED all contain a META-INF\aop.xml
file that pertains to AspectJ. If you plan to use AspectWerkz instead of AspectJ, please
replace this file with the ones provided in props folder. servlet-aop.xml should go into
infrared-agent-all-servlet-2.4.1.BETA.jar and ejb-aop.xml
should go into infrared-agent-all-weblogic-2.4.1.BETA.jar and
infrared-agent-all-jboss-2.4.1.BETA.jar.
> cd %INFRARED_HOME%
> mkdir META-INF
> cd META-INF
> copy props\servlet-aop.xml .
> move servlet-aop.xml aop.xml
> cd ..
> jar -uvf infrared-agent-all-servlet-2.4.1.BETA.jar META-INF\aop.xml
> cd META-INF
> del aop.xml
> copy props\ejb-aop.xml .
> move ejb-aop.xml aop.xml
> cd ..
> jar -uvf infrared-agent-all-weblogic-2.4.1.BETA.jar META-INF\aop.xml
> jar -uvf infrared-agent-all-jboss-2.4.1.BETA.jar META-INF\aop.xml
The bootclasspath needs to be modified with an enhanced classloader implementation. This involves two steps:
InfraRED ships with an aspectwerkz-core-2.0.jar. Using that file, run the following commands:
> set CLASSPATH=%INFRARED_HOME%\aspectwerkz-core-2.0.jar;%JAVA_HOME%\lib\tools.jar
> java org.codehaus.aspectwerkz.hook.Plug -target %INFRARED_HOME%\enhanced.jar
This creates a file enhanced.jar in
INFRARED_HOME. (AspectWerkz documentation refers to this
as 'Prepared bootclasspath').
Prepend enhanced.jar created above to the bootclasspath, aappend aspectwerkz-core-2.0.jar to the bootclasspath, and add aspectwerkz and infrared jars to the classpath. The following section describes this for Weblogic, Tomcat and JBoss servers.
You need to edit the DOMAIN_HOME\startWeblogic.cmd(sh) or
DOMAIN_HOME\startManagedWeblogic.cmd(sh) file to add:
@REM Integrate InfraRED with Weblogic running on Sun 1.3/4 JVM
set JAVA_OPTIONS=-Xbootclasspath/p:%INFRARED_HOME%\enhanced.jar -Xbootclasspath/a:%INFRARED_HOME%\aspectwerkz-core-2.0.jar %JAVA_OPTIONS%
set CLASSPATH=%INFRARED_HOME%\infrared-aspectsystem-all-2.4.1.BETA.jar;%INFRARED_HOME%\infrared-agent-all-weblogic-2.4.1.BETA.jar;%CLASSPATH%
You can add these lines anywhere in the file before the command to launch the VM.
You need to:
edit the TOMCAT_HOME\bin\setclasspath.bat(sh) to add:
@REM Integrate InfraRED with Tomcat running on Sun 1.3/4 JVM
set JAVA_OPTS=-Xbootclasspath/p:%INFRARED_HOME%\enhanced.jar -Xbootclasspath/a:%INFRARED_HOME%\aspectwerkz-core-2.0.jar %JAVA_OPTS%
You can add these lines anywhere in the file.
INFRARED_HOME\infrared-aspectsystem-all-2.4.1.BETA.jar into TOMCAT_HOME\common\endorsed directory
infrared-agent-all-servlet-2.4.1.BETA.jar into
TOMCAT_HOME\common\lib directory.
You need to:
edit the JBOSS_HOME\run.bat(sh) to add:
@REM Integrate InfraRED with JBoss running on Sun 1.3/4 JVM
set JAVA_OPTS=-Xbootclasspath/p:%INFRARED_HOME%\enhanced.jar -Xbootclasspath/a:%INFRARED_HOME%\aspectwerkz-core-2.0.jar %JAVA_OPTS%
You can add these lines anywhere in the file before the command to launch the VM.
INFRARED_HOME\infrared-aspectsystem-all-2.4.1.BETA.jar into >JBOSS_HOME\lib\endorsed directory
INFRARED_HOME\infrared-agent-all-jboss-2.4.1.BETA.jar
into JBOSS_HOME\server\default\lib directory.