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 Bob M <rg...@orcon.net.nz> on 2014/09/26 02:14:43 UTC

Multiple open/close of a derby database

Hi

I have an application which opens a derby database and then does some things
with table A
I have now cloned this application to give me three applications which are
98% identical
App 1 opens the database and actions table 1
App 2 opens the same database and actions table 2
App3 opens the same database and actions table 3

I wish to run the three Apps simultaneously and here I run into problems....
"another instance of Derby may have already booted the database"

If I wish to retain the current setup of just one database with various
tables what changes do I need to make to the current coding?

Bob M
Dunedin
New Zealand



--
View this message in context: http://apache-database.10148.n7.nabble.com/Multiple-open-close-of-a-derby-database-tp142454.html
Sent from the Apache Derby Users mailing list archive at Nabble.com.

Re: Multiple open/close of a derby database

Posted by George Sexton <ge...@mhsoftware.com>.
On 9/25/2014 9:55 PM, mike matrigali wrote:
> or run all applications in same jvm, ie. 3 applications in an 
> application server.
>

Making sure that derby is in a class-loader that's available to all 
instances.

> On 9/25/2014 7:09 PM, George Sexton wrote:
>> You're trying to run deny in embedded mode which is exclusive to that 
>> Jvm. You need to start an instanceof derby in server mode And have 
>> the applications connect to it.
>>
>> Sent from my iPhone
>>
>>> On Sep 25, 2014, at 18:14, Bob M <rg...@orcon.net.nz> wrote:
>>>
>>> Hi
>>>
>>> I have an application which opens a derby database and then does 
>>> some things
>>> with table A
>>> I have now cloned this application to give me three applications 
>>> which are
>>> 98% identical
>>> App 1 opens the database and actions table 1
>>> App 2 opens the same database and actions table 2
>>> App3 opens the same database and actions table 3
>>>
>>> I wish to run the three Apps simultaneously and here I run into 
>>> problems....
>>> "another instance of Derby may have already booted the database"
>>>
>>> If I wish to retain the current setup of just one database with various
>>> tables what changes do I need to make to the current coding?
>>>
>>> Bob M
>>> Dunedin
>>> New Zealand
>>>
>>>
>>>
>>> -- 
>>> View this message in context: 
>>> http://apache-database.10148.n7.nabble.com/Multiple-open-close-of-a-derby-database-tp142454.html
>>> Sent from the Apache Derby Users mailing list archive at Nabble.com.
>>>
>>
>

-- 
George Sexton
*MH Software, Inc.*
Voice: 303 438 9585
http://www.mhsoftware.com

Re: Multiple open/close of a derby database

Posted by mike matrigali <mi...@gmail.com>.
or run all applications in same jvm, ie. 3 applications in an 
application server.

On 9/25/2014 7:09 PM, George Sexton wrote:
> You're trying to run deny in embedded mode which is exclusive to that Jvm. You need to start an instanceof derby in server mode And have the applications connect to it.
>
> Sent from my iPhone
>
>> On Sep 25, 2014, at 18:14, Bob M <rg...@orcon.net.nz> wrote:
>>
>> Hi
>>
>> I have an application which opens a derby database and then does some things
>> with table A
>> I have now cloned this application to give me three applications which are
>> 98% identical
>> App 1 opens the database and actions table 1
>> App 2 opens the same database and actions table 2
>> App3 opens the same database and actions table 3
>>
>> I wish to run the three Apps simultaneously and here I run into problems....
>> "another instance of Derby may have already booted the database"
>>
>> If I wish to retain the current setup of just one database with various
>> tables what changes do I need to make to the current coding?
>>
>> Bob M
>> Dunedin
>> New Zealand
>>
>>
>>
>> --
>> View this message in context: http://apache-database.10148.n7.nabble.com/Multiple-open-close-of-a-derby-database-tp142454.html
>> Sent from the Apache Derby Users mailing list archive at Nabble.com.
>>
>


Re: Multiple open/close of a derby database

Posted by George Sexton <ge...@mhsoftware.com>.
You're trying to run deny in embedded mode which is exclusive to that Jvm. You need to start an instanceof derby in server mode And have the applications connect to it.

Sent from my iPhone

> On Sep 25, 2014, at 18:14, Bob M <rg...@orcon.net.nz> wrote:
> 
> Hi
> 
> I have an application which opens a derby database and then does some things
> with table A
> I have now cloned this application to give me three applications which are
> 98% identical
> App 1 opens the database and actions table 1
> App 2 opens the same database and actions table 2
> App3 opens the same database and actions table 3
> 
> I wish to run the three Apps simultaneously and here I run into problems....
> "another instance of Derby may have already booted the database"
> 
> If I wish to retain the current setup of just one database with various
> tables what changes do I need to make to the current coding?
> 
> Bob M
> Dunedin
> New Zealand
> 
> 
> 
> --
> View this message in context: http://apache-database.10148.n7.nabble.com/Multiple-open-close-of-a-derby-database-tp142454.html
> Sent from the Apache Derby Users mailing list archive at Nabble.com.
>