tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ps <pedro-b-sala...@ptinovacao.pt>
Subject Re: DBCP+TOMCAT 3.2.4 (->4.1.x WORKED OK)
Date Wed, 05 Feb 2003 11:20:08 GMT

On Tue, 2003-02-04 at 22:38, Sean Dockery wrote:
> Weird that your envCtx.lookup is done on /jdbc/ngincaredb.  I've never seen 
> it done on an absolute path before.  :-)

Yes, I don't know why I put it like that, maybe I was guided by an
example, maybe it was a writing mistake that worked fine in tomcat
4.1.x, ... I don't know :-|

> 
> Please provide all of the parameters that you are declaring under the 
> ResourceParams section.  (I don't want to know your username and 
> password--I just want to know the entire list...)
> 

Sure! I just didn't put that here because I was thinking in a macro
structure and maybe the rest (password or not) was not relevant to debug
my problem. But as you request it, I will post the complete resource
here.

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

<ResourceParams name="jdbc/ngincaredb">
   <parameter>
	<name>driverClassName</name>
	<value>oracle.jdbc.driver.OracleDriver</value>
   </parameter>
   <parameter>
        <name>factory</name>
        <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
   </parameter>
   <parameter>
	<name>username</name>
	<value>user</value>
   </parameter>
   <parameter>
	<name>password</name>
	<value>pass</value>
   </parameter>
   <parameter>
	<name>url</name>             
	<value>jdbc:oracle:thin:@192.168.89.52:1521:dbdev817</value>
   </parameter>
   <parameter>
	<name>maxActive</name>
	<value>25</value>
   </parameter>
   <parameter>
	<name>maxWait</name>
        <value>50</value>
   </parameter>
   <parameter>
	<name>maxIdle</name>
	<value>15</value>
   </parameter>
   <parameter>
	<name>validationQuery</name>
	<value>select 1 as test from dual</value>
   </parameter>
   <parameter>
	<name>removeAbandoned</name>
	<value>true</value>
   </parameter>
   <parameter>
	<name>removeAbandonedTimeout</name>
	<value>60</value>
   </parameter>
</ResourceParams>

Thanks,
Pedro Salazar

> At 14:34 2003-02-04, you wrote:
> >And is caused on the following server code:
> >"
> >try{
> >         Context initCtx = new InitialContext();
> >         Context envCtx = (Context)initCtx.lookup("java:comp/env/");
> >         this.ds = (DataSource)envCtx.lookup("/jdbc/ngincaredb");
> >}
> >catch(NamingException e){
> >             logger.fatal("datasource error", e);
> >}
> >
> >"
> >web.xml:
> >--------
> ><resource-ref>
> >         <res-ref-name>jdbc/ngincaredb</res-ref-name>
> >         <res-type>javax.sql.DataSource</res-type>
> >         <res-auth>Container</res-auth>
> ></resource-ref>
> >
> >
> >server.xml:
> >-----------
> ><Context path="/ngincare"
> >                  docBase="webapps/ngincare"
> >                  crossContext="true"
> >                  debug="9"
> >                  reloadable="true"
> >                  trusted="false" >
> >
> >    <Resource name="jdbc/ngincaredb" auth="Container"
> >             type="javax.sql.DataSource"/>
> >       <ResourceParams name="jdbc/ngincaredb">
> >          <parameter>
> >                 <name>driverClassName</name>
> >                 <value>oracle.jdbc.driver.OracleDriver</value>
> >             </parameter>
> >         <parameter>
> >         <name>factory</name>
> >         <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
> >         </parameter>
> >         ...
> >   </ResourceParams>
> >
> ></Context>
> 
> Sean Dockery
> sean@sbdconsultants.com
> Certified Java Web Component Developer
> Certified Delphi Programmer
> SBD Consultants
> http://www.sbdconsultants.com
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
-- 
<ps> 
pedro-b-salazar@ptinovacao.pt
key id: 0E129E31D803BC61


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message