Configuring the Data Sources by using JNDI

The INUBIT internal cache, repository, and logs database are called datasources. The default configuration is determined in the following configuration files located in the directory <inubit-installdir>/inubit/server/ibis_root/conf/:

  • ibis.xml for the cache database.

  • repository.xml for the repository database.

  • logsDBConfig.xml for the log database.

You can re-configure the data sources by using JNDI to use a different database, for example. To do this you have to overwrite the relevant JNDI resource element in the configuration file <inubit-installdir>/inubit/server/process_engine/webapps/ibis/META-INF/context.xml of the Web application ibis in Tomcat.

Once the Process Engine has started, and you want to change the context.xml file subsequently, you must stop the Process Engine, change both the context.xml file and the <inubit-installdir>/inubit/server/process_engine/conf/Catalina/localhost/ibis.xml file identically, and start the Process Engine again.

Changing the configuration by JNDI provides the following advantages:

  • It uses the standard format and the management functions of the application container.

  • It is application-independent.

You can do the re-configuration by JNDI after the first installation and before the first start of the Process Engine.

Prerequisites

You have copied the JDBC drivers for the required database type to the directory <inubit-installdir>/inubit/server/process_engine/lib.

Proceed as follows

  1. Open the file <inubit-installdir>/inubit/server/process_engine/webapps/ibis/META-INF/context.xml in the editor of your choice.

    <Context>
      <Resource
        name="jdbc/IBISDB"
        auth="Container"
        type="com.inubit.ibis.server.IBISDataSource"
        factory="org.apache.naming.factory.BeanFactory"/>
      <Resource
        name="jdbc/IBISJCRDB"
        auth="Container"
        type="com.inubit.ibis.server.IBISDataSource"
        factory="org.apache.naming.factory.BeanFactory"/>
      <Resource
        name="jdbc/IBISLOGSDB"
        auth="Container"
        type="com.inubit.ibis.server.log.LogsDBDataSource"
        factory="org.apache.naming.factory.BeanFactory"/>
    </Context>
  2. Edit the Resource element/s that you want to change the datasource for. The example shows the changed entry for the logs database (ressource jdbc/IBISLOGSDB):

    <Context>
      ...
      <Resource name="jdbc/IBISLOGSDB" auth="Container"
        type="javax.sql.DataSource" username="dbusername" password="dbpassword"
        driverClassName="org.hsql.jdbcDriver" url="jdbc:HypersonicSQL:database"
        maxActive="8" maxIdle="4"/>
    </Context>
  3. Switch into the directory <inubit-installdir>/inubit/server/ibis_root/conf/ and copy the configuration file that is appropriate for your destination database (database) as follows:

    • If you want to change the cache database, no files must be copied, since ibis.xml does not contain database-specific data.

    • If you want to change the repository database, copy repository.xml.<database>.<CLUSTER|SINGLE> to repository.xml.

    • If you want to change the log database, copy logsDBConfig.xml.<database> to logsDBConfig.xml.

      Before copying, backup the configuration files repository.xml and logsDBConfig.xml.