Configuring a Database
This is a mandatory operation for productive environments. |
eSign requires a persistence layer to store documents until they are signed and submitted. By default the persistence layer is implemented over the local filesystem. However, this setup should only be used by developers, and is neither compatible with high availability setups, nor is it supported in productive environments.
Hence, when preparing your productive environment one of the first steps is to configure eSign to use a database.
Even in development environments we strongly recommend using a database persistence setup. |
Execute Database Scripts
eSign provides database scripts for the supported databases. See Supported Databases.
-
Execute the database script matching your database.
All database scripts are idempotent and can be executed over previous version scripts. |
Installing JDBC Driver
-
Download the JDBC driver that fits your database provider and version.
(If you are unsure on how to retrieve your JDBC drive, the Maven Repository is a good place to start) -
From
esign-home
directory, copy your JDBC driver (jar) toextensions
directory.
Configure Database Persistence
-
From
esign-home
directory, openconfig/esign.config
and add a new entry in theproperties
section:{ ... "properties": { ... "persistence.mode": "hibernate" } }
-
From
esign-home
directory, openresources/esign.hibernate.cfg.xml
and change it to match your database.-
Configuring Postgres Database:
<property name="hibernate.dialect">org.hibernate.dialect.PostgreSQLDialect</property> <property name="hibernate.bytecode.use_reflection_optimizer">false</property> <property name="hibernate.connection.driver_class">org.postgresql.Driver</property> <property name="hibernate.connection.url">jdbc:postgresql://[HOST]:[PORT]/[DATABASENAME]</property> <property name="hibernate.connection.username">[USERNAME]</property> <property name="hibernate.connection.password">[PASSWORD]</property>
-
Configuring Oracle Database:
<property name="hibernate.dialect">org.hibernate.dialect.Oracle12cDialect</property> <property name="hibernate.bytecode.use_reflection_optimizer">false</property> <property name="hibernate.connection.driver_class">oracle.jdbc.driver.OracleDriver</property> <property name="hibernate.connection.url">jdbc:oracle:thin:@[HOST]:[PORT]:[DATABASE]</property> <property name="hibernate.connection.username">[USER]</property> <property name="hibernate.connection.password">[PASSWORD]</property>
-
Configuring MSSQL Database:
<property name="hibernate.dialect">org.hibernate.dialect.SQLServer2012Dialect</property> <property name="hibernate.bytecode.use_reflection_optimizer">false</property> <property name="hibernate.connection.driver_class">com.microsoft.sqlserver.jdbc.SQLServerDriver</property> <property name="hibernate.connection.url">jdbc:sqlserver://[HOST]:[PORT];database=[DATABASE];</property> <property name="hibernate.connection.username">[USER]</property> <property name="hibernate.connection.password">[PASSWORD]</property> <property name="hibernate.default_catalog">[CATALOG]</property> <property name="hibernate.default_schema">[SCHEMA]</property>
The listed configurations are recommendations, for all detailed options check the official Hibernate Documentation.
-