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"
type="javax.sql.DataSource"
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