Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Java > Java Open Source > Apache Tomcat
|
Apache Tomcat General discussion of the Apache Tomcat servlet container. For discussions specific to the Professional Apache Tomcat book, please see the book discussion forum for that book.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Apache Tomcat section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 29th, 2004, 05:45 AM
Registered User
 
Join Date: Apr 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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>






Similar Threads
Thread Thread Starter Forum Replies Last Post
window.opener working .... not working alyeng2000 Javascript How-To 5 January 5th, 2007 08:05 AM
Web.Config..Working or Not Working peace95 ASP.NET 1.0 and 1.1 Basics 1 September 18th, 2006 06:53 AM
Local COM working , but not working at Web Serv nagen111 .NET Web Services 3 February 19th, 2005 04:22 AM
Example not working CKucler BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5 3 December 8th, 2004 11:26 AM
Get Working Copy... not working Enkiel Classic ASP Basics 0 April 21st, 2004 01:41 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.