> I'm an H2 newbie -- but given your scenario -- why not use it only in Server
> Mode?

Good question; in effect, using the server mode it was working.

The reason why I preferred that the web application access the files
in embedded mode is just because it's *the correct way*.
Wouldn't you call me weirdo if I phone call the colleague who is
sitting next to me? :-)

Also, performances are much better accessing a local database rather
than doing it using the network (even though it's localhost). But I'm
not concerned about performance, I just don't like to waste resources.

Cheers,
--Luigi

Luigi R. Viggiano

Mobile:
   Italy: +39 366 521 5000
   Germany: +49 176 3200 1283
Web/Blog: http://en.newinstance.it
Skype: luigi.viggiano
Twitter: https://twitter.com/lviggiano
Professional Profile: http://www.linkedin.com/in/viggiano


On Tue, May 8, 2012 at 5:02 PM, Igal <[email protected]> wrote:
> I'm an H2 newbie -- but given your scenario -- why not use it only in Server
> Mode?
>
>
>
>
> On Tuesday, May 8, 2012 7:04:51 AM UTC-7, Luigi R. Viggiano wrote:
>>
>> Thanks Everyone for the answers.
>>
>> Peter, I know about the AUTO_SERVER feature, it's just a different
>> thing from what I want to have.
>> AUTO_SERVER means that the first process accessing the database does
>> it as embedded while keeping a tpc listener for subsequent
>> connections.
>>
>> Now imagine this scenario.
>>
>> Process1: access the database and becomes the holder of the lock.
>> Process2: access the database and it finds it loked, so connects to
>> Process1 with tcp connection.
>> Process1: ends its task.
>> Process2: has a broken connection now.
>>
>> What I want is to make sure that the Process2, in my case a web
>> application that will be always up, is always the one who holds the
>> lock.
>> And this is how it is specified by this page: "Using a Servlet
>> Listener to Start and Stop a Database"
>> http://www.h2database.com/html/tutorial.html#web_applications
>>
>> And I think there may be a but in the configuration exposed in the
>> documentation.
>>
>> I just discovered H2, and I think it's the best. I am migrating my app
>> from a "nosql" store to H2. H2 it's just awesome; I'm looking at the
>> source code, and it is quite incredible, sort of alien technology! :-)
>>
>> Thanks for the help.
>>
>> Luigi.
>
> --
> You received this message because you are subscribed to the Google Groups
> "H2 Database" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/h2-database/-/tBUFhQiBVLYJ.
>
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/h2-database?hl=en.

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/h2-database?hl=en.

Reply via email to