Editing the WeblogicVersionSensor.xml file

You must edit the WeblogicVersionSensor.xml file.

The configuration file is located in the following directories:
  • On Linux®, Solaris, AIX®, and Linux on System z® operating systems, the file is in the $COLLATION_HOME/etc/discover-sensors/ directory.
  • On Windows operating systems, the file is in the %COLLATION_HOME%\etc\discover-sensors\ directory.

The code sample in this section shows how to configure the directories and Java™ runtime environment (JRE) using XML tags. In this example, the following directories and JRE pairs are configured:

  • The JAR files from the lib/weblogic/10.0 directory are paired with the Java SDK version 1.5.0 JRE.
  • The JAR files from the lib/weblogic/9.0 directory are paired with the Java SDK version 1.5.0 JRE.

The <entry> tag configures the directory name used to store the WebLogic JAR files. The WebLogic JAR files must be located in the lib/weblogic directory.

Similarly, the <jdk> tag configures the version of the Java SDK in use. The only valid value is 1.5.0. If the WeblogicServerVersionSensor sensor does not recognize the BEA WebLogic server that is running, you can use the <WeblogicClassPathDefault> tag to force a configuration.

<SensorPlugin xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 xsi:noNamespaceSchemaLocation="http://www.ibm.com/xml/schemas/taddm/FixedSensorSchema.xsd">
    <name>WeblogicServerVersionSensor</name>
    <osgiId>com.ibm.cdb.discover.sensor.app.j2ee.weblogicserverversion_7.1.0</osgiId>

    <sensorClassName>com.collation.discover.agent.app.j2ee.WeblogicServerVersionAgent</sensorClassName>
    <seedClassName>com.collation.discover.seed.app.j2ee.WeblogicVersionSeed</seedClassName>
    <resultClassName>com.collation.discover.result.app.j2ee.WeblogicVersionResult</resultClassName>
    <convertorClassName>com.collation.discover.engine.seedfactory.WeblogicVersionConvertor</convertorClassName>

    <defaultProfiles>
        <profile>Level 3 Discovery</profile>
    </defaultProfiles>
    
    <configuration className="com.ibm.cdb.discover.sensor.configuration.WeblogicServerVersionAgentConfiguration">
        <weblogicClassPath>
            <item>
                <entry>10.0</entry>
                <jdk>1.5.0</jdk>
            </item>
            <item>
                <entry>9.0</entry>
                <jdk>1.5.0</jdk>
            </item>
        </weblogicClassPath>
        <!--<weblogicClassPathDefault>
            <entry>10.0</entry>
             <weblogicVersion>10</weblogicVersion>
            <jdk>1.5.0</jdk>
        </weblogicClassPathDefault>-->
    </configuration>
</SensorPlugin>

In the sample, the WeblogicServerVersionSensor sensor uses JAR files from the lib/weblogic/10.0 directory with the JRE from the Java SDK version 1.5.0 and assumes that WebLogic Server 10.x is running.