Page tree
Skip to end of metadata
Go to start of metadata

This page is no longer maintained and may contain obsolete information.

While CAST supports the use of direct connections to the server hosting the CAST Dashboard Service using the appropriate section in the web.xml file (see Deploy the CAST web applications), it is also possible to use a Java DataSource instead. CAST supports both Apache Tomcat and BEA Weblogic DataSources.

This section discusses configuration in an Apache Tomcat environment.

In addition, you can also declare your CAST Analysis Service as a DataSource(for use with the CAST Discovery Portal) by first using the declaration method below (do not add the CAST Analysis Service DataSource to the web.xml file however) and then configuring it using the Site Lists option in the CAST Engineering Dashboard/CAST Discovery Portal as described in Deploy the CAST web applications.

The process is as follows:

  • Create and declare the DataSource in your application server
  • Edit the %CATALINA_HOME%\webapps\CAST-CED\WEB-INF\web.xml file and define the DataSource

Create and declare the DataSource

You first need to create and declare your DataSource in the Apache Tomcat configuration settings. This can be done in the following file:

%CATALINA_HOME%\conf\server.xml

For example:

<Context path="/CAST-CED" [.......] >
[......]
<Resource name="jdbc/TESTPool" auth="Container" type="javax.sql.DataSource"
maxActive="-1"
maxIdle="30"
maxWait="10"
minEvictableIdleTimeMillis="100000"
poolPreparedStatements="true"
removeAbandoned="true"
removeAbandonedTimeout="60"
logAbandoned="true"
username="userlogin"
password="userpassword"
driverClassName="net.sourceforge.jtds.jdbc.Driver"
url="jtds:sqlserver://MYSERVER:MYSERVERPORT"/>
[......]
</Context>

Please refer to your application server for more information about declaring DataSources.

Edit the CAST web.xml file

Before you can use the CAST Engineering Dashboard or the CAST Discovery Portal, you need to configure the connection properties to use your DataSource. This can be done in the following file:

%CATALINA_HOME%\webapps\CAST-CED\WEB-INF\web.xml

Then navigate to the Apache Tomcat DataSource section:

<!-- Template for Tomcat Data Source
    <context-param>
        <param-name>jdbc.datasource</param-name>
        <param-value>jdbc/[DataSourceName]</param-value>
        <description>JDBC driver</description>
    </context-param>
    <context-param>
        <param-name>jdbc.schema</param-name>
        <param-value>[CENTRAL_DB]</param-value>
        <description>JDBC Central database schema</description>
    </context-param>
-->

Enter the details of your DataSource, the name of the database/schema hosting your CAST Dashboard Service (or CAST Analysis Service if appropriate) and uncomment the entire section:

<!-- Template for Tomcat Data Source -->

<context-param>
        <param-name>jdbc.datasource</param-name>
        <param-value>jdbc/TESTPOOL</param-value>
        <description>JDBC driver</description>
</context-param>
<context-param>
        <param-name>jdbc.schema</param-name>
        <param-value>CONTREX_CENTRAL</param-value>
        <description>JDBC Central database schema</description>
</context-param>

Following any changes you make, save the web.xml file and then restart your application server so that the changes are taken into account.

  • No labels