[Mulgara-general] Two Database instances in the same process?

Paul Gearon gearon at ieee.org
Wed Sep 30 17:08:37 UTC 2009


On Wed, Sep 30, 2009 at 12:19 AM, Karsten Huneycutt <kph at skuld.us> wrote:
> Hello --
>
> On Sep 27, 2009, at 8:52 PM, Paul Gearon wrote:
>
>> On Sun, Sep 27, 2009 at 6:54 PM, Karsten Huneycutt <kph at skuld.us>
>> wrote:
>> <snip/>
>>>> Unfortunately, no. It's mostly there, but there are a few static
>>>> variables that remain. I always wanted to fix this, but I've never
>>>> tried to track it all down, because until now no one ever asked for
>>>> it.
>>>
>>> If I have more time, I may try to track this down -- having two
>>> processes for this is really sub-optimal for my needs.
>>
>> It would be much appreciated if you did.  :-)
>
> Aha.  In:
>
> src/jar/store-stringpool-xa11/java/org/mulgara/store/stringpool/xa11/
> XA11StringPoolFactory.java
>
> the factory creates a singleton instance of itself, pre-configured
> with the database paths, which is the source of the stickiness of the
> first database's paths.  If you remove the singleton and get it to
> create a new XA11StringPoolFactory each time, it allows the creation
> of two databases in the same process.
>
> Whether they work or not remains to be seen... ;)
>
> I will re-enable that bit of my code tomorrow and try it out.  I'll be
> able to tell rather quickly whether or not things are okay.

I believe there's more to it, but you may be right.

Importantly, this class is mostly a copy of another class that is
often deployed as well. Yes, there should be an abstract base class
between them, but I hadn't expected to keep both of them alive when I
first wrote it.  :-)  All the same, any changes here will also need to
be in XAStringPoolFactory, and possibly XANodePoolFactory.

Paul



More information about the Mulgara-general mailing list