From derby-user-return-283-apmail-db-derby-user-archive=db.apache.org@db.apache.org Wed Dec 08 23:30:21 2004 Return-Path: Delivered-To: apmail-db-derby-user-archive@www.apache.org Received: (qmail 5801 invoked from network); 8 Dec 2004 23:30:21 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 8 Dec 2004 23:30:21 -0000 Received: (qmail 60917 invoked by uid 500); 8 Dec 2004 23:30:21 -0000 Delivered-To: apmail-db-derby-user-archive@db.apache.org Received: (qmail 60689 invoked by uid 500); 8 Dec 2004 23:30:20 -0000 Mailing-List: contact derby-user-help@db.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: List-Id: Reply-To: "Derby Discussion" Delivered-To: mailing list derby-user@db.apache.org Received: (qmail 60669 invoked by uid 99); 8 Dec 2004 23:30:20 -0000 X-ASF-Spam-Status: No, hits=2.8 required=10.0 tests=DNS_FROM_RFC_ABUSE,FORGED_YAHOO_RCVD,HTML_20_30,HTML_MESSAGE X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from web90010.mail.scd.yahoo.com (HELO web90010.mail.scd.yahoo.com) (66.218.94.68) by apache.org (qpsmtpd/0.28) with SMTP; Wed, 08 Dec 2004 15:30:18 -0800 Received: (qmail 4001 invoked by uid 60001); 8 Dec 2004 23:30:16 -0000 Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; b=o3MKl9CZZm/PLIm35BkZZ08HTEoLSDB/856gWvCFddHBEpJMgIhYkqygfurj6zkTG7RJ2fSRs+im6CZWB9Y6L0yAGl+m6BWRZifBu94BjktlWYzcgB/N47IbneOu6UfxZzxyJHVnYDz14+jkMaTkxq43+Wt03q86zLyejwqCS1M= ; Message-ID: <20041208233016.3999.qmail@web90010.mail.scd.yahoo.com> Received: from [129.42.184.35] by web90010.mail.scd.yahoo.com via HTTP; Wed, 08 Dec 2004 15:30:16 PST Date: Wed, 8 Dec 2004 15:30:16 -0800 (PST) From: Arda M Subject: Re: Embedding a database in a web application To: Derby Discussion In-Reply-To: <20041208230208.42624.qmail@web13722.mail.yahoo.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-259449889-1102548616=:3587" X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N --0-259449889-1102548616=:3587 Content-Type: text/plain; charset=us-ascii I think it was a plain "unable to connect to database" error. todd runstein wrote: I've been able to get it to work using the WEB-INF/lib directory. Do you remember the error you were getting? --- Arda M wrote: > Trying Tomcat, I could not get derby.jar work by > putting it in my WEB-INF/lib of my web application. > I was able to make it work by putting derby.jar > among all other Tomcat jars. But that would effect > all web applications running in this Tomcat and > force every use the same version. Is there a way to > deploy derby per web application such that i can > have a Tomcat server with many websites that run > their own Derby jar version (web app a uses version > 10, another webapp b uses version 11 for example?) > and have their own derby database inside their > directories protected from others?? > Regards, > Arda > > > todd runstein wrote: > I'm looking for ways to embed a Derby database into > a > web application that will be distributed as a war > file. Since I don't know the path where it will be > deployed ("webapps" in Tomcat, "deploy" in JBoss, > etc), I'm struggling to envision how I can make a > JDBC > connection. > > Let me elaborate a bit. I want to create a database > (basically an empty set of tables) and put the > directory that Derby creates somewhere in the > WEB-INF > directory of my web application. I want to use this > database to save user preferences or application > settings. I want to be able to create a war file > which someone with a J2EE server can drop into their > server and have the application work. Making changes > to the web server is out of the question (so the > Lance > Bader tutorial technique is out). > > If you were asked to do this, how would you go about > it? > > Thanks in advance! > > Todd > > ===== > The only "dumb question" is the one you were too > afraid to ask. > ________________________________________ > Check out RouteRuler - Free software for runners, > cyclists, walkers, etc. > http://routeruler.sourceforge.net > ________________________________________ > Get a handle on your data with "pocOLAP", the > "little" OLAP project > http://pocolap.sourceforge.net > ________________________________________ > > > > __________________________________ > Do you Yahoo!? > The all-new My Yahoo! - What will yours do? > http://my.yahoo.com > > > --------------------------------- > Do you Yahoo!? > Yahoo! Mail - 250MB free storage. Do more. Manage less. ===== The only "dumb question" is the one you were too afraid to ask. ________________________________________ Check out RouteRuler - Free software for runners, cyclists, walkers, etc. http://routeruler.sourceforge.net ________________________________________ Get a handle on your data with "pocOLAP", the "little" OLAP project http://pocolap.sourceforge.net ________________________________________ __________________________________ Do you Yahoo!? Yahoo! Mail - Helps protect you from nasty viruses. http://promotions.yahoo.com/new_mail --------------------------------- Do you Yahoo!? Take Yahoo! Mail with you! Get it on your mobile phone. --0-259449889-1102548616=:3587 Content-Type: text/html; charset=us-ascii
I think it was a plain "unable to connect to database" error.


