Hi,
I have two hosts on the same system one is the pilot of my website for testing and
demo purposes and the other is the live site.
I want to be able to just copy the .war file across once it is tested.
The problem with this is my DB connection pooling is done by a DataSource in Tomcat
and that is done using JNDI. I think that the fact that there is the same JNDI name
in the two host containers may be causing a clash? The code from my server.xml is
below.
There are two different settings I have found in my look at the Tomcat web-site to
tell these not to clash but I don't know if they are what I think they are or which is
the right one.
They are:
1. in the <Resource> tag auth=Container.
2. in the <Resource> tag scope=shareable (I do not have this in at all so it is
"shareable" as that is the default)
For example: When it says "shareable" makes connections shareable, does it mean even
between hosts?
Thanks.
Andoni.
<Host name="live.server.com" debug="3" appBase="webapps/live" unpackWARs="false">
<Context path="" docBase="live.war" workDir="work/live" debug="0"
reloadable="false">
<Resource name="jdbc/live" auth="Container" type="javax.sql.DataSource"/>
<ResourceParams name="jdbc/live">
<parameter>
<name>driverClassName</name>
<value>oracle.jdbc.driver.OracleDriver</value>
</parameter>
<parameter>
<name>user</name>
<value>live</value>
</parameter>
<parameter>
<name>password</name>
<value>***</value>
</parameter>
<parameter>
<name>driverName</name>
<value>jdbc:oracle:thin:@troi.eurokom.ie:1521:ora9</value>
</parameter>
</ResourceParams>
</Context>
</Host>
<Host name="pilot.server.com" debug="0" appBase="webapps/pilot" unpackWARs="false">
<Context path="" docBase="live.war" workDir="work/pilot" debug="0"
reloadable="false">
<Resource name="jdbc/live" auth="Container" type="javax.sql.DataSource"/>
<ResourceParams name="jdbc/live">
<parameter>
<name>driverClassName</name>
<value>oracle.jdbc.driver.OracleDriver</value>
</parameter>
<parameter>
<name>user</name>
<value>pilot</value>
</parameter>
<parameter>
<name>password</name>
<value>***</value>
</parameter>
<parameter>
<name>driverName</name>
<value>jdbc:oracle:thin:@localhost:1521:ora9</value>
</parameter>
</ResourceParams>
</Context>
</Host>