Message-ID: <757099244.7478.1711625138645.JavaMail.confluence@ip-172-30-4-17.ec2.internal> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_7477_148826095.1711625138643" ------=_Part_7477_148826095.1711625138643 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html 11.4.4 Data Source Configuration

11.4.4 Data Source Configuration

Step 6: Configure the data sources for the Workpl= ace Cell

=20

The Workplace cell needs to communicate with your i2b2 database<= /strong> and in order to do this it needs to know where the tables for the = workdata and hivedata reside. Therefore t= he sixth and final step in the cell confi= guration process is to configure the data sources for the Workplace Cell. T= his information is configured in the work-ds.xml file.

= =20


=20

Things to keep in mind when configuring your datasources= :

=20


=20 =20


=20 =20


=20
    =20
  • The WorkplaceBootStrapDS points to the data source for= your WORK_DB_LOOKUP table which is a hivedata table.=20
      =20
    • The <user-name> and <password> need to match the database user you set up for your hivedata. In the = i2b2 demo database this is i2b2hive and demouser.
    • =20
  • =20
=20


=20
    =20
  • The <connection_url> needs to have the following= :=20
      =20
    • The correct JDBC information for your type of database.
    • =20
    • The correct location of the database containing your workdata or hiveda= ta tables. (These may or may not reside in the same location)
    • = =20
  • =20
=20


=20
    =20
  • Both the <driver-class> and <driver&g= t; need to accurately reflect the type of database you are connect= ing to.
  • =20
=20



= =20

Ste= ps to configure data sources

=20


The following steps define how to conf= igure your data sources for the Workplace Cell. These steps include example= configurations for Oracle, PostreSQL and SQL Server.

=20


=20
1. The=20 work-ds.xml file is located in the following directory:
=20
YOUR_I2B2_SRC_DIR\edu.harvard.i2b2.workplace\etc\= jboss
=20


=20
2. Open the work-ds.xml file to configure your data sources.=20 (see examples shown below)
=20



= =20
Ora= cle Database Configuration
=20


=20
=20
<datasource jta=3D"false" jndi-name=3D"java:/WorkplaceBootStrapDS"
=09=09pool-name=3D"WorkplaceBootStrapDS" enabled=3D"true" use-ccm=3D"false"=
>
=09<connection-url>jdbc:oracle:thin:@localhost:1521:xe</connection=
-url>
=09<driver-class>oracle.jdbc.OracleDriver</driver-class>
=09<driver>ojdbc6.jar</driver>
=09<security>
=09=09<user-name>i2b2hive</user-name>
=09=09<password>demouser</password>
=09</security>
=09<validation>
=09=09<validate-on-match>false</validate-on-match>
=09=09<background-validation>false</background-validation>
=09</validation>
=09<statement>
=09=09<share-prepared-statements>false</share-prepared-statements&=
gt;
=09</statement>
</datasource>
<datasource jta=3D"false" jndi-name=3D"java:/WorkplaceDemoDS"
=09pool-name=3D"WorkplaceDemoDS" enabled=3D"true" use-ccm=3D"false">
=09<connection-url>jdbc:oracle:thin:@localhost:1521:XE</connection=
-url>
=09<driver-class>oracle.jdbc.OracleDriver</driver-class>
=09<driver>ojdbc6.jar</driver>
=09<security>
=09=09<user-name>i2b2workdata</user-name>
=09=09<password>demouser</password>
=09</security>
=09<validation>
=09=09<validate-on-match>false</validate-on-match>
=09=09<background-validation>false</background-validation>
=09</validation>
=09<statement>
=09=09<share-prepared-statements>false</share-prepared-statements&=
gt;
=09</statement>
</datasource>
=20
=20



= =20
PostgreSQL Database Configuration
=20


