This works for me. As soon as the database detects the loss of the connection it frees the lock. Tested with MySQL and SQL-Server. I didn't plug the power but instead did a kill -9 or unplugged the network cable on the master. I think this is supposed to be a feature of any database or else you'd end up with a lot of locked rows if some clients terminate ungraceful.
Mario On 9/12/07, Dingwen Yuan <[EMAIL PROTECTED]> wrote: > Hi folks, > > We have tested master/slave configuration with pure jdbc persistence and the > db used are mysql and postgres. When we plugged out the electric cable of > the master machine, the row lock on the table ACTIVEMQ_LOCK cannot be > released. So later neither of the machines can get the lock and become the > master? Is the a known problem? Does any database support row lock auto > release? > > Thanks > > Dingwen Yuan >