Hi,

thanks for reply. %base% variable we manipulate in java code to replace
with actual shared path based for H2 db file based on some configuration.
Si it will resolve to a proper path.

My main concern is - if 2 tomcat instances try to open h2 db in server mode
right at the exact same time, will there be any problem of locking ?

The use case is - H2 db file with tables/data will be available in a common
shared location accessible to both tomcat web apps and during servlet
initialization, both read configuration data from H2 db and I see above
error.

Thanks
Ashish

On Wed, Sep 30, 2015 at 11:28 PM, MNGoldenEagle <[email protected]>
wrote:

>  What does the JDBC URL resolve to when you actually run the code?  I'm
> guessing %base% is supposed to be an environment variable that's resolved
> by a shell script...
>
> On Wed, Sep 30, 2015 at 11:30 AM, Ashish Srivastava <
> [email protected]> wrote:
>
>> Can someone help me please ?
>>
>> On Wed, Sep 30, 2015 at 3:46 PM, Ashish Srivastava <
>> [email protected]> wrote:
>>
>>> Hi All,
>>>
>>> I am facing an issue with accessing H2 db ( opening connection for
>>> read/write ) from shared location from 2 processes concurrently. I have
>>> appended AUTO_SERVER=TRUE in url and same url is being used to open DB
>>> connection from 2 tomcat servers.
>>>
>>> Example url - jdbc:h2:%base%data\nim-sm-customizations;AUTO_SERVER=TRUE
>>>
>>> When 2 server processes try to open connection exactly at same time, I
>>> hit below issue -
>>>
>>> *Database may be already in use: "Locked by another process". Possible
>>> solutions: close all other connection(s); use the server mode [90020-164]*
>>>
>>> Can someone explain me why I hit above issue in AUTO_SERVER=TRUE ?
>>>
>>> Quick response is highly appreciated.
>>>
>>>
>>> Thanks
>>> Ashish
>>>
>>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "H2 Database" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> To post to this group, send email to [email protected].
>> Visit this group at http://groups.google.com/group/h2-database.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
> --
> You received this message because you are subscribed to the Google Groups
> "H2 Database" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/h2-database.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.

Reply via email to