Connection pooling is virtually a standard feature in web apps - IOW many, many people are using it all the time - so the first thing to say is that you must believe that the mistake is yours.
Which also means that you have the power to fix it :-) So take a deep breath and carefully check all your stuff against the documentation links Doug has given you. Then you should copy and paste (in an email to this list) the full contents of your server.xml file, web.xml file, and the Java code that is trying to get a connection. You should also copy and paste any error messages that you are getting. Then we might be able to help you. Harry > People who have to figure out how to use other peoples work either have > messy hair or are bald. > > There are three main pages for reference: > http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jndi-datasource-examples-howto > .html#Database%20Connection%20Pool%20(DBCP)%20Configurations > > http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jndi-resources-howto.html > > http://jakarta.apache.org/tomcat/tomcat-5.0-doc/config/globalresources.html > > Now the basics. There are four pieces to the puzzle. > > I am going for a Global Setup. > > First is the server.xml Resource and ResourceParams elements. It appears > that you have these. Connects to the database and create a pool of > connections. > > Second is the web.xml entry for the resource-ref. > > Third is the Resource link placed in the apps context. > > Fourth is the calling of the resource from code. > > When you say "use to BasicDataSource to see thw no. of active connections " > is this you application or something built into Tomcat? > > Doug > > ----- Original Message ----- > From: "micky none" <[EMAIL PROTECTED]> > To: "Tomcat Users List" <tomcat-user@jakarta.apache.org> > Sent: Wednesday, January 19, 2005 4:54 PM > Subject: Re: Re: ConnectionPooling > > > Tried that too my friend,isn't there any sure shot answer for this one..im > like half mad after this...as of now..... > > > On Thu, 20 Jan 2005 Harry Mantheakis wrote : >> This may not help, but try swapping the order of the <ResourceParams> and >> <Resource> elements in your 'server.xml' file. >> >> Also, you seem to be declaring the <DefaultContext> element three times (!) >> which seems wrong. >> >> HTH >> >> Harry Mantheakis >> >> >>> Hi Friends, >>> This is my first message on this list.I want to use the dbcp connection >>> pooling.I set up the server.xml according to an example,but when i >>> trying to >>> use to BasicDataSource to see thw no. of active connections it's >>> throwing >>> errors.I tried searching a lot but to no use.If I go into the >>> administrator >>> tool,it shows nothing there?I am using tomcat5.0..please tell me ..where >>> i am >>> going wrong and if there is any other way to see the number of active >>> connections. >>> >>> >>> Here's my server.xml,please tell me if there's anything wrong with it: >>> >>> <Logger className="org.apache.catalina.logger.FileLogger" >>> directory="logs" >>> prefix="localhost_log." suffix=".txt" timestamp="true" /> >>> <DefaultContext reloadable="true" /> >>> <DefaultContext path="/database" docBase="database" debug="0" >>> reloadable="true" /> >>> - <DefaultContext> >>> - <ResourceParams name="jdbc/conversion"> >>> - <parameter> >>> <name>username</name> >>> <value>xxxx</value> >>> </parameter> >>> - <parameter> >>> <name>password</name> >>> <value>xxxx</value> >>> </parameter> >>> - <parameter> >>> <name>driverClassName</name> >>> <value>com.ibm.db2.jcc.DB2Driver</value> >>> </parameter> >>> - <parameter> >>> <name>url</name> >>> <value>jdbc:db2j:netxxxx</value> >>> </parameter> >>> - <parameter> >>> <name>removeAbandoned</name> >>> <value>true</value> >>> </parameter> >>> - <parameter> >>> <name>removeAbandonedTimeout</name> >>> <value>0</value> >>> </parameter> >>> - <parameter> >>> <name>logAbandoned</name> >>> <value>true</value> >>> </parameter> >>> - <parameter> >>> <name>maxActive</name> >>> <value>1</value> >>> </parameter> >>> - <parameter> >>> <name>factory</name> >>> <value>org.apache.commons.dbcp.BasicDataSourceFactory</value> >>> </parameter> >>> </ResourceParams> >>> <Resource name="jdbc/conversion" auth="Container" >>> type="javax.sql.DataSource" >>> /> >>> </DefaultContext> >>> <Loader className="org.apache.catalina.loader.WebappLoader" >>> loaderClass="org.apache.catalina.loader.WebappClassLoader" >>> checkInterval="3" >>> /> >>> </Host> >>> >>> please,please,please help me...its very urgent. >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]