Database Connection
Common Parameters
- db.use
-
Sets the mode to be used to connect to the database
-
jdbc
: Every web application maintains its own connections ("direct connection") -
jndi
(recommended): All web applications use shared connections provided by the Tomcat container via JNDI ("container-managed").
-
- db.jndi.name
-
The JNDI name with which the database can be queried by the container. This setting normally has the value
java:comp/env/jdbc/secman
. - db.hibernate.dialect
-
The technical dialect employed by your database. This parameter is used internally to generate accurate, optimised database queries.
Known dialects PostgreSQL
org.hibernate.dialect.PostgreSQL9Dialect
Oracle
org.hibernate.dialect.Oracle10gDialect
Microsoft SQL Server
org.hibernate.dialect.SQLServerDialect
HSQL DB
org.hibernate.dialect.HSQLDialect
- db.hibernate.schemaUpdate
-
Switches the automatic table generation on or off. Permitted values are
validate
,update
and an empty string. Set this parameter to an empty string in productive environments.
Parameters for "direct connection"
The following parameters are only used, when db.use=jdbc
is set.
- db.jdbc.driver
-
Name of the JDBC driver. Its value depends on the database system in use
- db.jdbc.url
-
The URL of the JDBC database connection. Its value depends on the database system in use.
- db.jdbc.username
-
Username of the person using the database.
- db.jdbc.password
-
Password of the person using the database.
- db.jdbc.maxActiveConnections
-
Maximum number of active database connections in the deployed connection pool.