db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Van Couvering" <da...@vancouvering.com>
Subject Re: Using embedded derby with JRuby and Rails
Date Mon, 12 Nov 2007 18:55:05 GMT
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

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

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.


On Nov 7, 2007 10:36 AM, cdwillie76 <chris.d.williams@gmail.com> 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.

View raw message