• No results found

• Install j2sdk-1_4_2_xx through a local installation or download it from www.java.sun.com.

• Install Tomcat for Java Web Services Developer Pack through a local installation or from www.java.sun.com.

• Set the CATALINA_HOME environment variable to point to the top-level directory of the Tomcat installation: tomcat50-jwsdp.

This environment variable identifies the Tomcat installation directory and sends the information to the server.

• Set JAVA_HOME to the j2sdk-1_4_2_xx installation directory to point Tomcat to the Java path. If you do not set this variable correctly, Tomcat fails to handle the Java Server pages correctly.

Note

This variable must list the Java Development Kit (JDK) installation directory and not the bin sub directory.

• Install the Web server to view the charts and graphs to be stored and displayed in the ModelCHECK Metrics Tool. You can use either Internet Information Services (IIS) or download the Web server from www.apache.org.

How to Start the Tomcat Server and Deploy the Metrics Tool

After you have installed the Tomcat server, ensure that the file tomcat50-jwsdp\conf\tomcat-users.xml has all the required settings to access the Metrics Tool. A sample tomcat-users.xml file follows:

<?xml version='1.0' encoding='utf-8'?>

<tomcat-users>

<role rolename="role1"/>

<role rolename="manager"/>

<role rolename="admin"/>

<user username="tomcat" password="tomcat"

roles="tomcat"/>

<user username="both" password="tomcat"

roles="tomcat,role1"/>

<user username="role1" password="tomcat"

roles="role1"/>

<user username="admin" password="admin"

roles="admin,manager"/>

</tomcat-users>

In the above sample file, the Tomcat Web Server Administration Tool defines the roles.

1. Start Tomcat using tomcat50-jwsdp\bin\startup.bat.

2. Open a browser and type http://<machine_name>:port/admin, where machine_name is the name of the machine with the Tomcat installation.

3. In the next screen, provide a user name and type the password as admin.

4. Using the Tomcat Web Server Administration Tool, create a new data source by providing details of the database to use for the Metrics Tool and save the changes. Use Oracle or MSAccess as a database for the Metrics Tool.

Note

The information in the new data source must match that given in the new_admin.xml file that is used to deploy the Metrics Tool.

5. Ensure that you have created the context configuration file

(new_admin.xml) to enable the deployment of the Metrics Tool. See Context Configuration File for details.

6. In Tomcat Web Application Manager window, provide the path to the context configuration file (new_admin.xml) and the WAR file (new_admin.war) under the Deploy area.

7. Click Deploy to start the Metrics Tool.

8. Open a browser. Specify the name of the server on which the Metrics Tool is deployed along with the port and new_admin as the name of the tool.

Note

You can specify any name for the tool. But, ensure that the specified tool name matches the name specified in the context configuration file.

Context Configuration File

The new_admin.xml file is a context configuration to deploy the ModelCHECK Metrics Tool. The new_admin.xml file and the new_admin.war file are stored in the following directory:

$PTCSRC/modchk/mc_admin/new_admin/dist/

You must specify the path to the image directory in the new_admin.xml file. The generated graphs are stored in the image directory. The value for the Imagedir in the new_admin.xml file must be the same as that of the DocumentRoot variable in your Web server configuration file. A sample context configuration file follows:

Parameter Name Description

dbname Name of the database

dbtype Type of the database, like Oracle or MSAccess

adminserver Machine name of a server for the Metrics Tool Adminport The port number type of the server for the

Metrics Tool

Imagedir Path to the image directory

ImagedirLink The link to the image directory for storing graphs

collect_mc_db_interval Time interval (in hours) after which the ModelCHECK database is updated (minimum 1 hour)

<Context path="/new_admin" docBase="new_admin.war" debug="5"

reloadable="true" crossContext="true" privileged="true">

<Resource name="jdbc/mcadmin" scope="Shareable"

type="javax.sql.DataSource" />

<ResourceParams name="jdbc/mcadmin">

<parameter>

<name>maxWait</name>

<value>50000</value>

</parameter>

<parameter>

<name>maxActive</name>

<value>100</value>

</parameter>

<parameter>

<name>password</name>

<value>yourpass</value>

</parameter>

<parameter>

<name>url</name>

<value>jdbc:oracle:thin:@machine1:1521:mcadmin</value>

</parameter>

<parameter>

<name>driverClassName</name>

<value>oracle.jdbc.driver.OracleDriver</value>

</parameter>

<parameter>

<name>maxIdle</name>

<value>100</value>

</parameter>

<parameter>

<name>username</name>

<value>yourpass</value>

</parameter>

</ResourceParams>

<ResourceLink name="jdbc/mcadmin" global="mcadmin" />

<Manager

className="org.apache.catalina.session.PersistentManager"

debug="0" saveOnRestart="false" maxActiveSessions="-1"

minIdleSwap="-1" maxIdleSwap="-1" maxIdleBackup="-1">

<Store className="org.apache.catalina.session.FileStore" />

</Manager>

<Parameter name="dbname" value="mcadmin" />

<Parameter name="dbtype" value="oracle" />

<Parameter name="adminserver" value="machine1" />

<Parameter name="adminport" value="80" />

<Parameter name="imagedir"

value="d:\projects\mcadminwork\admingraphs" />

<Parameter name="imagedirLink" value="admingraphs"/>

</Context>

In above file, the value of Imagedir is

d:\projects\mcadminwork\admingraphs. Hence, if you configure Apache as your Web server, the value of DocumentRoot will be

d:\projects\mcadminwork.

Related documents