Here's another question...
If the database pool is not created properly, will it fail silently, or will
an error be displayed in a log file? And if an error is output to a log
file, which one will it be?


-----Original Message-----
From: Darren Hall [mailto:[EMAIL PROTECTED] 
Sent: Monday, September 18, 2006 12:31 PM
To: 'Tomcat Users List'
Subject: RE: Database connection pooling in Tomcat 5.5

The issue could be the path attribute or docbase attribute in the
context.xml. I'm not sure what values should appear for these.


-----Original Message-----
From: Darren Hall [mailto:[EMAIL PROTECTED] 
Sent: Monday, September 18, 2006 11:26 AM
To: 'Tomcat Users List'
Subject: RE: Database connection pooling in Tomcat 5.5

Here it is. The items in parenthesis have been removed.
Thanks for the help.


<Context path="/flc" docBase="flc"
        debug="5" reloadable="true" crossContext="true">

    <!-- maxActive: Maximum number of dB connections in pool. Make sure you
         configure your oracle max_connections large enough to handle
         all of your db connections. Set to 0 for no limit.
         -->

    <!-- maxIdle: Maximum number of idle dB connections to retain in pool.
         Set to -1 for no limit.  See also the DBCP documentation on this
         and the minEvictableIdleTimeMillis configuration parameter.
         -->

    <!-- maxWait: Maximum time to wait for a dB connection to become
available
         in ms, in this example 10 seconds. An Exception is thrown if
         this timeout is exceeded.  Set to -1 to wait indefinitely.
         -->

    <!-- username and password: Oracle dB username and password for dB
connections  -->

    <!-- driverClassName: Class name for the official Oracle thin driver is 
         oracle.jdbc.OracleDriver.
         -->
    
    <!-- url: The JDBC connection url for connecting to your Oracle dB.
         -->

    <Resource name="jdbc/flc" auth="Container"
              type="javax.sql.DataSource"
driverClassName="oracle.jdbc.OracleDriver"
              url="jdbc:oracle:thin:@(dbserver.domain.com):1521:(mysid)"
              username="(user)" password="(passwd)" maxActive="20"
maxIdle="10"
              maxWait="-1" removeAbandoned="true"
removeAbandonedTimeout="180"
              logAbandoned="true"/> 
</Context>




-----Original Message-----
From: Pid [mailto:[EMAIL PROTECTED] 
Sent: Monday, September 18, 2006 11:16 AM
To: Tomcat Users List
Subject: Re: Database connection pooling in Tomcat 5.5

post your context.xml




Darren Hall wrote:
> Hi all.
> 
>  
> 
> I'm attempting to set up database connection pool using Tomcat 5.5 and
> Oracle 10g. I've been following the "JNDI How To" guide from Apache
>
(http://tomcat.apache.org/tomcat-5.5-doc/jndi-datasource-examples-howto.html
> ). My question is - where should I define the connection pool resource?
> Meaning, where should my "Resource" element appear. I've read two
different
> descriptions about how this should be done in the Apache documentation.
The
> first description (from the above link) states that I should modify
> server.xml and add a new Context element as such <Context path="/DBTest"
> docBase="DBTest" debug="5" reloadable="true" crossContext="true"> and in
> that new context define my resource for my connection pool. However, if
you
> read the "Context" documentation linked to the above How-To (located at
this
> link: http://tomcat.apache.org/tomcat-5.5-doc/config/context.html) you'll
> find in there the following text - "Please note that for tomcat 5, unlike
> tomcat 4.x, it is NOT recommended to place <Context> elements directly in
> the server.xml file. Instead, put them in the META-INF/context.xml
directory
> of your WAR file or the conf directory". So I'm wondering if I should
modify
> server.xml or create a context.xml file. Currently I'm trying the
> context.xml file route, but it is not working (although this could be
> because I'm configuring things incorrectly). Can anyone point me in the
> right direction here?
>  
> Thanks,
> Darren
> 
>  
> 
> 


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to