You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Jose María Zaragoza <de...@gmail.com> on 2013/11/28 18:04:05 UTC
META-INF/context.xml & connection pool
Hello:
I'm using Tomcat 6.0.23
Yes, I know is an old release
Anyway, I would like to use tomcat-jdbc connection pool JAR
So, I 've stored a context.xml into META-INF folder in my WAR, as
<Context>
<Resource auth="Container" type="javax.sql.DataSource"
factory="org.apache.tomcat.jdbc.pool.DataSourceFactory"
driverClassName="org.postgresql.Driver"
initialSize="0" maxActive="100" maxIdle="20" maxWait="10000" mindIdle="0"
name="datasource/ddbb" password="xxxx" removeAbandoned="true"
url="jdbc:postgresql://localhost:5433/ddbb?LoginTimeout=3"
username="uuuuuu" validationQuery="SELECT 1" testOnBorrow="true" />
</Context>
My question is
should I store JAR ( tomcat-jdbc-x.x.x.jar & tomcat-juli-x.x.x.jar )
into WEB-INF/lib folder in WAR
or into $TOMCAT_HOME/lb folder ?
Could there be a problem by store them into the own WAR ( WEB-INF/lib ) ?
Thanks and regards
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: META-INF/context.xml & connection pool
Posted by Tomcat Random <to...@gmail.com>.
The short answer is jars that are particular to a webapp can go in
WEB-INF/lib, however since database access is fairly common, your jdbc jars
and db specific driver jars should go above the webapp directory into
$TOMCAT_HOME/lib.
However, AFAIK some jars need to be in $TOMCAT_HOME/lib due to loading
order. The only problem you would encounter is it won't work, so you could
test it and see.
-Alec
On Thu, Nov 28, 2013 at 12:04 PM, Jose María Zaragoza
<de...@gmail.com>wrote:
> Hello:
>
> I'm using Tomcat 6.0.23
> Yes, I know is an old release
>
> Anyway, I would like to use tomcat-jdbc connection pool JAR
>
> So, I 've stored a context.xml into META-INF folder in my WAR, as
>
> <Context>
>
> <Resource auth="Container" type="javax.sql.DataSource"
> factory="org.apache.tomcat.jdbc.pool.DataSourceFactory"
> driverClassName="org.postgresql.Driver"
> initialSize="0" maxActive="100" maxIdle="20" maxWait="10000" mindIdle="0"
> name="datasource/ddbb" password="xxxx" removeAbandoned="true"
> url="jdbc:postgresql://localhost:5433/ddbb?LoginTimeout=3"
> username="uuuuuu" validationQuery="SELECT 1" testOnBorrow="true" />
>
> </Context>
>
> My question is
>
> should I store JAR ( tomcat-jdbc-x.x.x.jar & tomcat-juli-x.x.x.jar )
> into WEB-INF/lib folder in WAR
> or into $TOMCAT_HOME/lb folder ?
>
> Could there be a problem by store them into the own WAR ( WEB-INF/lib ) ?
>
>
> Thanks and regards
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>