You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-user@db.apache.org by egan0019 <eg...@umn.edu> on 2005/05/31 16:57:18 UTC

database instances and differing data directory path

I am using Class.forName("org.apache.derby.jdbc.EmbeddedDriver") to load
one embedded derby in my application.  It works successfully.  I want to be
able to control the path for the database instances, though.  It seems to
always default to the present working directory.  Each of my databases are
contained in a directory specific to their parent sub-application.  So, I
would like something like this (notice virtual_host_1 and virual_host_2
directories in data path):

database         data directory
-----------------------------------------------
application_1    virtual_host_1/application_1/
application_2    virtual_host_1/application_2/
application_3    virtual_host_2/application_3/

Is there a way to specify this for each database instance without having to
load separate EmbeddedDriver`s in each sub-directory?

I'm trying to make this question short.  If you need more from me to
clarify, please request.

-mark


Re: database instances and differing data directory path

Posted by "Mark M. Egan" <eg...@umn.edu>.
I found all my answers in the Derby 10.0 Developer's Guild.

At 09:57 AM 5/31/2005, you wrote:
>I am using Class.forName("org.apache.derby.jdbc.EmbeddedDriver") to load
>one embedded derby in my application.  It works successfully.  I want to be
>able to control the path for the database instances, though.  It seems to
>always default to the present working directory.  Each of my databases are
>contained in a directory specific to their parent sub-application.  So, I
>would like something like this (notice virtual_host_1 and virual_host_2
>directories in data path):
>
>database         data directory
>-----------------------------------------------
>application_1    virtual_host_1/application_1/
>application_2    virtual_host_1/application_2/
>application_3    virtual_host_2/application_3/
>
>Is there a way to specify this for each database instance without having to
>load separate EmbeddedDriver`s in each sub-directory?
>
>I'm trying to make this question short.  If you need more from me to
>clarify, please request.
>
>-mark