Skip to main content
Skip table of contents

Configure database for Nexus Timestamp Server

This article describes the settings for storing information for Nexus Timestamp Server in a database. This is only done if audit is required or for other reason, for example, to keep track of amount of requests.

The configuration parameters are located in the file timestamp.properties and they apply to all services that do not have defined their own database connection.


Prerequisites

Consider these prerequisites:

  • You shall add database storage of timestamps to the filter chains, since this is not added to the filter chains of the sample configuration. This is necessary to enable database storage. Read more under heading ‚Äútimestamp.StorageFilter‚ÄĚ in Description of filters in Nexus Timestamp Server.
  • The Derby database is embedded in Nexus Timestamp server.
    • If you use JDBC drivers other than Derby, that is, if you use an external database, place the .jar file containing the JDBC driver in the lib folder of the installation.
    • If you use an external database, set up the database schemas beforehand. The tables will be created automatically when the server receives requests.


Set database parameters
  • Set these database parameters in timestamp.properties:
    Parameter Description Possible valuesDefault value

    storage 

    Set this parameter if information shall be stored in the same database as other timestamp services. A value of "system" corresponds to use the same database as other timestamp services else this parameter shall not be set.

    String-

    storage.database.jdbcDriver

    The JDBC driver class.

    String

    -

    storage.database.jdbcUrl

    The JDBC URL or path to a file.

    String-
    storage.database.jdbcUserThe user accessing the database.String-
    storage.database.jdbcPasswordThe users password.String

    -

Examples

Derby (embedded mode)

Example: Derby (embedded mode)

CODE
[shared]
# Derby (embedded mode) settings
storage.database.jdbcDriver=org.apache.derby.jdbc.EmbeddedDriver
storage.database.jdbcUrl=jdbc:derby:var/${Service};create=false
storage.database.jdbcUser=app
MySQL

Example: MySQL

CODE
[shared]
# MySQL settings
storage.database.jdbcDriver=com.mysql.jdbc.Driver
storage.database.jdbcUrl=jdbc:mysql://localhost/<database_name>
storage.database.jdbcUser=root
storage.database.jdbcPassword=password
Microsoft SQL

Example: Microsoft SQL

CODE
[shared]
# MSSQL settings
storage.database.jdbcDriver=com.microsoft.sqlserver.jdbc.SQLServerDriver
storage.database.jdbcUrl=jdbc:sqlserver://localhost:1433;databaseName=<database_name>
storage.database.jdbcUser=root
storage.database.jdbcPassword=password
PostgreSQL

Example: PostgreSQL

CODE
[shared]
# PostgreSQL settings
storage.database.jdbcDriver=org.postgresql.Driver
storage.database.jdbcUrl=jdbc:postgresql://localhost:5432/
<database_name>
storage.database.jdbcUser=postgres
storage.database.jdbcPassword=postgres
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.