Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Before it builds a pool of database connections, DSpace always tries to look up an existing, pre-configured 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. If DSpace does not find a pre-configured pool, each web application will fall back to creating its own pool using the settings in local.cfg.

There are some advantages to doing thisusing an external database pool:

  • You can share a one pool among several of DSpace's web applications, or applications—or even all of them.   This can help to economize on DBMS database 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 five5, 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 sizes for the web applications and the command line tools.   Let the web app.s be given For example, configure an external pool with generous settings for the web applications, and configure a much smaller pool for the command line applications in local.cfg.   The Note: the command line tools will cannot use an externally configured pool, and always use the configured settings to in local.cfg to build their own pool.
  • External database pooling often allows for more granular configuration of pool parameters and can even provide better performance than DSpace's fallback pooling (see the Tomcat JNDI Datasource HOW-TO for more information).

DSpace applications will specifically look for an object named 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 is not configurable, but is specified in config/spring/api/core-hibernate.xml if you must know. You must configure the name of the directory object provided to the your web application context(s) , which you will configure in the containerto match this. See below for an example in Tomcat.

An example in Tomcat

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

...