On Wed, Oct 10, 2012 at 09:37:49PM +0200, helix84 wrote: > On Wed, Oct 10, 2012 at 9:31 PM, Mark H. Wood <[email protected]> wrote: > > If the property is defined, the DBMS code will look it up in JNDI and > > use the value of that (if found) as the connection pool. Many servlet > > containers (following the JEE spec, where this is standardized) > > provide a JNDI InitialContext which can be loaded with such objects at > > startup, or you can build a pool and serialize it to an LDAP directory > > for lookup. > > I see, once I was trying to configure the DB pool as a Resource in the > Tomcat Context. But it didn't work. So I guess the reason was that I > didn't have db.jndi defined. But what would the value of db.jndi be?
The path to the pool, below java:comp/env. So if you stored the pool
at java:comp/env/jdbc/mydspace, then db.jndi = jdbc/mydspace. If
you're using Tomcat, I think that the value for db.jndi would be the
same as the value of 'name' in the Resource element.
Here's one that is working for me right now:
<Context
docBase='/home/mwood/dspaces/dspace3/webapps/xmlui'>
<Parameter
description='Path to the DSpace configuration file.'
override='false'
name='dspace-config'
value='/home/mwood/dspaces/dspace3/config/dspace.cfg'
/>
<Resource name="jdbc/dspace"
auth="Container"
type="javax.sql.DataSource"
factory="org.apache.tomcat.jdbc.pool.DataSourceFactory"
driverClassName="org.postgresql.Driver"
url="jdbc:postgresql://127.0.0.1:5432/mhw-dspace3"
username="mwood"
password="secret"
maxActive="20"
maxIdle="10"
maxWait="-1"
/>
</Context>
and in dspace.cfg:
db.jndi = jdbc/dspace
--
Mark H. Wood, Lead System Programmer [email protected]
Asking whether markets are efficient is like asking whether people are smart.
pgpc6CmuD61I4.pgp
Description: PGP signature
------------------------------------------------------------------------------ Don't let slow site performance ruin your business. Deploy New Relic APM Deploy New Relic app performance management and know exactly what is happening inside your Ruby, Python, PHP, Java, and .NET app Try New Relic at no cost today and get our sweet Data Nerd shirt too! http://p.sf.net/sfu/newrelic-dev2dev
_______________________________________________ Dspace-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/dspace-devel
