tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Klaas van der Ploeg" <klaasvdpl...@hotmail.com>
Subject global naming resource not available in webapp
Date Fri, 20 Dec 2002 14:05:54 GMT
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:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>


Mime
View raw message