tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Wim Bervoets <wim.bervo...@iconmedialab.com>
Subject RE: DBTags and Poolman
Date Thu, 20 Sep 2001 13:11:13 GMT
Okay thanks... but Tomcat 3.2.1 doesn't support this I see (Tomcat 4 does it
seems)
So I'll take the Poolman route without the DBTags I guess for optimal
performance...

Wim

> -----Original Message-----
> From: Mark Shead [mailto:MarkS@reslife.org]
> Sent: woensdag 19 september 2001 17:46
> To: taglibs-user@jakarta.apache.org
> Subject: RE: DBTags and Poolman
> 
> 
> My understanding of connection pooling (and I welcome any 
> corrections if I'm
> wrong) is:
> 
> If you are using a JDBC 2.0 driver and you give JNDI a handle to a
> connection to the database and have the DBTags get their 
> connection info
> from JNDI, then JDBC will automatically pool the connections.  
> 
> --Mark
> 
> -----Original Message-----
> From: Wim Bervoets [mailto:wim.bervoets@iconmedialab.com]
> Sent: Wednesday, September 19, 2001 5:38 AM
> To: 'taglibs-user@jakarta.apache.org'
> Subject: DBTags and Poolman
> 
> 
> Hello,
> 
> I have a few questions about DBTags:
> 
> 1) I open a connection and close a connection in each jsp 
> that accesses the
> database
> I'm using the latest mysql JDBC driver.... is there 
> connection pooling built
> in in that driver or not ?
> 
> 2) I have tried to use DBTags and Poolman together but it 
> didn't work... Did
> someone already do this and what were the results.
> 
> this is in my web.xml :
> 
> <context-param>
>       <param-name>dbURL</param-name>
>       <param-value>jdbc:poolman://dancevibes</param-value>
>       <description>
>         Which Database to access and where it is located
>       </description>
>     </context-param>
>     
>     <context-param>
>       <param-name>mysqlDriver</param-name>
>       <param-value>com.codestudio.sql.PoolMan</param-value>
>       <description>
>         JDBC Driver
>       </description>
>     </context-param>
>     
>     <context-param>
>       <param-name>dbUserId</param-name>
>       <param-value>mysql</param-value>
>       <description>
>         DB user id
>       </description>
>     </context-param>
>     
>     <context-param>
>       <param-name>dbPassword</param-name>
>       <param-value>mysql</param-value>
>       <description>
>         DB password
>       </description>
>     </context-param>
> 
> 
> 
> This in my jsp:
> 
> <sql:connection id="conn1">
>   <sql:url initParameter="dbURL"/> 
>   <sql:driver initParameter="mysqlDriver"/>
>   <sql:userId initParameter="dbUserId"/> 
>   <sql:password initParameter="dbPassword"/>
> </sql:connection>
> 
> 
> and this in the poolman.xml file: 
> 
> 
> <?xml version="1.0" encoding="UTF-8"?>
> 
> <poolman>
> 
>   <management-mode>local</management-mode>
> 
>   <!-- ========================================================== -->
>   <!-- These entries are an example of JDBC Connection pooling.   -->
>   <!-- Many of the parameters are optional. Consult the           -->
>   <!-- UsersGuide.html doument and the poolman.xml.template file  -->
>   <!-- for guidance and element definitions.                      -->
>   <!-- ========================================================== -->
> 
>   <datasource>
> 
>     <!-- ============================== -->
>     <!-- Physical Connection Attributes -->
>     <!-- ============================== -->
> 
>     <!-- Standard JDBC Driver info -->
> 
>     <dbname>dancevibes</dbname>
>     <driver>org.gjt.mm.mysql.Driver</driver>
>     <url>jdbc:mysql://localhost/dancevibes</url>
> 
>     <username>mysql</username>
>     <password>mysql</password>
> 
>     <minimumSize>0</minimumSize>
>     <maximumSize>10</maximumSize>
>     <connectionTimeout>600</connectionTimeout>
>     <userTimeout>12</userTimeout>
>     <shrinkBy>10</shrinkBy>
> 
>     <logFile>testdb.log</logFile>
>     <debugging>true</debugging>
> 
>     <!-- Query Cache Attributes-->
> 
>     <cacheEnabled>true</cacheEnabled>
>     <cacheSize>20</cacheSize>
>     <cacheRefreshInterval>120</cacheRefreshInterval>
> 
>   </datasource>
> 
>   <!-- DISABLED FOR PRODUCTION
>   <admin-agent>
>     <class>com.sun.jdmk.comm.HtmlAdaptorServer</class>
>     <name>Adaptor:name=html</name>
>     <maxClients>10</maxClients>
>     <port>8082</port>
>   </admin-agent>
>   -->
> 
> </poolman>
> 

Mime
View raw message