Section | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
...
- 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
Code Block <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>.Code Block <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>
- Setup your v2.5.3+ database resource definition(s)
- Create <frevvo-home>\tomcat\conf\frevvo-config.properties (if it does not already exist in your v7.3.2 frevvo server)dbconnector.properties
For each deleted <resource-def> lines, Add these lines
Code Block 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
Code Block dbconnector.queryset@mystore.resource-ref.name=jdbc/<name of your resource>
Expand title Click here for more information If you prefer to define your datasources on the container level, the recommended approach is to define the datasource in the container and then use a resource-ref in the Database Connector properties file to reference it..
Info Using <Resource-ref> to define datasources is not supported if you are running the Database Connector in Standalone mode. Use <Resource-def> instead.
Follow these steps:
1. Edit the <frevvo-home>\tomcat\conf\Catalina\localhost\context.xml.default file
a, Add the Resource name parameter. An example is shown below:
Code Block <Resource name="jdbc/<your database name>" auth="Container" driverClassName="com.mysql.jdbc.Driver" username="<your database user>" password="<your database password>" type="javax.sql.DataSource" url="jdbc:mysql://localhost/<your queryset name>?autoconnect=true"/>
2. Edit frevvo\tomcat\conf\frevvo-configdbconnector.properties file. Verify that the frevvo.connectors.database.configuration property has been set and add the dbconnector.resource-ref.name property as shown below:
Code Block dbconnector.queryset@<queryset name>.resource-ref.name=jdbc/<name of your resource>
.
Copy the sample frevvo.connectors.database.configuration property and add it to the frevvo-configdbocnnector.properties file.
Edit the frevvo.connectors.database.configuration line to be the path to your configuration.xml file.
Code Block title Sample frevvo.connector.datqbase.configuration property frevvo.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://localhost:8082<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.
...
- 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
Code Block <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>
Note The use of <resource-ref> definitions is NOT supported when running the Database Connector in standalone mode
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
- 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
Code Block # 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>
- 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
Expand title Click to see standalone bundle content details Excerpt The Standalone Database Connector bundle includes the files shown in the image:
Note the files in the database-connector-2.5.x directory that are used to manage the Database Connector as services on *nix and Windows operating systems: These files should be run as an administrator.
Install-Service.bat - installs the Database Connector on a Windows system as a service named frevvo Database Connector.
Uninstall-service.bat - uninstalls the frevvo Database Connector on a Windows operating system
Start-DB Connector-Service.bat - starts the frevvo Database Connector on a Windows operating system
Start-DBConnector.sh - starts the frevvo Database Connector as a *nix console instance.
Restart-DBConnector-Service.bat - restarts the frevvo Database Connector on a Windows operating system
Restart-DBConnector.sh - restarts the frevvo Database Connector as a *nix console instance.
Stop-DBConnector-Service.bat - stops the frevvo Database Connector on a Windows operating system.
Stop-DbConnector.sh - stops the frevvo Database Connector *nix console instance.
- 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
Expand title Click here for the details It is possible to manage the Database Connector using systemd ‘service’ scripts.
- Copy the sample service file located in /bin/dbconnector.service to /etc/systemd/system
- Review it's contents and
- Make sure it is executable.
You can now use systemd to manage the dbconnector service:
systemctl start dbconnector.service
systemctl stop dbconnector.service
systemctl restart dbconnector.service
systemctl status dbconnector.service
To flag the service to start automatically on system boot use the following command:
Code Block systemctl enable dbconnector.service
Consult the service unit configuration man page for more details.
- Method 1: Using java in a command window
Browse http://localhost<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.
...