Child pages
  • Database Connections

Versions Compared

Key

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

Servoy utilizes a three tier architecture for database access: Clients communicate with the Servoy Application Server and the Application Server communicates with the database.

For each defined database, the Servoy Application Server manages a pool of database connections, the size of which is configurable.

The Application Server connects to databases through JDBC , a universal Java technology for Java applications to communicate with SQL databases.

JDBC Drivers

In order to be able to connect to a database, the Servoy Application Server requires a JDBC Driver.

Servoy ships drivers for a several databases. For a full overview of the JSBD drivers shipped with a specific Servoy version, check the Servoy Stack info page in the Programming Reference Guide for the Servoy version used. 

The JDBC drivers are stored in the ../application_server/drivers/ directory.

Additional JDBC Drivers can be manually placed in this directory or can be uploaded through the Upload Library section of the Servoy Admin page. In both scenario's the Application Server requires a restart.

(warning)  While one database is more strict than the other, it is important to use the correct version JDBC Driveror a specific version of the database. Notably Oracle is very strict: even using the JDBC driver of another minor version might cause unexpected results! Refer to the documentation of the database vendor for the correct JDBC driver.

Note
titleoraclelobfix.jar

The oraclelobfix.jar file in the drivers directory is not an Oracle JDBC driver, but a library containing a fix for an issue in the Oracle JDBC driver. When connecting to Oracle databases, it's still required to add the correct Oracle JDBC driver so the Servoy Application Server installation.

Configuring database access

Access to databases can be configured through Database Servers section of the Servoy Admin page and are stored in the servoy.properties file.

In order to connect the Servoy Application Server to a database, the following information is required:

Property

Description

Required

Comment

Server name

 

Yes

 

User name

 

Yes

 

Password

 

Yes

 

URL

 

Yes

 

Driver

 

Yes

 

Catalog

 

Depends

 

Schema

 

Depends

 

Max. Connection Active

 

Yes

 

Max. Connections Idle

 

Yes

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

  • Server Name
    name used within Servoy solutions to access the a certain database
  • User Name & password
    The username and password used by the Servoy Application Server to connect to the database
  • Connection URL
    The url used by the Servoy Application Server to connect to the database
  • Driver ClassName
  • Catelog or Schema (optional)

Connection Pooling configuration 

Servoy relies on SQL databases for data storage. Servoy is database agnostic and can connect to any database that supports JDBC.

...