From derby-user-return-8034-apmail-db-derby-user-archive=db.apache.org@db.apache.org Mon Nov 12 18:55:40 2007 Return-Path: Delivered-To: apmail-db-derby-user-archive@www.apache.org Received: (qmail 84721 invoked from network); 12 Nov 2007 18:55:40 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 12 Nov 2007 18:55:40 -0000 Received: (qmail 66572 invoked by uid 500); 12 Nov 2007 18:55:27 -0000 Delivered-To: apmail-db-derby-user-archive@db.apache.org Received: (qmail 66200 invoked by uid 500); 12 Nov 2007 18:55:27 -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 66189 invoked by uid 99); 12 Nov 2007 18:55:27 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 12 Nov 2007 10:55:27 -0800 X-ASF-Spam-Status: No, hits=0.2 required=10.0 tests=SPF_PASS,WHOIS_MYPRIVREG X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of david.vancouvering@gmail.com designates 64.233.166.182 as permitted sender) Received: from [64.233.166.182] (HELO py-out-1112.google.com) (64.233.166.182) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 12 Nov 2007 18:55:29 +0000 Received: by py-out-1112.google.com with SMTP id p76so1484628pyb for ; Mon, 12 Nov 2007 10:55:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:sender:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; bh=t/4JCgGYVkxrShlzqcYnwgcuH1AHRxMZ78MYROxPRyo=; b=NfGJNCN2eQwmqzMhHnicJPdxCsxo6uCZ7yu2LsvvfdbCNElJYeurkf6JW/c3vIpiG8IwmzdyTHLnuM1YiXyjpXi1hQePbzbiZAV3cobDp4Q8VUNUFfd9QD2/jgpTqwJujFlrcvd8yRimOv8iAY2NrPp7Lc/6MVKwuQ9ImFKnytI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:sender:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=l1xElscisF7eZ9oAZ3T96XI3IQiWv2Y01egPV5cUtfoKIQI7QYCacjLUTOUw1NTGno+BGS1DnVIzHMaXNHDT3n+yh1ZfhNK1a+Dj1LaApfRFLII9ejPqnzeLJdQdREXHqUgJK5kuxO2ePYj0doBpoH403TOYvh+2YzrWFB2FglM= Received: by 10.65.242.11 with SMTP id u11mr14490489qbr.1194893705419; Mon, 12 Nov 2007 10:55:05 -0800 (PST) Received: by 10.64.193.5 with HTTP; Mon, 12 Nov 2007 10:55:05 -0800 (PST) Message-ID: <56a83cd00711121055k269a0a7ax1a3593cf68eab46d@mail.gmail.com> Date: Mon, 12 Nov 2007 10:55:05 -0800 From: "David Van Couvering" Sender: david.vancouvering@gmail.com To: "Derby Discussion" Subject: Re: Using embedded derby with JRuby and Rails In-Reply-To: <13633097.post@talk.nabble.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <13633097.post@talk.nabble.com> X-Google-Sender-Auth: 2cdee5eac5178aaf X-Virus-Checked: Checked by ClamAV on apache.org In terms of how you change your application, in general all you should need to do is change the URL to be "jdbc:derby:dbname" from "jdbc:derby:/server:port/dbname" However, when you embed a database, the database is created based at the location given by the Java system property "derby.system.home" or, if that's not present, the value of the Java system property "user.dir". What this usually means is that when your application starts up, you need to take care of initializing the database if it doesn't exist. That includes creating the tables and loading initial data. You could do this by running some JDBC that does this, or you can include in your application jar a copy of the database directory, and extract this into the proper location when the application starts up. David On Nov 7, 2007 10:36 AM, cdwillie76 wrote: > > Anyone configured Derby with the embedded JDBC driver with JRuby/Rails as a > war file deployment? I have successfully using Derby in client/server mode > with a JRuby/Rails war deployment. But since this database is pretty small > and low bandwidth, I would like to just combine it in to the same war > deployment as my rails application. Any suggestions on how one would go > about this would be great. > > Thanks > Chris > -- > View this message in context: http://www.nabble.com/Using-embedded-derby-with-JRuby-and-Rails-tf4766517.html#a13633097 > Sent from the Apache Derby Users mailing list archive at Nabble.com. > >