Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

A JDBC driver (Java Database Connectivity) is a way for Java programs to connect to databases. When you run the Blueriq installer, a H2 JDBC PostgreSQL driver is configured out-of-the-box. While this driver is great for development, we don't recommend nor support to use this database in a production environment. On this page you find instructions how to install a JDBC driver for your database and application server for the different database brands.

Supported JDBC Drivers

All supported database platforms can be found on the Platform support page.

...

For Microsoft SQL Server, we recommend using the Microsoft JDBC Driver 12.2.0. (the recommended version can be found at the platform support page). This driver can be found at maven central https://repo1.maven.org/maven2/com/microsoft/sqlserver/mssql-jdbc/12.2.0.jre11/ or the Microsoft website

This driver uses encryption by default and therefor you either have to

...

For Oracle, we recommend to use the ojdbc8 driver: ojdbc8.jar version 21.9.0.0(the recommended version can be found at the platform support page). The ojdbc8 driver can be downloaded from the Oracle website.

PostgreSQL

For PostgreSQL use the JDBC driver (the recommended version can be found at the platform support page) which can be found at https://jdbc.postgresql.org/.

Application servers

Tomcat

...

https://access.redhat.com/documentation/en-us/red_hat_jboss_enterprise_application_platform/7.2/html/configuration_guide/datasource_management#jdbc_drivers

JDBC Driver configuration

When configuring the JDBC drivers for blueriq, a library xml element needs to be added to the server.xml, the library xml elements needs to contain an "id" attribute which is used as reference later on. In the fileset element the dir attribute must be set to the directory containing designated support driver. In this example oracle is used.

...

languagexml
titleJDBC

...

drivers

...

Once the library element is added it can be used inside the application element to add the library to the application classloader. Inside the classloader element the attribute "commonLibraryRef" is set the newly created id of the library element.

Code Block
languagexml
titleClassloader
<application id="Blueriq" location="blueriq-runtime-application-12.0.0.0.war" name="Blueriq" context-root="runtime" autoStart="true">
	<classloader commonLibraryRef="oracle-lib"/>
</application>

JNDI datasources configuration

JDNI datasources are driver specifc, in the examples only the supported drivers are shown.

Oracle

In the xml element jdbcDriver, the libraryRef attribute is set to the library id. In the properties.oracle element the connection URL, user and password attributes need to be set in order to create a database connection. Fill in the blanks at <...> with your own configuration.

Code Block
languagexml
titleJNDI Oracle
<dataSource id="CustomerDataSource" jndiName="jdbc/customer">
	<jdbcDriver libraryRef="oracle-lib"/>
	<properties.oracle URL="jdbc:oracle:<driverType>:@<server_name>:<port>:<SID>" user="user" password="password"/>
</dataSource>
Microsoft SQL Server

In the xml element jdbcDriver the libraryRef attribute is set to the library id. In the properties.microsoft.sqlserver element, fill in the attributes with your own configuration.

...

languagexml
titleJNDI MSSQL

...