commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jiaqi Guo <cyclopsgr...@gmail.com>
Subject Re: Connection sharing question
Date Fri, 19 Jan 2007 05:19:42 GMT
Garth Keesler wrote:
> The more I read, the less sure I am of what I know... :-)
>
> Is it true that DBCP running with Tomcat provides sharing of database 
> connections across separate invocations of different web services (on 
> the same Tomcat server) that use the same database?
>
> Thanx,
> Garth
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
>
>
http://confluence.atlassian.com/display/DOC/Configuring+a+MySQL+Datasource+in+Apache+Tomcat

is a document for configuring JIRA and a good example of how a global 
DBCP DataSource is defined in Tomcat.

Basically you can declare it in Tomcat server.xml, refer it in web.xml 
and get the DataSource in code through JNDI.

Make sure to put the commons-jdbc and JDBC driver jar file into 
<tomcat_install_dir>/common/lib rather than <webapp_dir>/WEB-INF/lib.

Hope it helps. Good luck.




Regards

-- 

Jiaqi Guo
http://www.cyclopsgroup.org


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


Mime
View raw message