Step 2: Creating a data source and connection pool

You declare a data source to store the data used by the Decision Center console.

Before you begin

You must have a database to create a data source. For a list of supported databases, see the "System requirements" section in the Readme file for a link to the hardware and software requirements of the product.

About this task

To create a data source and a connection pool for Decision Center on Tomcat, you copy the driver for your database to the Tomcat directory, and then you declare the database and link it to the Decision Center management archive.

Procedure

  1. Copy your database driver JAR file to the <TOMCAT_HOME>/lib directory. For example, the Derby database drivers are derby.jar and derby-plugin.jar. (The file derby.jar is provided with the product.)
  2. Open the <TOMCAT_HOME>/conf/server.xml file.
  3. In the file, declare the database and link it to teamserver.war by adding the following code just before the </Host> tag that closes the localhost definition:
    <Context docBase="teamserver.war" path="/teamserver" reloadable="true">
               <Resource name="jdbc/ilogDataSource" auth="Container" 
                            type="javax.sql.DataSource"
                            username="##dbUser##" password="##dbPassword##"
                            driverClassName="##driverClassName##"
                            url="##URL##" />
    </Context>
  4. Complete the common properties for local transaction data sources:
    username and password

    The tags username="##dbUser##" and password="##dbPassword##" are used to create the database the first time you run the system. Replace ##dbUser## and ##dbPassword##, placing your user name and password between the quotation marks. After the database is created, you must use your user name and password.

    driverClassName

    The class that is used to handle the connections to the database. For example:

    driverClassName="org.apache.derby.jdbc.EmbeddedDriver"

    URL

    This provides the JDBC connection URL. For example:

    url="jdbc:derby:server://localhost:<PORT>/RTSB"

    In this case, server://localhost:<PORT>/RTSB is the location of the database folder RTSB.

    You can also create the database when declaring it. For example:

    url="jdbc:derby:c:/derbydata;create=true"

    In this example, you create a database named derbydata on the local C: drive the first time you open the Decision Center console on Tomcat.

  5. Save the file.