=20
=20
<datasource jta=3D"false" jndi-name=3D"java:/WorkplaceBootStrapDS"
=09=09pool-name=3D"WorkplaceBootStrapDS" enabled=3D"true" use-ccm=3D"false"=
>
=09<connection-url>jdbc:postgresql://localhost:5432/i2b2</connecti=
on-url>
=09<driver-class>org.postgresql.Driver</driver-class>
=09<driver>postgresql-9.2-1002.jdbc4.jar</driver>
=09<security>
=09=09<user-name>i2b2hive</user-name>
=09=09<password>demouser</password>
=09</security>
=09<validation>
=09=09<validate-on-match>false</validate-on-match>
=09=09<background-validation>false</background-validation>
=09</validation>
=09<statement>
=09=09<share-prepared-statements>false</share-prepared-statements&=
gt;
=09</statement>
</datasource>
<datasource jta=3D"false" jndi-name=3D"java:/WorkplaceDemoDS"
=09pool-name=3D"WorkplaceDemoDS" enabled=3D"true" use-ccm=3D"false">
=09<connection-url>jdbc:postgresql://localhost:5432/i2b2</connecti=
on-url>
=09<driver-class>org.postgresql.Driver</driver-class>
=09<driver>postgresql-9.2-1002.jdbc4.jar</driver>
=09<security>
=09=09<user-name>i2b2workdata</user-name>
=09=09<password>demouser</password>
=09</security>
=09<validation>
=09=09<validate-on-match>false</validate-on-match>
=09=09<background-validation>false</background-validation>
=09</validation>
=09<statement>
=09=09<share-prepared-statements>false</share-prepared-statements&=
gt;
=09</statement>
</datasource>
=20
=20



= =20
= SQL Server Database Configuration
=20


=20
=20
<datasource jta=3D"false" jndi-name=3D"java:/WorkplaceBootStrapDS"
=09=09pool-name=3D"WorkplaceBootStrapDS" enabled=3D"true" use-ccm=3D"false"=
>
=09<connection-url>jdbc:sqlserver://localhost:1433</connection-url=
>
=09<driver-class>com.microsoft.sqlserver.jdbc.SQLServerDriver</dri=
ver-class>
=09<driver>sqljdbc4.jar</driver>
=09<security>
=09=09<user-name>i2b2hive</user-name>
=09=09<password>demouser</password>
=09</security>
=09<validation>
=09=09<valid-connection-checker class-name=3D"org.jboss.jca.adapters.jdb=
c.extensions.mssql.MSSQLValidConnectionChecker"></valid-connection-ch=
ecker>
=09=09<validate-on-match>false</validate-on-match>
=09</validation>
=09<statement>
=09=09<share-prepared-statements>false</share-prepared-statements&=
gt;
=09</statement>
</datasource>
<datasource jta=3D"false" jndi-name=3D"java:/WorkplaceDemoDS"
=09pool-name=3D"WorkplaceDemoDS" enabled=3D"true" use-ccm=3D"false">
=09<connection-url>jdbc:sqlserver://localhost:1433</connection-url=
>
=09<driver-class>com.microsoft.sqlserver.jdbc.SQLServerDriver</dri=
ver-class>
=09<driver>sqljdbc4.jar</driver>
=09<security>
=09=09<user-name>i2b2workdata</user-name>
=09=09<password>demouser</password>
=09</security>
=09<validation>
=09=09<valid-connection-checker class-name=3D"org.jboss.jca.adapters.jdb=
c.extensions.mssql.MSSQLValidConnectionChecker"></valid-connection-ch=
ecker>
=09=09<validate-on-match>false</validate-on-match>
=09</validation>
=09<statement>
=09=09<share-prepared-statements>false</share-prepared-statements&=
gt;
=09</statement>
</datasource>
=20
=20



= =20
3. If your environment has multiple projects pointing to different data sou= rces then copy the=20 <datasource> section for each project data source.
=20
4. Update the=20 jndi-name and=20 pool-name to reflect the name of the second project .
=20
Example:   A second project called Demo2 wou= ld have the following entry:
=20


=20
S= econd Data Source Configuration
=20


=20
=20
<datasource jta=3D"false" jndi-name=3D"java:/WorkplaceDemo2DS"
=09pool-name=3D"WorkplaceDemo2DS" enabled=3D"true" use-ccm=3D"false">
=09<connection-url>jdbc:oracle:thin:@localhost:1521:xe</connection=
-url>
=09<driver-class>oracle.jdbc.OracleDriver</driver-class>
=09<driver>ojdbc6.jar</driver>
=09<security>
=09=09<user-name>i2b2workdata</user-name>
=09=09<password>demouser</password>
=09</security>
=09<validation>
=09=09<validate-on-match>false</validate-on-match>
=09=09<background-validation>false</background-validation>
=09</validation>
=09<statement>
=09=09<share-prepared-statements>false</share-prepared-statements&=
gt;
=09</statement>
</datasource>
=20
=20



= =20

Note

=20

The above example is for an Oracle database. If your database is SQL Ser= ver or PostgreSQL then you will need to copy the <datasource> section= for your type database connection. Do not use this one as it will not work= .

=20



= =20
5. Save the changes and close the file.
=20




------=_Part_7477_148826095.1711625138643--