Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

...

...

...



Section
Column

If you were using version 2.4 of the Database Connector in your previous installation, you can use the configuration files from that installation with version 2.5+ of the connector. This will work if you are running the connector in the tomcat bundle or standalone.

Column
width400px

 On This Page:

Table of Contents

...

  1. Stop if it is running. You do not have to stop the Insight Server.
  2. Copy the v2.5 database.war into  <frevvo-home>\tomcat\webapps directory in your the v7.2+installation.
  3. Copy the JDBC driver appropriate for your database into <frevvo-home>\tomcat\lib if it is not there already.

    Info

    The database connector contains some pre-installed drivers. So you may be able to skip this step. See the Install a JDBC driver topic.

  4.  Add this parameter to the v7.2+ frevvo-home>\tomcat\conf\Catalina\localhost\context.xml.default file. This file contains the path parameter to the configuration.xml file. The connector will pick up the configuration.xml file if it is located in the current working directory (where the DB Connector was launched) or you can create a <frevvo-home>/config/ directory and copy the v2.4 configuration.xml there. It can also be manually set by using the frevvo.connectors.database.configuration property in the context.default..xml file if you are deploying the connector in the tomcat bundle. Here is an example:

    Code Block
    <Parameter name="frevvo.connectors.database.configuration" value="<path>\<to>\configuration.xml" override="false"/>

    Be sure to add it OUTSIDE of the manager tags in the file. Also, verify that your path to the configuration file is correct. Here is an example of how the file should look after editing:

    Code Block
    <Context swallowOutput="true" unloadDelay="40000" useHttpOnly="true">
            <Manager className="org.apache.catalina.session.PersistentManager" saveOnRestart="false">
                    <Store className="org.apache.catalina.session.FileStore"/>
            </Manager>
            <Parameter name="insight.server.url" value="http://localhost:8983/solr" override="false"/>
            <Parameter name="frevvo.connectors.database.configuration" value="C:\frevvo-721-DLGA\frevvo\dbconfig\configuration.xml" override="false"/>
    </Context>
  5. Copy the configuration.xml file from your previous installation to the path specified in the frevvo-home>\tomcat\conf\Catalina\localhost\context.xml.default file.

    Tip
    • If you used <resource-def>...</resource-def> to configure database resources in the 2.4 configuration.xml, you can just leave them there.

    • If you used <resource-ref>...</resource-ref> to configure database resources in the 2.4 configuration, make sure  the <Resource-ref>  definition is included in <frevvo-home>\tomcat\conf\Catalina\localhos\context.default.xml file. 
    • Click the arrow below for more information about resource-def and resource-ref elements.
  6. Start Live Forms

  7. Browse  http://localhost:8082/database/status page

    • Verify that query validation page is loaded with status Passed

  8. Log into your tenant  and test your forms and flows that interact with your database.

...

Defining Datasources in the configuration.xml file

...

Using the v2.4 configuration.xml file that contains <resource-ref> with the v2.5 connector

If you configured <resource-ref> in the previous installation then follow these steps to use your v2.4 configuration file with the v2.5 connectorThere is an alternate approach that defines the database connection in the application container (Tomcat if you are using the frevvo-tomcat bundle) instead of inside the database connector. To use this approach:

  1.  Edit frevvo\tomcat\conf\Catalina\localhost\context.xml.default file in your v7.2+ installation to add the "frevvo.connectors.database.configuration' and Resource Name parameters if they are not already defined. 

    Code Block
     
  2. Define a <resource> as shown below. The XML samples below assume a MySql database driver. You will need to replace this sample values to match your database type.

    This is the format of the <resource> element in context.xml.default.

    Code Block
    <Resource name="jdbc/mystore_ds"
              auth="Container"
              factory="org.apache.commons.dbcp.BasicDataSourceFactory"            
              driverClassName="com.mysql.jdbc.Driver"
              username="YOUR database user HERE"
              password="YOUR database password HERE"
              type="javax.sql.DataSource"
              url="jdbc:mysql://localhost/mystore?autoconnect=true"/>
    
    

     

    A sample context.xml.default file for MySQL is shown below

    Code Block
    <Context swallowOutput="true" unloadDelay="40000" useHttpOnly="true">
            <Manager className="org.apache.catalina.session.PersistentManager" saveOnRestart="false">
                    <Store className="org.apache.catalina.session.FileStore"/>
            </Manager>
            <Parameter name="insight.server.url" value="http://localhost:8983/solr" override="false"/>
            <Parameter name="frevvo.connectors.database.configuration" value= "<path to the configuration.xml file>" override="false"/>
            <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"/>
    </Context>
  3. Replace the <resource-def> element in your configuration.xml with a <resource-ref> element as shown below.

    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>
  4. Verify that the resource-ref is defined in your configuration.xml file for each queryset.
  5. Alternatively, you can copy frevvo\tomcat\conf\Catalina\localhost\context.xml.default and dbconfig\configuration.xml to appropriate location in the v7.2+ tomcat bundle.

Configure the v2.5 connector using the 2.4 configuration files in Standalone mode

...