Let me clarify my steps:

1. start up an H2 server instance.
2. From an external client, connect to it via this URL:

jdbc:h2:tcp://Localhost/nio:/usr/local/OTDBASE2/h2/
OTDBASE2;MULTI_THREADED=1

3. From another external client connect to this server with the Same
url.

The second connection results in this error:

    Database may be already in use: "Locked by another process".


Now, if I remove the "nio:" portion of the URL, the above steps work
as expected, which is both clients connecting to the tcp server
successfully.



On Nov 7, 11:53 am, Thomas Mueller <[email protected]>
wrote:
> Hi,
>
> > However, it is opened in embedded mode.
>
> The H2 TCP server itself opens the database in embedded mode, that's
> true. But if you use jdbc:h2:tcp:... then _you_ didn't open in server
> mode, not embedded mode.
>
> > I get this error when I try to
> > connect with another client:
>
> >    Database may be already in use: "Locked by another process".
>
> Yes, that means the database was already open. You need to close that
> other connection first.
>
> Regards,
> Thomas

-- 
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