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 an in-memory H2 database. 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.

  1. Execute the database script matching your database.

All database scripts are idempotent and can be executed over previous version scripts.

Installing JDBC Driver

  1. 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)

  2. From esign-home directory, copy your JDBC driver (jar) to extensions directory.

Configure Database Persistence

  1. From esign-home directory, open config/esign.config and add a new entry in the properties section:

    {
    	...
    
    	"properties": {
    
    		...
    
    		"database.dialect" : "<dialect>",
    		"database.driver" : "<driver>",
    		"database.url" : "<url>",
    		"database.user" : "<user>",
    		"database.password" : "<password>",
    	}
    }
    • Configuring Postgres Database:

      "database.dialect": "org.hibernate.dialect.PostgreSQLDialect",
      "database.driver": "org.postgresql.Driver",
      "database.url": "jdbc:postgresql://[HOST]:[PORT]/[DATABASENAME]",
    • Configuring Oracle Database:

      "database.dialect": "org.hibernate.dialect.Oracle12cDialect",
      "database.driver": "oracle.jdbc.driver.OracleDriver",
      "database.url": "jdbc:oracle:thin:@[HOST]:[PORT]:[DATABASE]",
    • Configuring MSSQL Database:

      "database.dialect": "org.hibernate.dialect.SQLServer2012Dialect",
      "database.driver": "com.microsoft.sqlserver.jdbc.SQLServerDriver",
      "database.url": "jdbc:sqlserver://[HOST]:[PORT];database=[DATABASE];",