This page describes how to upgrade your Database Connector to the latest released version of the Database Connector that is compatible with this version of . This upgrade requires you to move your datasource configuration out of configuration.xml and into the <frevvo-home>\tomcat\conf\dbconnector.properties file.
frevvo only supports/certifies the Database Connector running in the Apache Tomcat container. Refer to our Supported Platforms for the list of Application Servers and databases supported/certified by frevvo.
On This Page:
Migration Steps - Tomcat Bundle
- Stop
- Create a folder named <frevvo-home>\config i.e. c:\frevvo\config. Copy your configuration.xml to this location
- Locate & Delete your previous database resource definition(s)
- Edit configuration.xml
- Delete all lines between and including <resource-def></resource-def> for all querysets
To help locate this, here is a example of a Datasource definition in configuration.xml
<resource-def> <url>YOUR database Url HERE</url> <driver>YOUR driver HERE</driver> <user>YOUR database user HERE</user> <password>YOUR password HERE</password> </resource-def>
Delete all lines between and including <resource-ref></resource-ref>. You would have <resource-ref> definitions in your configuration.xml if you chose to define the database connection in the application container (Tomcat if you are using the frevvo-tomcat bundle) instead of inside the database connector.
To help locate this, here is an example of a Datasource definition using <resource-ref>.<resource-ref> <description>MySQL Customers</description> <res-ref-name>jdbc/mystore_ds</res-ref-name> <res-type>javax.sql.DataSource</res-type> <res-auth>Container</res-auth> </resource-ref>
Remove the queryset attributes for date/dateTime/timestamp formats from all querysets. It is no longer necessary to add them. Refer to Defining SQL Queries - Dates andTime stamps for more information
Here is an example:<queryset name="myStore" timeStampFormat="yyyy-MM-dd HH:mm:ss" dateFormat="yyyy-MM-dd" xmlDateFormat="yyyy-MM-dd"> Should be <queryset name="myStore">
- Setup your v2.5.3+ database resource definition(s)
- Create <frevvo-home>\tomcat\conf\dbconnector.properties (if it does not already exist in your v7.3.2 frevvo server)
For each deleted <resource-def> lines, Add these lines
dbconnector.queryset@<your queryset name>.resource-def.url=<the url to your database> dbconnector.queryset@<your queryset name>.resource-def.user=<your database username> dbconnector.queryset@<your queryset name>.resource-def.password=<your database password>
For each deleted <resource-ref> lines, Add this line
dbconnector.queryset@mystore.resource-ref.name=jdbc/<name of your resource>
.
Copy the sample frevvo.connectors.database.configuration property and add it to the dbconnector.properties file.
Edit the frevvo.connectors.database.configuration line to be the path to your configuration.xml file.
Sample frevvo.connector.datqbase.configuration propertyfrevvo.connectors.database.configuration=file:///C:/frevvo/config/configuration.xml dbconnector.queryset@<your queryset name>.resource-def.url=<the url to your database> dbconnector.queryset@<your queryset name>.resource-def.user=<your database username> dbconnector.queryset@<your queryset name>.resource-def.password=<your database password
- Start Live Forms
- Browse http:<your server>:<port>/database/status Verify that the query validation page is loaded with status Passed
- Log into your tenant and test your forms and flows that interact with your database.
Migration Steps - Standalone
- Stop the Standalone Database Connector.
- Locate & Delete your previous database resource definition(s)
- Edit configuration.xml
- Delete all lines between and including <resource-def></resource-def> for all querysets
To help locate this, here is a example of a Datasource definition in configuration.xml
<resource-def> <url>YOUR database Url HERE</url> <driver>YOUR driver HERE</driver> <user>YOUR database user HERE</user> <password>YOUR password HERE</password> </resource-def>
The use of <resource-ref> definitions is NOT supported when running the Database Connector in standalone mode
- Setup your v2.5.3+ database resource definition(s)
- Edit the <db-home>\database-connector-2.5.x\conf\dbconnector.properties file
For each deleted <resource-def> lines, Add these lines
# Customize the DbConnector here logging.file=./logs/database-connector.%d{yyyy-MM-dd}.log server.port=8081 dbconnector.queryset@<your queryset name>.resource-def.url=<the url to your database> dbconnector.queryset@<your queryset name>.resource-def.user=<your database username> dbconnector.queryset@<your queryset name>.resource-def.password=<your database password>
Remove the queryset attributes for date/dateTime/timestamp formats from all querysets. It is no longer necessary to add them. Refer to Defining SQL Queries - Dates andTime stamps for more information
Here is an example:<queryset name="myStore" timeStampFormat="yyyy-MM-dd HH:mm:ss" dateFormat="yyyy-MM-dd" xmlDateFormat="yyyy-MM-dd"> Should be <queryset name="myStore">
- Copy the modified configuration.xml file to the <db-home>\database-connector-2.5.x\config .
Copy the JDBC driver for your database into <db-home>\database-connector-2.5.x\lib. Remember the MSSQL driver is included in the standalone database war
Restart the connector using one of these methods:
- Method 1: Using java in a command window
- Navigate to <db-home>\database-connector-2.5.x .Type java -jar database.war
- Method 2: for Windows OS
Double click the <db-home>\database-connector-2.5.x\Install-Service.bat file to install the connector as a Windows service. Click the Start-DBConnector-Service.bat file to start it
- Method 3 for *nix OS
- Execute the DB Connector.sh shell script for Unix/Linux operating systems.
- Method 4 for Linux
- The Database Connector can also run as a service under Linux systemd
- Method 1: Using java in a command window
Browse http://<your server>:8081/database/status Verify that query validation page is loaded with status Passed
- Log into your tenant and test your forms and flows that interact with your database.