System Requirements

  1. JVM: Sun 1.4+, BEA JRockit 1.4+
  2. Server: Tomcat 4+, JBoss 3+, Weblogic 8+

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.

Installation

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:

  1. Download InfraRED
  2. Prepare the JVM on which the application is running
  3. Prepare the application
  4. Install the web GUI of InfraRED

Step 1: Download InfraRED

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.

Step 2: Preparing the JVM

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

Step 3: Preparing the application

The application needs to be prepared for InfraRED. The following section describes doing this using AspectWerkz load-time weaving. It involves three steps:

  1. 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.

  2. 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.

    Customising application layers using AspectJ

    Customising application layers using AspectWerkz

  3. Add InfraRED application startup listener to.

    1. For a WAR web application, add the following entries to the WEB-INF/web.xml file.
                            
      <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>
       
                                  
    2. For an EAR application in Weblogic, add the following entries to the META-INF/weblogic-application.xml file.
                            
      <weblogic-application>
          .. 
          <listener>
              <listener-class>net.sf.infrared.weblogic.setup.InfraREDApplicationLifeCycleListener</listener-class>
          </listener>
          ..
      </weblogic-application>
       
                                  
    3. For an EAR application in JBoss, copy the INFRARED_HOME/infrared-mbean-2.4.1.BETA.sar into the EAR and add the following entries to the META-INF/jboss-app.xml file.
                            
      <jboss-app>
          .. 
          <module>
              <service>infrared-mbean-2.4.1.BETA.sar</service>
          </module>
          ..
      </jboss-app>
                                 
                                  

Step 4: Install the web GUI of InfraRED

InfraRED web GUI can be found in INFRARED_HOME/infrared-web-all-2.4.1.BETA.war. This can be installed on any J2EE web container. Data collected by InfraRED can be viewed with this web application.