Since Blueriq 11.5, we changed the way Blueriq initializes datasources.
The plugin blueriq-example-custom-database-component
is an example on how to set up a component with the Blueriq API which has database access. No rights reserved.
To compile and build war use:
mvn clean verify
Deploy Runtime.war
to Tomcat container. Create a configuration folder and add Blueriq license.aql
or package Blueriq license.aql
by adding it to src\main\resources
.
Start Tomcat container with the following parameters:
-Dspring.config.additional-location=file://path_to_conf/ # URI of the configuration folder which contains the Blueriq license.
-Dspring.profiles.active=native,development-tools,custom-database-component (embedded) or
-Dspring.profiles.active=native,development-tools,custom-database-component,externaldatasources (direct connection) or
-Dspring.profiles.active=native,development-tools,custom-database-component,jndidatasources (JNDI)
Configure the datasource via either the externaldatasources profile or the jndidatasources profile.
application-externaldatasources.properties
blueriq.datasource.custom-database-component.url=jdbc:sqlserver://<database_url>:<port>;databaseName=<databaseName>;instance=<instanceName>
blueriq.datasource.custom-database-component.username=<username>
blueriq.datasource.custom-database-component.password=<password>
blueriq.datasource.custom-database-component.driverClassName=com.microsoft.sqlserver.jdbc.SQLServerDriver
blueriq.hibernate.custom-database-component.hbm2ddl.auto=validate
blueriq.hibernate.custom-database-component.dialect=org.hibernate.dialect.SQLServer2012Dialect
application-jndidatasources.properties
blueriq.datasource.custom-database-component.jndiName=java:/comp/env/jdbc/customDatabaseComponent
blueriq.hibernate.custom-database-component.hbm2ddl.auto=validate
blueriq.hibernate.custom-database-component.dialect=org.hibernate.dialect.SQLServer2012Dialect
- org.hibernate.dialect.SQLServer2012Dialect (for SQL Server)
- org.hibernate.dialect.Oracle10gDialect (for Oracle)
- org.hibernate.dialect.H2Dialect (for H2)
- none
- validate
Database scripts can be found in dbscripts
.