Versions Compared

Key

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

Configuration Steps

1) &nbsp;&nbsp;Copy the JDBC driver appropriate for your database into <frevvo-home>\tomcat\webapps\database\WEB-INF\lib
* The database connector contains pre-installed drivers for the most popular databases. So you may be able to skip this step. See [[#Install_a_JDBC_driver | Install a JDBC driver]] below

...

[[Image:18px-Symbol_OK.svg.png]] We recommend that you do not leave your database configuration.xml file in its default locations. See [[#Configuration_File_Location | configuration file location]] below.

Configuration File Location

We recommend not leaving the database configuration file in its default location under the <frevvo-home>\tomcat\webapps\database\WEB-INF\etc\configuration.xml.
<div style=";background-color:#63ffc7">[[Image:Lightbulb.png]] One benefit of moving configuration.xml is any SQL query changes you make as you are in the development cycle will immediately be picked up by the database connector without having to stop/restart the connector. This can be very convenient </div>

...

[[Image:18px-Attention_niels_epting.svg.png]] '''NOTE:'
Currently you MUST restart frevvo after moving the configuration file location. If you don't restart frevvo the connector will return a blank page rather than data and the frevvo-tomcat log will show an NPE error.

Define the Data Source

The frevvo database connector needs to know:

...

<div style="background-color:#E0EFFF">
[[Image:Lightbulb.png]] '''NOTE:'''
Under most operating systems the database connector will automatically reload the configuration.xml as soon as you edit and save changes, without the need to restart tomcat or the database connector itself.
However under Mac OS auto reload does not work. To ensure that the change is reflected restart tomcat manually via the stop/start frevvo scripts.
</div>

mySQL example

A mySql database named "test" running on localhost on the default port when the login for user "root" requires no password:

...

Check with your database administrator or the documentation for your database drive for details on the correct database URL format.

HSQLDB example

Here is an example that connects to an '''HSQLDB driver'''.

...

The following examples are for several common databases. Please consult your database documentation and version for the exact configuration settings.

SQL Example

Here is an example that connects to a '''SQL Server driver'''.

<pre>
<resource-def>
    <url>jdbc:sqlserver://192.168.1.102;DatabaseName=mystore;</url>       
    <driver>com.microsoft.sqlserver.jdbc.SQLServerDriver</driver>
    <user>yourUser</user>
    <password>yourPassword</password>
</resource-def>
</pre>

SQL jTDS Example

This Url connects to a SQL Server using the jTDS driver that works with Microsoft SQL 2008

...

As of SQL 2000, Microsoft SQL allows installation of multiple [http://msdn.microsoft.com/en-us/library/aa176582%28v=sql.80%29.asp SQL named instances]. If your SQL server was installed this way you must use the instance parameter. For example if you database instance was named xyzzy:
<pre>
<url>jdbc:jtds:sqlserver://<sqlhost>:59377/acswa;instance=xyzzy</url>
</pre>

AS400/DB2 Example

Here is an example that connects to an '''AS400/DB2 Open Universal driver'''. Notice that the url also specifics a date separator used in this database.

...