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 Hiram Chirino <hi...@hiramchirino.com> on 2006/03/22 19:35:22 UTC

Running 2 Derby instances on 1 JVM, do system properties cut it??

Hi Everybody,

ActiveMQ makes extensive use of Derby for storage of it's persistent
messages.  You have have done a great job with Derby!  Thanks for the
hard work!

One of the things that ActiveMQ supports is running multiple brokers
on 1 JVM.  In that case we would actually like to run 2 derby
instances with different data directories.  It seems that currently we
have to set the "derby.system.home" to configure where the data files
should go.  This does not seem to lend itself to supporting multiple
derby instances with each with it's own data directory.  Is it
possible to fully configure derby without using System properties??

--
Regards,
Hiram

Re: Running 2 Derby instances on 1 JVM, do system properties cut it??

Posted by "Jean T. Anderson" <jt...@bristowhill.com>.
Hiram Chirino wrote:
> Hi Matt,
> 
> That sounds like it's worth a try.  Got an example of how to use
> absolute database names?

The derby wiki has some tips that might help:

http://wiki.apache.org/db-derby/DatabaseNamesRelativeAbsolute

 -jean

<snipped the rest>


Re: Running 2 Derby instances on 1 JVM, do system properties cut it??

Posted by Hiram Chirino <hi...@hiramchirino.com>.
Hi Matt,

That sounds like it's worth a try.  Got an example of how to use
absolute database names?

Regards,
Hiram

On 3/22/06, Matt Sanford <mz...@aol.com> wrote:
> Hello,
>
>     I currently use two separate databases from within the same JVM by
> specifying absolute database names (rather than derby.system.home and a
> relative path). This keeps my files separated and seems to work very
> well. Is there some monitor locking within Derby that is essentially
> synchronizing these under the covers ? I have seen a performance
> improvement so I suspect that if there is it is minimal.
>     In my case I found much of my time was spent waiting on my static DB
> class. To fix it I open multiple databases and choose them using a hash
> of one of my key fields. works like a charm.
>
> Cheers;
>   -- Matt Sanford
>
> David.Vancouvering@Sun.COM wrote:
> > Hi, Hiram.  You have hit on an issue that prevents multiple databases
> > from being run within the same VM.  This is something we want to fix
> > in Derby, but it's a fairly big effort.
> >
> > As it stands the only way to configure the Derby database home is with
> > system properties.  So all uses of Derby within a given VM must access
> > the same database home and use the same system-wide configuration.
> >
> > David
> >
> > Hiram Chirino wrote:
> >> Hi Everybody,
> >>
> >> ActiveMQ makes extensive use of Derby for storage of it's persistent
> >> messages.  You have have done a great job with Derby!  Thanks for the
> >> hard work!
> >>
> >> One of the things that ActiveMQ supports is running multiple brokers
> >> on 1 JVM.  In that case we would actually like to run 2 derby
> >> instances with different data directories.  It seems that currently we
> >> have to set the "derby.system.home" to configure where the data files
> >> should go.  This does not seem to lend itself to supporting multiple
> >> derby instances with each with it's own data directory.  Is it
> >> possible to fully configure derby without using System properties??
> >>
> >> --
> >> Regards,
> >> Hiram
>
> --
>
>
> We love flattery, even though we are not deceived by it,
> because it shows that we are of importance enough
> to be courted.
>
>     -Ralph Waldo Emerson, writer and philosopher (1803-1882)
>
>


--
Regards,
Hiram

Re: Running 2 Derby instances on 1 JVM, do system properties cut it??

Posted by Matt Sanford <mz...@aol.com>.
Hello,

    I currently use two separate databases from within the same JVM by 
specifying absolute database names (rather than derby.system.home and a 
relative path). This keeps my files separated and seems to work very 
well. Is there some monitor locking within Derby that is essentially 
synchronizing these under the covers ? I have seen a performance 
improvement so I suspect that if there is it is minimal.
    In my case I found much of my time was spent waiting on my static DB 
class. To fix it I open multiple databases and choose them using a hash 
of one of my key fields. works like a charm.

Cheers;
  -- Matt Sanford

David.Vancouvering@Sun.COM wrote:
> Hi, Hiram.  You have hit on an issue that prevents multiple databases 
> from being run within the same VM.  This is something we want to fix 
> in Derby, but it's a fairly big effort.
>
> As it stands the only way to configure the Derby database home is with 
> system properties.  So all uses of Derby within a given VM must access 
> the same database home and use the same system-wide configuration.
>
> David
>
> Hiram Chirino wrote:
>> Hi Everybody,
>>
>> ActiveMQ makes extensive use of Derby for storage of it's persistent
>> messages.  You have have done a great job with Derby!  Thanks for the
>> hard work!
>>
>> One of the things that ActiveMQ supports is running multiple brokers
>> on 1 JVM.  In that case we would actually like to run 2 derby
>> instances with different data directories.  It seems that currently we
>> have to set the "derby.system.home" to configure where the data files
>> should go.  This does not seem to lend itself to supporting multiple
>> derby instances with each with it's own data directory.  Is it
>> possible to fully configure derby without using System properties??
>>
>> -- 
>> Regards,
>> Hiram

-- 


We love flattery, even though we are not deceived by it, 
because it shows that we are of importance enough 
to be courted.

    -Ralph Waldo Emerson, writer and philosopher (1803-1882)


Re: Running 2 Derby instances on 1 JVM, do system properties cut it??

Posted by "David W. Van Couvering" <Da...@Sun.COM>.
Hi, Hiram.  You have hit on an issue that prevents multiple databases 
from being run within the same VM.  This is something we want to fix in 
Derby, but it's a fairly big effort.

As it stands the only way to configure the Derby database home is with 
system properties.  So all uses of Derby within a given VM must access 
the same database home and use the same system-wide configuration.

David

Hiram Chirino wrote:
> Hi Everybody,
> 
> ActiveMQ makes extensive use of Derby for storage of it's persistent
> messages.  You have have done a great job with Derby!  Thanks for the
> hard work!
> 
> One of the things that ActiveMQ supports is running multiple brokers
> on 1 JVM.  In that case we would actually like to run 2 derby
> instances with different data directories.  It seems that currently we
> have to set the "derby.system.home" to configure where the data files
> should go.  This does not seem to lend itself to supporting multiple
> derby instances with each with it's own data directory.  Is it
> possible to fully configure derby without using System properties??
> 
> --
> Regards,
> Hiram