Step 12: Configure the data sources #
The CRC cell needs to communicate with your i2b2 database and in order to do this it needs to know where the tables for the demodata and hivedata reside. Therefore the twelfth and final step in the cell configuration process is to configure the data sources for the CRC Cell. This information is configured in the crc-ds.xml file.
Things to keep in mind when configuring your datasources: #
- The demodata and hivedata tables were created during the chapter on Data Installation.
- The CRCBootStrapDS points to the data source for your CRC_DB_LOOKUP table which is a hivedata table.
- This is a reserved name for connecting to the hive; the name should not be changed!
- The
and need to match the database user you set up for your hivedata. In the i2b2 demo database this is i2b2hive and demouser.
- The QueryToolDemoDS points to the data source for your demodata tables.
- The
and need to match the database user you set up for your demodata. In the i2b2 demo database this is i2b2demodata and demouser.
- The
- Additional data sources can be created, following the pattern of QueryToolDemoDS. It is important that the jndi-name is the same as the pool-name, but with “java:/” prepended.
- These other data sources can be used to connect i2b2 to other databases, using entries in the db_lookup database tables to refer to the jndi-name of the datasource.
- The
needs to have the following: - The correct JDBC information for your type of database.
- The correct location of the database containing your crcdata or hivedata tables. (These may or may not reside in the same location)
- Both the
and need to accurately reflect the type of database you are connecting to.
Steps to configure data sources #
The following steps define how to configure your data sources for the CRC Cell. These steps include example configurations for Oracle, PostreSQL and SQL Server.
1. The crc-ds.xml file is located in the following directory:
YOUR_I2B2_SRC_DIR\edu.harvard.i2b2.crc\etc\jboss
2. Open the crc-ds.xml file to configure your data sources. (see examples shown below)
Oracle Database #
PostgreSQL Database #
SQL Server Database #
3. If your environment has multiple projects pointing to different data sources then copy the
4. Update the jndi-name and pool-name to reflect the name of the second project .
Example: A second project called Demo2 would have the following entry:
Second Data Source Configuration #
Note
The above example is for an Oracle database. If your database is SQL Server or PostgreSQL then you will need to copy the
5. Save the changes and close the file.