Tomcat

The following sections discuss prerequisites that must be performed before Stardust can be deployed within a Tomcat servlet engine.

Tomcat Download and Installation

Before any activities can be done, download Tomcat from the Apache Tomcat Site . Once downloaded, install TOMCAT by unpacking the ZIP/TAR file onto the host server. The Tomcat installation directory referred to as %TOMCAT_HOME% from this point forward.

A basic understanding of Tomcat Administration and Web Application Archive (WAR) files is required from this point forward.

Predefined Deployment Configurations

Stardust provides predefined deployment configurations to prepare a deployment with Tomcat. You can achieve these Maven archetype templates matching your requirements by downloading from the Stardust artifactory. The following deployment configuration for Tomcat is provided to prepare a Stardust Portal WAR deployment for Tomcat 7:

For details on how to retrieve archetypes for predefined deployment configurations, please refer to chapter Creating a Stardust Runtime Environment with Apache Maven in the Stardust Installation Guide. to our Stardust Maven Basic Setup wiki page.

Database Dependent Configuration Examples

The data source configuration depends on the kind of database you use:

Configuration Settings for MySQL

In case you use Tomcat on MySQL, the explicitUrl parameter has to be set to the value true.

In case you use the Reporting WAR file, adjust the DataSource entry in the server.xml file:

<Resource name="AuditTrail.DataSource" auth="Container"
      type="com.mysql.jdbc.jdbc2.optional.MysqlXADataSource"
      factory="com.mysql.jdbc.jdbc2.optional.MysqlDataSourceFactory"
      maxActive="50" maxIdle="10" maxWait="5000"
      user="carnot" password="ag" defaultAutoCommit="false"
      driverClassName="com.mysql.jdbc.Driver"
      url="jdbc:mysql://host/dbname" explicitUrl="true" />

For information on the general setup of a MySQL audit trail database please refer to the chapter MySQL Audit Trail Database Setup.

Configuration Settings for Oracle

In case you use the Reporting WAR file, adjust the DataSource entry in the server.xml file. For example for Oracle 11g enter the following:

<Resource name="AuditTrail.DataSource" auth="Container"
      type="oracle.jdbc.xa.client.OracleXADataSource"
      factory="oracle.jdbc.pool.OracleDataSourceFactory"
      maxActive="50" maxIdle="10" maxWait="5000"
      user="carnot" password="ag" defaultAutoCommit="false"
      driverClassName="oracle.jdbc.OracleDriver"
      url="jdbc:oracle:thin:@host:port:dbname"/>

For information on the general setup of an Oracle audit trail database please refer to the chapter Oracle Audit Trail Database Setup.

Configuration Settings for DB2

To setup the configuration for DB2:

At the db2 prompt, enter the following command to catalog the DB2 server node:

db2 catalog tcpip node <node_name> remote localhost server <db2 port number> remote_instance db2inst1

Now catalog the database:

db2 catalog database <database> as <db_name> at node <node_name> authentication server
db2 terminate

Test the connection:

db2 list node directory
db2 list database directory
db2 connect to <db_name> user <username> using <password>
db2 list tables
db2 connect reset

If you need to drop the database or instance alias:

db2 uncatalog database <db_name>
db2 uncatalog node <node_name>
db2 terminate

In case you use the Reporting WAR file, adjust the DataSource entry in the server.xml file:

<Resource name="AuditTrail.DataSource" auth="Container"
      type="com.ibm.db2.jcc.DB2XADataSource"
      factory="com.ibm.db2.jcc.DB2DataSourceFactory"
      maxActive="30" maxIdle="10" maxWait="5000"
      user="carnot" password="ag" defaultAutoCommit="false"
      driverClassName="com.ibm.db2.jcc.DB2Driver"
      databaseName="<db_name>" />

For information on the general setup of a DB2 audit trail database please refer to the chapter DB2 Audit Trail Database Setup.

Configuration Settings for MSSQL

You can define an XA datasource on Tomcat. In case you use the Reporting WAR file, adjust the DataSource entry in the server.xml file:

 <Resource name="AuditTrail.DataSource" 
              auth="Container"
              type="com.microsoft.sqlserver.jdbc.SQLServerXADataSource"
              factory="org.apache.naming.factory.BeanFactory"
              integratedSecurity="false"
              serverName="127.0.0.1"
              databaseName="carnot"
              portNumber="1433"
              user="carnot"
              password="ag" />

For information on the general setup of a MSSQL audit trail database please refer to the chapter MSSQL Audit Trail Database Setup.

Setting up additional Jackrabbit VFS Repositories

To set up additional Jackrabbit VFS repositories, perform the following steps depending on whether transaction integration is required or not: