You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

Data Sources definition

Data Sources are defined in server.xml of your Tomcat server (in BASE_DIR/conf).

For local environment database connections make use of the thin client, which requires a username and a password. Since the password is changed every six months, this file is to be kept up to date. An up to date copy can be found Brian, Edit here.

Resource Links in tomcat are defined either globally for all applications or for each individual application in META-INF/context.xml.

Default Global Definition

Some of our web applications can be deployed for different experiments, their configuration being controlled via Maven Profiles. These profiles control configuration parameters such as database connections. To avoid having to list database connections for different experiments in the application's context.xml we decided to define a set of default ones globally.

Currently we have the following defined at the server level:

     <ResourceLink name="jdbc/config-srs" type="javax.sql.DataSource" global="jdbc/config-prod" />   <ResourceLink name="jdbc/config-srs"   type="javax.sql.DataSource" global="jdbc/config-prod" />
    <ResourceLink name="jdbc/config-exo"   type="javax.sql.DataSource" global="jdbc/config-prod" />
    <ResourceLink name="jdbc/config-fermi" type="javax.sql.DataSource" global="jdbc/glastgen" />
    <ResourceLink name="jdbc/config-exo" type="javax.sql.DataSource" global="jdbc/config-prod"     <ResourceLink name="jdbc/config-fermi" type="javax.sql.DataSource" global="jdbc/glastgen" />

For web applications to work properly in your local environment you will have to copy the above resource links in context.xml of your local Tomcat installation.

This can be found in the directory TOMCAT_INSTALL_DIR/conf/.

  • No labels