InfraRED can work with other servers, especially servlet containers, but we have not actively tested it in those environments. Please drop us a note on the forums if you need support on other servers. We would be delighted to help you.
Note: The installation steps described here is one way to integrate InfraRED with an application. There is a second, automated way of doing it using an Ant task. It is recommended that you try the steps described below, get InfraRED working with the application, and then later move on to the Ant-based integration.
In general, integrating InfraRED with an application involves four steps:
Download InfraRED latest release from
SourceForge.
Unzip the archive somewhere into your disk. In what follows, INFRARED_HOME
refers to the directory where you have the uncompressed the infrared distribution.
InfraRED weaves the code of the application and for this it uses either AspectWerkz or AspectJ internally; hence to integrate InfraRED with an application, one needs to integrate either of them on the JVM on which the application is running.
The links provided below details the steps to be followed for preparing the various JVMs. Follow the instructions provided for the JVM - Aspects (AspectJ / AspectWerkz) combination you plan to use. Once the JVM is prepared, Step 3 below details preparing the application.
AspectJ 1.5 - Preparing Sun 1.4 JVMs
AspectJ 1.5 - Preparing Sun 1.5 JVM
AspectJ 1.5 - Preparing BEA JRockit 7 and 8.1 JVM
AspectWerkz 2.0 - Preparing Sun 1.4 JVMs
AspectWerkz 2.0 - Preparing Sun 1.5 JVM
AspectWerkz 2.0 - Preparing BEA JRockit 7 and 8.1 JVM
The application needs to be prepared for InfraRED. The following section describes doing this using AspectWerkz load-time weaving. It involves three steps:
Copy the file INFRARED_HOME\props\infrared-agent.properties
to a
location from where it can be loaded by the Classloader which loads the application.
For a WAR web application, this involves copying
INFRARED_HOME\props\infrared-agent.properties
into WEB-INF/classes.
For an EAR application in Weblogic, this involves copying
INFRARED_HOME\props\infrared-agent.properties
into APP-INF/classes.
For an EAR application in JBoss,
INFRARED_HOME\props\infrared-agent.properties
should be put in the
root of the ear.
The contents of infrared-agent.properties
file govern the InfraRED configuration. The sample provided at
INFRARED_HOME\props\infrared-agent.properties
suffices as a good
default. The various configuration options are
explained in the Configuration page.
InfraRED ships with a set of pre-built aspects which monitor executions of SQL, EJBs, JSPsm Servlets etc. To customize them further, you can follow this step; to get InfraRED up and runnning quickly, you need not follow this step.
Add InfraRED application startup listener to.
<web-app> .. <filter> <filter-name>infrared</filter-name> <filter-class>net.sf.infrared.aspects.servlet.InfraREDServletFilter</filter-class> </filter> .. <filter-mapping> <filter-name>infrared</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> .. <listener> <listener-class>net.sf.infrared.agent.setup.InfraREDServletContextListener</listener-class> </listener> .. </web-app>
<weblogic-application> .. <listener> <listener-class>net.sf.infrared.weblogic.setup.InfraREDApplicationLifeCycleListener</listener-class> </listener> .. </weblogic-application>
<jboss-app> .. <module> <service>infrared-mbean-2.4.1.BETA.sar</service> </module> .. </jboss-app>