- JOC Cockpit makes use of a database to store inventory information, status information and workflow related logs. The database is required for restart capabilities with the JS7 - Cluster Service.
- JS7 does not include a DBMS, instead, it make use of a DBMS that has been installed separately - with the exception of H2® for which JS7 includes an embedded version of the DBMS for evaluation purposes.
- The supported DBMS products include
- SQL Server®
- Basically any versions of a DBMS can be used that are actively supported by their vendor.
- Access to the DBMS is provided by the Hibernate database access layer. This includes to use a JDBC Driver that is specific for the DBMS.
- Consider to check and to apply measures for JS7 - Database Maintenance
Database support currently is limited to MySQL® and H2®. The upcoming prerelease of JS7 can be used with any supported database, see JS7 - Roadmap.
For a number of DBMS the JDBC Drivers are included with JS7. However, due to restrictions for bundling of JDBC Drivers with Open Source software for some DBMS users have to individually download the JDBC Driver from the vendor's web site:
|Included with JS7||Comment|
|H2®||1.4.200||1.4.200||MPL 2.0, EPL 1.0||yes||DBMS and JDBC Drivers are Open Source|
|MariaDB®||10||2.7.2||LGPL||yes||DBMS and JDBC Drivers are Open Source|
|MySQL®||5.7, 8.0||8.x||Proprietary License||no|
DBMS is Open Source, JDBC Drivers are not Open Source
The MariaDB® JDBC Driver can be used for MySQL®
|Oracle®||12c, 18c, 19c||19.7||FUTC License||yes||DBMS and JDBC Drivers are not Open Source|
Use ojdbc10.jar for Java 10 releases and newer
|PostgreSQL®||10, 11, 12||42.2.19||BSD 2-clause||yes||DBMS and JDBC Drivers are Open Source|
|SQL Server®||2012, 2014, 2017, 2019||9.x||Proprietary License||no|
DBMS and JDBC Drivers are not Open Source
Hibernate Configuration Files
- Hibernate configuration files are used from an XML format. During installation the respective hibernate configuration file is created and can later on be manually updated.
- After installation of JOC Cockpit the Hibernate configuration file is available with
- By default the Hikari Connection Pool is used.
Hibernate Configuration for H2®
- The JDBC connection URL in this sample makes use of an embedded H2® database server. The database file is located in
- For use with a standalone H2® database server use a syntax such as
<host>is the hostname and
<port>is the H2® database port (frequently:
Hibernate Configuration for MariaDB®
- The example makes use of the MariaDB® database server running for hostname
Hibernate Configuration for MySQL®
- The example makes use of the MySQL® database server running for hostname
Hibernate Configuration for Oracle®
- The example makes use of the Oracle® database listener running for hostname
1521. The database Service Name is
- Should you want to use a Service ID instead of a Service Name then use this URL syntax:
- Should you want to directly specify additional settings as typically used from
tnsnames.orathen use this URL syntax:
jdbc:oracle:thin:@(DESCRIPTION =(ADDRESS_LIST =(ADDRESS =(PROTOCOL=TCP)(HOST=oraclesrv)(PORT=1521)))(CONNECT_DATA=(SID=XE)(GLOBAL_NAME=XE.WORLD)(SERVER=DEDICATED)))
- Should you want to use Oracle Wallet® then specify empty values for the
<property name="hibernate.connection.password">elements. Find further information with the How to connect to an Oracle database without using passwords article.
Hibernate Configuration for PostgreSQL®
- The example makes use of the PostgreSQL® database server running for hostname
Hibernate Configuration SQL Server®
- Consider that the JDBC Driver for SQL Server® has to be downloaded individually as it does not ship with JS7.
- The example makes use of the SQL Server® database server running for hostname
- Consider that use of the above parameters with the JDBC URL is required:
- For Windows environments access to SQL Server can be configured to use integrated security, i.e. to use the account that the JOC Cockpit Windows Service is operated for.
- Specify empty values for the
- Add to the JDBC URL:
- The account used for the JOC Cockpit Windows Service has to be configured with SQL Server® to allow access to the database.
- The JDBC Driver distribution usually ships with a library for authentication purposes with a name such as
mssql-jdbc_auth-9.2.1.x64.dllor similar. This library should be added to a location that is specified with the Windows
PATHenvironment variable for the JOC Cockpit Windows Service or simply stored to the
C:\Windows\System32directory or to the
bindirectory of the Java JDK/JRE in use.
- Specify empty values for the
JS7 makes use of a connection pool to allow a larger number of JOC Cockpit user sessions to share database connections form the pool.
- By default JOC Cockpit is configured to use up to 10 connections from the pool. As a rule of thumb 1 connection can be shared by approx. 3 parallel users.
- Adjust this setting to the max. number of connections required for sharing between parallel users of JOC Cockpit.
Hibernate offers to choose one out of a number of Connection Pool implementations.
- By default the Hikari Connection Pool is used with JS7.
The Hikari setting for the
maximumPoolSizeis included with the Hibernate configuration file as this determines the max. number of open database connections:
- Additional settings for Hikari can be added by property elements to a Hibernate configuration file.
- Alternatively e.g. the C3P0 Connection Pool can be used.
Use of C3P0 suggests a number of additional settings that better match use with JS7 than the default values
- Additional settings can be added by corresponding property elements, however, close reading of the C3P0 docs is recommended before applying changes.