tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Smith <>
Subject Re: Aliases for JNDI (JDBC) resources?
Date Mon, 03 Oct 2005 15:35:29 GMT
To be honest, I think touching the server.xml is the only way to do
this.  Declare it as a global resource in server.xml and then declare a
resource link in all the contexts that need access.


Lisa L. Woodring wrote:

>I would like to create aliases for a JNDI (specifically, a JDBC)
>resource, such that I can use multiple names to connect to the same
>database -- and be able to use the same (i.e. only 1) connection pool
>for that database.  I haven't been able to find anything on how/if this
>is possible.  (I would like to be able to specify it all in context.xml
>& not touch server.xml if possible.)  Any suggestions??
>In other words, be able to do something to this effect (in context.xml):
><Resource name="jdbc/actual_db_name" auth="Container"
>          driverClassName="org.postgresq.Driver"   
>          url="jdbc:postgresql://machine/actual_db_name"
>          maxActive="100" maxIdle="5"  ...other parms...  />
><alias link="jdbc/alias1" resource="jdbc/actual_db_name" />
><alias link="jdbc/alias2" resource="jdbc/actual_db_name" />
>Then use the "jdbc/alias1" and "jdbc/alias2" names in my code.
>Lisa Woodring
>Software Engineer, iGLASS Networks

David Smith
Network Operations Supervisor
Department of Entomology
College of Agriculture & Life Sciences
Cornell University
2132 Comstock Hall
Ithaca, NY  14853
Phone: 607.255.9571
Fax: 607.255.0939

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message