todd runstein <todd_run@yahoo.com> wrote:
I've been able to get it to work using the WEB-INF/lib
directory. Do you remember the error you were
getting?


--- Arda M wrote:

> Trying Tomcat, I could not get derby.jar work by
> putting it in my WEB-INF/lib of my web application.
> I was able to make it work by putting derby.jar
> among all other Tomcat jars. But that would effect
> all web applications running in this Tomcat and
> force every use the same version. Is there a way to
> deploy derby per web application such that i can
> have a Tomcat server with many websites that run
> their own Derby jar version (web app a uses version
> 10, another webapp b uses version 11 for example?)
> and have their own derby database inside their
> directories protected from others??
> Regards,
> Arda
>
>
> todd runstein wrote:
> I'm looking for ways to embed a Derby database into
> a
> web application that will be distributed as a war
> file. Since I don't know the path where it will be
> deployed ("webapps" in Tomcat, "deploy" in JBoss,
> etc), I'm struggling to envision how I can make a
> JDBC
> connection.
>
> Let me elaborate a bit. I want to create a database
> (basically an empty set of tables) and put the
> directory that Derby creates somewhere in the
> WEB-INF
> directory of my web application. I want to use this
> database to save user preferences or application
> settings. I want to be able to create a war file
> which someone with a J2EE server can drop into their
> server and have the application work. Making changes
> to the web server is out of the question (so the
> Lance
> Bader tutorial technique is out).
>
> If you were asked to do this, how would you go about
> it?
>
> Thanks in advance!
>
> Todd
>
> =====
> The only "dumb question" is the one you were too
> afraid to ask.
> ________________________________________
> Check out RouteRuler - Free software for runners,
> cyclists, walkers, etc.
> http://routeruler.sourceforge.net
> ________________________________________
> Get a handle on your data with "pocOLAP", the
> "little" OLAP project
> http://pocolap.sourceforge.net
> ________________________________________
>
>
>
> __________________________________
> Do you Yahoo!?
> The all-new My Yahoo! - What will yours do?
> http://my.yahoo.com
>
>
> ---------------------------------
> Do you Yahoo!?
> Yahoo! Mail - 250MB free storage. Do more. Manage
less.


=====
The only "dumb question" is the one you were too afraid to ask.
________________________________________
Check out RouteRuler - Free software for runners, cyclists, walkers, etc.
http://routeruler.sourceforge.net
________________________________________
Get a handle on your data with "pocOLAP", the "little" OLAP project
http://pocolap.sourceforge.net
________________________________________



__________________________________
Do you Yahoo!?
Yahoo! Mail - Helps protect you from nasty viruses.
http://promotions.yahoo.com/new_mail


Do you Yahoo!?
Take Yahoo! Mail with you! Get it on your mobile phone. --0-259449889-1102548616=:3587--