Group: proj-helpdesk
Alexandre Boisseau (boisseau@univ-brest.fr)
boisseau at univ-brest dot fr
Benjamin SECLIER (bseclier@univ-nancy2.fr)
benjamin dot seclier at univ-nancy2 dot fr
Brice Quillerie (bquiller@univ-montp1.fr)
brice dot quillerie at univ-montp1 dot fr
Brigitte Wallaert Taquet (wallaert@univ-lille1.fr)
brigitte dot wallaert at univ-lille1 dot fr
Doriane Dusart (ddusart@univ-valenciennes.fr)
doriane dot dusart at univ-valenciennes dot fr
Fabien Wald (wald_f@uhb.fr)
fabien dot wald at uhb dot fr
Fabrice Jammes (fjammes@univ-paris1.fr)
fabrice dot jammes at univ-paris1 dot fr
Harold Moyse (1986138@sac.cru.fr)
harold dot moyse at uvsq dot fr
Jean Philippe FLORET (a04a3347@univ-cezanne.fr)
jp dot floret at univ-cezanne dot fr
Julien MARCHAL (jmarchal@univ-nancy2.fr)
julien dot marchal at univ-nancy2 dot fr
Julien Pedrono (1986401@sac.cru.fr)
julien dot pedrono at insa-rennes dot fr
Mathieu MOLINERIS (molineris@univmed.fr)
mathieu dot molineris at univmed dot fr
Miniussi Alain (2276872@sac.cru.fr)
alain dot miniussi at oca dot eu
Odile Germes (germes@univ-rennes1.fr)
odile dot germes at univ-rennes1 dot fr
Pascal Aubry (paubry@univ-rennes1.fr)
pascal dot aubry at univ-rennes1 dot fr
Philippe Lecler (2324998@sac.cru.fr)
philippe dot lecler at irisa dot fr
Vincent Repain (vrepain@univ-rennes1.fr)
vincent dot repain at univ-rennes1 dot fr
Yves Deschamps (ydescham@univ-lille1.fr)
yves dot deschamps at univ-lille1 dot fr
Skip to end of metadata
Go to start of metadata

See also: Customizing the database connection

The database connection is handled by Hibernate. The properties below (set in /properties/config.properties) are used by the Hibernate configuration files /properties/dao/hibernate/hibernate-jdbc.cfg.xml and /properties/dao/hibernate/hibernate-jndi.cfg.xml, as well as the Tomcat configuration file conf/server.xml for quick-start deployments.

Creating the database
esup-helpdesk, when running the ant task init-data, creates all the structures (tables) of the database, but the database must exist. It is up to the deployer to create the database and make sure that the database user declared can create structures (tables, fields) and has read/write access to the database.
Use InnoDB with MySql
With MySql, the type of the database must be InnoDB.In order to automatically create InnoDB databases, set this property in the MySql configuration:

Database manager properties

Driver

The driver of the database manager (by default MySql JDBC):

For Postgres use:

Hibernate dialect

The Hibernate dialect, by default MySql InnoDB:

For Postgres use:

JDBC properties

esup-helpdesk always uses JDBC to access the database from ant tasks (asynchronous commands).

URL (required)

The JDBC URL of the database, by default helpdesk on localhost:

For Postgres use:

Authentication (required)

The credentials used to connect to the database:

JNDI properties

esup-helpdesk can use JNDI to access the database from web requests. Using JNDI is recommended in production for performance reasons, it allows deployers to monitor the database load thanks to tools such as LambdaProbe (see 25 Surveillance des applications).

To use JDBC to access the database even from web requests, set this property:

To use a connection pool set like this ion Tomcat in the application context,

Tell the application the name of the pool:

The application automatically detects its running mode (batch or web) to use JDBC (batch) or JNDI (web).

JDBC connector

esup-helpdesk is configured by default to use MySql, it embeds the MySql connector for Java (mysql-connector-java.jar). To connect to another database manager:

See: The Hibernate documentation

MySql

The MySql connector is embedded by default in the distribution.

Postgres


  • Version 7.4:  pg74.1jdbc3.jar
  • Version 8.2: postgresql-8.2-506.jdbc3.jar

Connectors for Postgres can be downloaded from http://jdbc.postgresql.org/download.html.

Oracle

TODO Any Oracle deployer?


Labels:
None
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.
  1. sept. 11, 2009

    Statistics are not operatable with PostgreSQL. In PostgreSQL you should implement TIME_DIFF and TIME_TO_SEC functions for MySQL compatibility. Use the following code: