You declare a data source to store the Decision Center data.
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,
declare the database, and then link the database to the Decision Center archives.
Procedure
- Copy your database driver JAR file to the
<CATALINA_HOME>/lib directory.
- In <CATALINA_HOME>/conf/server.xml,
declare the database just before the tag closing the global resources
definitions
</GlobalNamingResources>. For example:
<Resource name="jdbc/ilogDataSource" type="javax.sql.DataSource"
defaultTransactionIsolation="READ_COMMITTED"
auth="Container"
username="dcdbUser" password="dcdbUser"
driverClassName="com.ibm.db2.jcc.DBDriver"
url="jdbc:db2://db2server:50000/DCDB"/>
- Adjust the properties for local transaction data sources:
- defaultTransactionIsolation
Set the tag defaultTransactionIsolation to READ_COMMITTED to
avoid database access problems and hence provide a better concurrency
experience.
- username and password
The tags username="dcdbUser" and password="dcdbUser" are
used only to access the database.
- driverClassName
The class that is used to handle the connections to the database. For example, for Db2®:
driverClassName="com.ibm.db2.jcc.DBDriver"
- URL
The url property provides the JDBC connection. For example, for Db2:
url="jdbc:db2://db2server:50000/DCDB"
A
database named dcdb is created the first time that
you access Decision Center.
- Link the database to the Decision Center archives
by adding the following before the
</Host> tag
that closes the localhost definition: <Context docBase="decisioncenter" path="/decisioncenter" reloadable="false">
<ResourceLink global="jdbc/ilogDataSource" name="jdbc/ilogDataSource" type="javax.sql.DataSource"/>
</Context>
<Context docBase="decisioncenter-api" path="/decisioncenter-api" reloadable="false">
<ResourceLink global="jdbc/ilogDataSource" name="jdbc/ilogDataSource" type="javax.sql.DataSource"/>
</Context>
- Add UTF-8 encoding to the connector port:
<Connector URIEncoding="UTF-8" connectionTimeout="20000" port="8080" protocol="HTTP/1.1" redirectPort="8443"/>
- Save the file.