You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Justin Schoeman <ju...@expertron.co.za> on 2006/02/24 21:15:52 UTC

SOLVED! Re: JNDI connection pooling in axis2?

Should have read the docs (or at least the right version of the docs). 
To get this working, simply add to

/usr/share/tomcat5/conf/server.xml

After the closing </Host> tag for localhost:

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

  <ResourceParams name="jdbc/grinpal">
    <parameter>
      <name>factory</name>
      <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
    </parameter>
    <parameter>
      <name>driverClassName</name>
      <value>oracle.jdbc.driver.OracleDriver</value>
    </parameter>
    <parameter>
      <name>url</name>
      <value>jdbc:oracle:thin:@//172.27.0.12:1521/orcl</value>
    </parameter>
    <parameter>
      <name>username</name>
       <value>ppdev</value>
    </parameter>
    <parameter>
      <name>password</name>
      <value>waterloo</value>
    </parameter>
    <parameter>
      <name>maxActive</name>
      <value>20</value>
    </parameter>
    <parameter>
      <name>maxIdle</name>
      <value>10</value>
    </parameter>
    <parameter>
      <name>maxWait</name>
      <value>-1</value>
    </parameter>
  </ResourceParams>

</Context>


AND added:

  <resource-ref>
   <description>Oracle Datasource example</description>
   <res-ref-name>jdbc/grinpal</res-ref-name>
   <res-type>javax.sql.DataSource</res-type>
   <res-auth>Container</res-auth>
  </resource-ref>

  inside the <web-app> token in
  /usr/share/tomcat5/webapps/axis2/WEB-INF/web.xml

-justin

Justin Schoeman wrote:
> OK, after numerous hacks, my software is functioning! Now I just need to 
> cache the DB connections and I am home free ;-).
> 
> Unfortunately, as usual, this is giving me more problems than expected.
> 
> So far, I have done the following:
>