configuration.rst 3.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. .. _community_jdbcstore_config:
  2. JDBCStore configuration
  3. ========================
  4. The JDBCStore module is configured in the file ``jdbcstore/jdbcstore.properties`` inside the :ref:`datadir`.
  5. The following properties may be set:
  6. - ``enabled``: Use JDBCStore. Turn off to use the data directory for all configuration instead.
  7. - ``initdb``: Initialize an empty database if this is set on true.
  8. - ``import`` : The import configuration option tells GeoServer whether to import the current :ref:`datadir` from the file system to the database or not. If set to true, it will be imported and the config option will be set the value 'false' for the next start up to avoid trying to re-import the catalog configuration.
  9. - ``initScript``: Path to initialisation script .sql file. Only used if ``initdb`` is true.
  10. - ``ignoreDirs``: specify all subdirectories of the :ref:`datadir` that should be ignored by the JDBCStore, in a comma-separate list. These subdirectories will not be imported and while JDBCStore is running, all access to these subdirectories and their contents will be redirected to the default file system store. This is usually done with the ``data`` directory (which holds data rather than metadata such as images and shapefiles), temporary directories (which are not used for permanent storage) and the catalog directories (when using JDBCConfig, these are unused anyway and they need not be copied into the JDBCStore).
  11. - ``cachedDirs``: specify all subdirectories of the :ref:`datadir` that should be automatically cached on the file system by the JDBCStore, in a comma-separate list. These subdirectories will be stored in the database, but an up-to-date copy will be stored on the hard drive at all times. This is handy for files that are used by tools that do not support jdbcstore (such as :ref:`Application Schemas <app-schema>` for example) but still need to be synced between nodes.
  12. - ``deleteDestinationOnRename``: allow automatic overwriting of existing destinations on move and rename operations (linux-style versus windows-style - the default store is platform dependant).
  13. JNDI
  14. ~~~~
  15. Get the database connection from the application server via JNDI lookup.
  16. - ``jndiName``: The JNDI name for the data source. Only set this if you want to use JNDI, the JDBC configuration properties may still be set for in case the JNDI Lookup fails.
  17. Direct JDBC Connection
  18. ~~~~~~~~~~~~~~~~~~~~~~
  19. Provide the connection parameters directly in the configuration file. This includes the password in the clear which is a potential security risk. To avoid this use JNDI instead.
  20. - ``jdbcUrl``: JDBC direct connection parameters.
  21. - ``username``: JDBC connection username.
  22. - ``password``: JDBC connection password.
  23. - ``pool.minIdle``: minimum connections in pool
  24. - ``pool.maxActive``: maximum connections in pool
  25. - ``pool.poolPreparedStatements``: whether to pool prepared statements
  26. - ``pool.maxOpenPreparedStatements``: size of prepared statement cache, only used if ``pool.poolPreparedStatements`` is true
  27. - ``pool.testOnBorrow``: whether to validate connections when obtaining from the pool
  28. - ``pool.validationQuery``: validation query for connections from pool, must be set when ``pool.testOnBorrow`` is true
  29. - ``pool.testWhileIdle``: whether to validate idle connections, used in conjunction with the idle timer below
  30. - ``pool.setTimeBetweenEvictionRunsMillis``: period in millseconds for the idle object evictor, -1 to disable