Rasitha Wijesinghe created AMQ-4681:
---------------------------------------

             Summary: Losing the database connection causes both brokers to be 
Primaries and accept connections
                 Key: AMQ-4681
                 URL: https://issues.apache.org/jira/browse/AMQ-4681
             Project: ActiveMQ
          Issue Type: Bug
    Affects Versions: 5.7.0
         Environment: Windows/64-bit/SQL Server
            Reporter: Rasitha Wijesinghe


In a mater/slave scenario if the database connection gets terminated 
unexpectedly (say due a network hiccup), master stays active with transports 
open while the secondary also becomes the master.

To re-produce (in windows env):
# Start broker 1 (watch it gets an exclusive lock and becomes the master)
# Start broker 2 - it stays as slave waiting for an exclusive lock on the table.
# Now using a tool such as tcpview, terminate the few connections to the 
database on the master.
# An exception is thrown from the master broker and slave acquires the lock and 
becomes master.
# Broker 1 (old master) is still running and all listeners are still accepting 
connections.

Is that a bug or do I not have the broker configured correctly?

I'm using com.mchange.v2.c3p0.ComboPooledDataSource with a driver class of 
com.microsoft.sqlserver.jdbc.SQLServerDriver

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to