Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 90858 invoked from network); 4 Jan 2006 05:08:01 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 4 Jan 2006 05:08:01 -0000 Received: (qmail 39191 invoked by uid 500); 4 Jan 2006 05:07:46 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 39177 invoked by uid 500); 4 Jan 2006 05:07:46 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 39164 invoked by uid 99); 4 Jan 2006 05:07:46 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Jan 2006 21:07:46 -0800 X-ASF-Spam-Status: No, hits=0.5 required=10.0 tests=DNS_FROM_RFC_ABUSE X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [68.142.200.74] (HELO web30101.mail.mud.yahoo.com) (68.142.200.74) by apache.org (qpsmtpd/0.29) with SMTP; Tue, 03 Jan 2006 21:07:45 -0800 Received: (qmail 44891 invoked by uid 60001); 4 Jan 2006 05:07:24 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Reply-To:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=cVtzbQSQqH4oR1O4QkAOjBVuLZ5WPbsCXG9qMtBuTUGMy36KB7ul9PqYuMiygD18cP8wqEiachV1B1qD6XADGobmZeRj65++9MwPJloct/ZbMGsN9ZpidIA/VvFsWWmpzdsRm8qmIySnamxu3jegoZ1FCQzWSxL/C2rSEtdNR5I= ; Message-ID: <20060104050724.44889.qmail@web30101.mail.mud.yahoo.com> Received: from [216.119.239.81] by web30101.mail.mud.yahoo.com via HTTP; Tue, 03 Jan 2006 21:07:24 PST Date: Tue, 3 Jan 2006 21:07:24 -0800 (PST) From: Wade Chandler Reply-To: hwadechandler-apache@yahoo.com Subject: Re: Tomcat Datasource , can we define them in war file (whithout accessing to Admin console)? To: Tomcat Users List In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N --- Andre Van Klaveren wrote: > Like Bruce said, you can define a DataSource as part > of your > application's context. It's the same format as the > context definition > in server.xml except it's deployed with your > application as an XML > file (context.xml) inside the META-INF directory of > the WAR. > > Here's a link to explain how to do it: > http://tomcat.apache.org/tomcat-5.0-doc/jndi-datasource-examples-howto.html > > They don't go into using context.xml but the same > instructions can be > applied to using the context.xml. > > > > On 12/26/05, Legolas Woodland > wrote: > > Hi > > Thank you for reading my post. > > Is it possible to make a data-source without admin > console ? > > I mean by defining the data-source in web.xml or > in Context.xml (i think > > i read somewhere that we could put context.xml > into meta-inf folder and > > it will act like Context definition in admin > console). > > > > is it mandatory that Tomcat shared library folder > contain my database > > jdbc driver to have data-source ? > > I mean can we bundle , our JDBC driver inside war > file and define the > > data-source in war file too ? Some drivers will need to be placed in the endorsed folder as they will end up loading native libraries which can access other code. I'm not sure where the security file you would need to edit to not make this a requirement is if one even exists. My experience with the MS SQL (not MySQL) driver is it needs to be in this directory to work. You can change the location of this directory using switches if you need it to be some where else for file and drive setup reasons. Wade --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org