the problem now is that if I run login server with embeddeddriver, and
client with clientdriver, once the client tries to connect to to the
database it raises an error saying that "maybe another instance of derby is
running the server".

The embedded driver uses a lock file to detect two copies of the driver
accidentally accessing the same database, so perhaps even though you think
you are using the client driver for your second connection, your code is
falling through into the embedded driver in both cases, and so both programs
are trying to access the database directly, which is not allowed.

Reading the manuals, it seems that the server that uses the embeddeddriver
can use the relative path to find the db, while the client can't and need to
use //localhost:port/blahblah.. or am I wrong?

The "blahblah" part of the client connection URL can also be either a relative
or absolute database path name, just as is true with the EmbeddedDriver. So you
should be able to have your client URL be something like:

  jdbc:derby://localhost:1527//home/user/app/db

I can't remember for sure whether you need two slashes after the 1527 when you 
do this.

thanks,

bryan

Reply via email to