db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dag Wanvik <dag.wan...@oracle.com>
Subject Re: Finding a role of Derby pair in Replication (Master or Slave)
Date Wed, 27 Feb 2013 03:37:04 GMT
The replication feature in Derby is pretty much bare bones still. I
don't believe there is an easy API to enquire about the
state as you request. I think you should be able to detect if the slave
has failed over, by seeing you can now connect to it (when it is still a
slave it isn't fully booted an normal connection attempt will fail).

As for an active Derby db instance being master, I think you can inspect
the log file to detect that state. Trying a startMaster would fail if it
is already a master, but that could have side effects you don't want of
course.

Hope this helps,
Dag


On 27.02.2013 00:44, Oskar Zinger wrote:
> Is there a way to find out if a replicating pair of Derby is either
> master or slave? Or if the derby pair is participating in replication
> (mode)?
>
> It would be nice to have a way to find out a role and if its in
> replicating mode.
>
> This would be useful and easy way to determine which stopMaster=true
> or stopSlave=true attribute to use.
>
> Thanks,
> Oskar


Mime
View raw message