Hi,

I have multiple webapps which must share the same dataresource (DBCP to Oracle DB). Currently I'm using this resource from the <DefaultContext> element, it works fine there.
But, I was wondering if I can make it 'globally' available in the <GlobalNamingResources> element. The docs say that it should be possible, but I'm not getting it to work, it seems (by debugging) that the factory is called, but it is missing the parameter values.
This is my resource definition (same as in <DefaultContext>) in GlobalNamingResources:

<GlobalNamingResources>


<Resource name="jdbc/oracledb" auth="Container"
type="javax.sql.DataSource"/>

<ResourceParams name="jdbc/oracledb">
<parameter>
<name>factory</name>
<value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
</parameter>
<parameter>
<name>driverClassName</name>
<value>oracle.jdbc.pool.OracleConnectionPoolDataSource</value>
</parameter>
<parameter>
<name>url</name>
<value>jdbc:oracle:thin:@dbhost:1521:db</value>
</parameter>
<parameter>
<name>username</name>
<value>someuser</value>
</parameter>
<parameter>
<name>password</name>
<value>somepassword</value>
</parameter>
<parameter>
<name>maxActive</name>
<value>20</value>
</parameter>
<parameter>
<name>maxIdle</name>
<value>2</value>
</parameter>
<parameter>
<name>maxWait</name>
<value>-1</value>
</parameter>
</ResourceParams>


</GlobalNamingResources>

My questions:

1. Is this the preferred approach?
2. Why is it not working? I'm getting a SQLE: java.sql.SQLException: Cannot load JDBC driver class 'null'

Thanks for your help,

Klaas




_________________________________________________________________
MSN 8: advanced junk mail protection and 3 months FREE*. http://join.msn.com/?page=features/junkmail&xAPID=42&PS=47575&PI=7324&DI=7474&SU= http://www.hotmail.msn.com/cgi-bin/getmsg&HL=1216hotmailtaglines_advancedjmf_3mf


--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to