Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Began documenting JNDI pool injection

...

DSpace uses the Apache Solr application underlaying the statistics. There is no need to download any separate software. All the necessary software is included. To understand all of the configuration property keys, the user should refer to DSpace Statistic Configuration for detailed information.

External database connection pool

Before it builds a pool of database connections, DSpace tries to look up an existing pool in a directory service (if such a service is provided).  Many web application containers supply such a service and can be configured to provide the connection pool to DSpace.

There are some advantages to doing this:

  • You can share a pool among several of DSpace's web applications, or even all of them.  This can help to economize on DBMS connections when one application uses many and another few.  For example, if XMLUI needs 30 connections to run well at your site under peak load, and OAI-PMH needs five, you could connect them both to a pool of 35 connections, instead of letting each take 30 for a total of 60.
  • You can have different pool size settings for the web applications and the command line tools.  Let the web app.s be given an external pool with generous settings, and configure a much smaller pool in local.cfg.  The command line tools will use the configured settings to build their own pool.

Unless you have reconfigured db.jndi in config/local.cfg, DSpace applications will look up java:comp/env/jdbc/dspace.  The value of db.jndi must match the name of the directory object provided to the web application context(s), which you will configure in the container.

An example in Tomcat

First you must make the DBMS driver JAR available to Tomcat. TBS

Add a <Resource> in Tomcat's server.xml to define the pool:

Code Block
languagexml
titleserver.xml
  <GlobalNamingResources>
...
    <Resource
        name='jdbc/instance'
        description='Our DSpace DBMS connection pool'
        type='javax.sql.DataSource'
        auth='Container'
        username='USER'
        password='SECRET'
        driverClassName='org.postgresql.Driver'
        url='jdbc:postgresql://dbms.example.com:5432/dspace'
        initialSize='5'
        maxTotal='50'
        maxIdle='15'
        minIdle='5'
        maxWaitMillis='5000'
        />
...
  </GlobalNamingResources>

Add a <ResourceLink> in each Context:

Code Block
languagexml
<Context
...
  <ResourceLink
    name='jdbc/dspace'
    global='jdbc/instance'
    type='javax.sql.DataSource'
   />
...
</Context>

Notice that the name of the ResourceLink matches the value of db.jndi, and the global in the ResourceLink matches the name of the Resource.

Windows Installation

Essentially installing on Windows is the same as installing on Unix so please refer back to the main Installation Instructions section.

...