Versions Compared

Key

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

...

Tip

While you are demo-ing frevvo Live Forms you do not need to do the Database Setup steps discussed below.

...

Warning

The default HSQLDB is ONLY sufficient for demo/trial versions of Live Forms. All other production Live Forms users MUST switch their frevvo Live Forms software to a production quality database.

...

Code Block
 <!--
                SQLSERVER Resource  
   -->
  
        <Parameter name="hibernate.dialect" value="org.hibernate.dialect.SQLServerDialect" override="false"/>
        <Resource auth="Container"
                factory="org.apache.commons.dbcp.BasicDataSourceFactory"
                maxActive="200"
                maxIdle="20"
                maxWait="10000"
                validationQuery="select 1"
                testOnBorrow="true"
                testOnIdle="true"
                timeBetweenEvictionRunsMillis="10000"
                removeAbandoned="true"
                logAbandoned="true"
                name="jdbc/frevvoDS"
                driverClassName="net.sourceforge.jtds.jdbcx.JtdsDataSource"
                username="root"
                password=""
                type="javax.sql.DataSource"
                url="jdbc:jtds:sqlserver://localhost/frevvoSubmissions"/>
          <Resource auth="Container"
                factory="org.apache.commons.dbcp.BasicDataSourceFactory"
                maxActive="200"
                maxIdle="20"
                maxWait="10000"
                validationQuery="select 1"
                testOnBorrow="true"
                testOnIdle="true"
                timeBetweenEvictionRunsMillis="10000"
                removeAbandoned="true"
                logAbandoned="true"
                name="jdbc/userDS"
                driverClassName="net.sourceforge.jtds.jdbcx.JtdsDataSource"
                username="root"
                password=""
                type="javax.sql.DataSource"
                url="jdbc:jtds:sqlserver://localhost/users"/>

 


 Configure the

...

Live Forms submissions database

Note
  1. The forms and users databases below must be created with [[#UTF8_Encoded_Database | UTF-8 encoding]].
  2. When using DB2, make sure that you create the forms database with a page size of 8K (the default of 4K is too small).

...

  1. Locate the '''frevvoDS''' data source url parameter.<nowiki>url="jdbc:jtds:sqlserver://localhost/frevvo"/></nowiki>. You can change the name "frevvo" to whatever you wish, "frevvoforms" for example. But it must match the database name you create in your SQL server. See [[#Verify_Connection_Url | verify connection Url]] below.
  2. Create a [[#UTF8_Encoded_Database | utf8 encoded]] database "frevvo" (assuming you left the url parameter database name as the default) in your SQL server
  3. In the frevvo Live Forms installation locate the script <frevvo-home>/data/sql/forms-<database type>.sql. Ex: for mySQL the script is named <frevvo-home>/data/sql/forms-mysql5.sql
  4. [[#Run_the_SQL_Scripts | Run that script]] in your "frevvoLive Forms" database. That will create all the tables required to persist submissions
  5. Set the '''frevvoDS''' data source parameters username and password to a user that has write permissions to the "frevvoLive Forms" database.
  6. The submissions database setup is now complete.

Configure the

...

Live Forms users database

For your selected database type in frevvo.xml,

  1. Locate the '''userDS ''' data source url parameter.<nowiki>url="jdbc:jtds:sqlserver://localhost/users"/></nowiki>. You can change the name "users" to whatever you wish, "frevvousersLive Formsusers" for example. But it must match the database name you create in your SQL server. See [[#Verify_Connection_Url | verify connection Url]] below.
  2. Create a [[#UTF8_Encoded_Database | utf8 encoded]] database "users" (assuming you left the url parameter database name as the default) in your SQL server
  3. In the frevvo Live Forms installation locate the script <frevvo-home>/data/sql/users-<database type>.sql. Ex: for mySQL the script is named <frevvo-home>/data/sql/users-mysql5.sql
  4. [[#Run_the_SQL_Scripts | Run that script]] in the "users" database
  5. Set the '''userDS''' data source username and password parameter to a user that has write permissions to your "users" database.

...

Configuration of the connection Url is key to successfully connection the frevvo Live Forms server to your database. Consult your DBA to assist with connection issues.

...


1) verify that the "url" parameter is pointing to the correct server. If frevvo Live Forms and the database server are collocated "localhost" may be fine.<br/>
The Url parameters depend on the database type and installation choices made when your DBA installed your database software. Consult your DBA for the correct connection values. For example, SQL server installed on a non-default port and running on a machine named e00sca will require that you add a port number and host name to the Url. For example:

...

If you are trying a different database type and do not see an example in frevvo.xml for  your database, you can create a new data source entry. Hibernate supports the following dialects however frevvo Live Forms has only been certified to run with a subset of these databases. For additional dialects see Hibernate documentation. [[#Configure_the_database | See the certified database list above]]:

...

These commands will create the proper frevvo Live Forms and users utf8 encoded database in mySql:

...

What does it mean to run the SQL scripts? The *.sql file is a text file with SQL statements to be executed by the SQL server. Here is one ways to run a SQL script for a mySql database to create the tables needed by frevvo Live Forms on a windows box.

  1. Open a Command Prompt window 
  2. cd to <frevvo installdir>\frevvo\data\sql
  3. execute the command: mysql <my_db_name> -u <user_name> -p < forms-mysql5.sql

This will prompt you for the mysql password for <user_name> and then execute the script creating all the required tables.

Install a JDBC Driver

frevvoLive Forms's submission and user databases rely on the JDBC API. You can use any relational database as long as you have a JDBC driver for that database, however. [[#Configure_the_database | See the list of frevvo Live Forms certified databases]]. If you choose a database that's not in this list you do so at your own risk.

...

In specific situations, your organization may require a certain naming convention for database objects (all uppercase, or at most 32 chars, or a specific name escaping convention) and the good news is that It is possible to change some of these parameters in frevvo Live Forms by setting a couple of specific web context parameters.

Note

However, the bad news is that this is not completely supported by frevvo Live Forms at this point. The main reason is that we cannot guarantee that all the existing functionality that we test before each release will work correctly for a given database when any of these settings is changed.

Note also that the following settings affect only the frevvoDS database schema (and not the userDS schema) and that any changes to these settings will force frevvo Live Forms to create a schema that is different than the pre-generated scripts found in frevvo/data/sql/forms-*.sql when the schema is initially empty (you have to start from an empty schema).

...

Note

Typically you should not need to move the forms database as these instructions only apply to frevvoLive Forms's built-in HSQLDB which should not be used for production use.

This information applies ONLY to the pre-installed demo database HSQLDB. When using the frevvo Live Forms tomcat bundle installation and the default configuration settings, the forms and users database is written to the <frevvo-home>\data\db directory. You may wish to locate the databases outside of <frevvo-home>. To do this:

...