Brian Spindler wrote:
We're using derby as embedded db. I want to use replication however I'm
having some trouble with the configuration. I'm reading:
http://db.apache.org/derby/docs/10.4/adminguide/adminguide-single.html#c
adminreplication
and it indicates connecting to the database with certain attributes for
configuring itself (i.e. startSlave=true & startMaster=true etc...). It
also indicates a procedure such that you have to freeze the database;
start slave; start master (which will inevitably unfreeze and begin
replication). So with replication would this work:
connect with ij tool
freeze database
shut down database/exit
copy database to slave
start slave
start master with slaveHost=...
Is that it? I'm also getting a confusing error :
Caused by: ERROR XRE08: Replication slave mode started successfully for
database 'ndb'. Connection refused because the database is in
replication slave mode.
It says started "Successfully" but "Connection refused because db is in
slave mode"
If you get this message on the slave, everything is as it should be. The
slave is now connected to the master. I suggest you try a few operations
on the master and then failover as described in the manual.
Regarding the error message: Derby either has to return a connection to
the database or throw an error. As long as Derby acts as a slave for a
database, you are not allowed to connect to it. Hence the "error".
Derby has similar behavior for other operations performed through
connect. The exception thrown from a successful shutdown is a much used
example.
--
Jørgen Løland