DefaultContext does not appear to be working
We have just moved development from Tomcat 4.0.4 to 4.1.30 to take advantage of the Ant deployment features but for the life of me I can't get the datasources to work in the DefaultContext.
If I manualy deply the app and create a Context then everything works fine, but If I use the DefaultContext then the JNDI lookup does not find and resolve the data source.
The Tomcat docs indicate this should work, and it always used to under 4.0.4 but I just can't get it to work any more, I end up with a null driver.
Here is my DefaultContext section, it is added at the end of the Host block of the config.
I hope someone knows whats wrong as I have spent two days trying to solve this already.
<DefaultContext reloadable="true" crossContext="true">
<Resource name="jdbc/reg" auth="Container" scope="Shareable" type="javax.sql.DataSource"/>
<ResourceParams name="jdbc/reg">
<parameter>
<name>factory</name>
<value>org.apache.commons.dbcp.BasicDataSourceFact ory</value>
</parameter>
<parameter>
<name>driverClassName</name>
<value>com.ibm.as400.access.AS400JDBCDriver</value>
</parameter>
<parameter>
<name>url</name>
<value>jdbc:as400://as400.local/javauser</value>
</parameter>
<parameter>
<name>username</name>
<value>javauser</value>
</parameter>
<parameter>
<name>password</name>
<value>javapassword</value>
</parameter>
<parameter>
<name>removeAbandoned</name>
<value>true</value>
</parameter>
<parameter>
<name>removeAbandonedTimeout</name>
<value>60</value>
</parameter>
</ResourceParams>
</DefaultContext>
|