Edit Database Settings
This page allows you to setup the SQL database connection.
It is mandatory to switch FileCatalyst Workflow to
an external MariaDB or MySQL instance, rather than continuing with the internal HSQL
database server. The HSQL database server is only provided to facilitate installation, and lacks
the security and performance required for a production environment.
The database path typically looks like one of these options:
HSQL | jdbc:hsqldb:hsql://localhost:4406/ | HSQL will always be running on the same machine as
FileCatalyst Workflow so localhost is acceptable. |
MySQL | jdbc:mysql://{SERVER_HOST}:{PORT}/ | MySQL may or may not run on the same machine as
FileCatalyst Workflow |
MySQL
Note that if connecting to a MySQL server located on another computer, create privileges will have to be granted
using the MySQL command line to the computer running FileCatalyst Workflow.
Drivers
Database drivers (JDBC) are freely available for most databases. Only JDBC drivers for HSQL Server and
MySQL Server are formally tested by FileCatalyst. The application no longer ships with the MySQL driver due to licensing restrictions.
It ships with the
MariaDB Connector/J
which can be used to connect to MySQL. You may also choose to use the other driver option but
in order to use this option please follow the steps described below -
- Shut down the Tomcat server.
- Browse to lib directory of the application deployment. For instance on a Tomcat deployment the lib directory can be found at -
/{path to tomcat}/webapps/workflow/WEB-INF/lib
- Copy the JAR file for your preferred
driver into the lib folder.
- Restart Tomcat.
- Login to the application with your super-admin credentials and navigate to 'Edit Database Settings' page again.
- Select the "Other option"
- Provide the main class name for your choice of JDBC driver. For example : If you wanted to use the MySQL driver the class name
would be
com.mysql.jdbc.Driver
.
- Fill out the database path for the database you are connecting.
- Provide the database name, the username and the password to authenticate the database connection.
- Click on
Convert Existing Data
or Save Database Settings
based on your use case.
Database Parameters
When using MySQL and not connecting securely using SSL, Database Parameters must include "useSSL=false", this will suppress
security warnings in the FileCatalyst Workflow logs.
Settings Related to the Database Connection Pool
A connection pool is a cache of database connections maintained by the database
so that the connections can be reused when the database receives future requests
for data. Connection pools are used to enhance the performance of executing commands on a
database. Opening and maintaining a database connection for each user, especially requests
made to a dynamic database-driven web site application, is costly and wastes resources.
In connection pooling, after a connection is created, it is placed in the pool and it is
used over again so that a new connection does not have to be established. If all the connections
are being used, a new connection is made and is added to the pool. Connection pooling also cuts
down on the amount of time a user must wait to establish a connection to the database.
FileCatalyst Workflow provides the following configurable pool settings:
minimum-connection-count:
The minimum number of connections we will keep open,
regardless of whether anyone needs them or not. Recommended default
is 5.
maximum-connection-count:
The maximum number of connections to the database. Recommended Default
is 20.
maximum-active-time:
If the housekeeper comes across a thread that has been active
for longer than this then it will kill it. So make sure you set
this to a number bigger than your slowest expected response!
Recommended Default is 5 minutes.
maximum-connection-lifetime:
The maximum amount of time that a connection exists for before
it is killed (milliseconds). Recommended Default is 4
hours.
prototype-count:
If there are fewer than this number of connections available
then we will build some more (assuming the
maximum-connection-count is not exceeded). For example. Of we
have 3 active connections and 2 available, but our
prototype-count is 4 then it will attempt to build another 2.
This differs from minimum-connection-count because it takes into account
the number of active connections. minimum-connection-count is absolute and
doesn't care how many are in use. prototype-count is the number of spare
connections it strives to keep over and above the ones that are currently active.
Recommended Default is 2.
View Pool Status:
Will display the current status of the database pool, use this option to optimize the pool settings for your deployment.
Save Buttons
"Save Pool Settings" button will only update the pool settings and will not change the database settings
"Convert Existing Data" button will save the database settings (but not the Pool settings), it will then create the database and import the
existing data to the new database. This button is recommended when migrating from HSQL to MySQL. Converting from MySQL back to HSQL is NOT supported.
"Save Database Settings" button will save the database settings (but not the Pool settings) - no data migration will be attempted.
Use this button when updating the MySQL connection to SSL for example
and when you already have all the data synchronized between the two database settings.