Subject | Re: [Firebird-Java] Multiple connections to embedded Firebird |
---|---|
Author | Helen Borrie |
Post date | 2004-12-24T10:37:34Z |
At 11:51 AM 23/12/2004 -0600, you wrote:
"full" server, it opens the database file when the first attachment is made
and locks the file exclusively. That means no other server can access it.
It doesn't mean you can't make multiple connections to it.
Meanwhile, if you have a group of applications in the embedded server's app
directory, they can make connections to the server.
server.
use with embedded) isn't thread-safe. Let the server take care of the
threading on its side, by making a distinct connection for each operation
that you would normally thread off from a TCP/IP or NP connection if you
were running multi-user.
Embedded in Firebird 2 will use a different local protocol (XNET). I
haven't tried it yet but I understand it is thread-safe.
connection.
Helen
>My understanding is that embedded Firebird does not support multipleWell, yes, it does. The embedded server is just a Superserver. Like the
>concurrent connections.
"full" server, it opens the database file when the first attachment is made
and locks the file exclusively. That means no other server can access it.
It doesn't mean you can't make multiple connections to it.
Meanwhile, if you have a group of applications in the embedded server's app
directory, they can make connections to the server.
>However, I am able to open multiple connectionsNo more than if the "full" server was serving the database. It's the same
>via Jaybird. I'm a bit suspect of these and suspect there will be
>problems (deadlocks?, data corruption?)
server.
>if I use them non-serially (i.e. from different threads).The current "local" connection protocol (IPServer, the one that you must
use with embedded) isn't thread-safe. Let the server take care of the
threading on its side, by making a distinct connection for each operation
that you would normally thread off from a TCP/IP or NP connection if you
were running multi-user.
Embedded in Firebird 2 will use a different local protocol (XNET). I
haven't tried it yet but I understand it is thread-safe.
>Is this the case? If so, should Jaybird throw an exception when multipleNo. On the other hand, you're likely get AVs if you try to multi-thread a
>connections to the same database file are opened?
connection.
Helen