tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lisa L. Woodring" <>
Subject Aliases for JNDI (JDBC) resources?
Date Mon, 03 Oct 2005 15:03:01 GMT
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"
          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

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message