activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gaurav Sharma <gaurav.cs.sha...@gmail.com>
Subject null BROKER_NAME to be expected?
Date Thu, 09 Aug 2012 01:26:45 GMT
In the ACTIVEMQ_LOCK table, is the null value in BROKER_NAME to be
expected? I read some old threads about this but couldn't find a definitive
answer from one of the committers. While it is a minor inconvenience for
us, at runtime, without scanning logs of the broker machines, there is a no
way to figure who the master is. So, if we have a column that is expected
to contain the master node's name, it might be easier if we can just fix
it. It might not matter but just for the record, my test datastore is mysql
and I do have the brokerName attribute specified in the broker entity in
activemq.xml and this snippet from LeaseDatabaseLocker class should work
okay:
    public String getLeaseHolderId() {
        if (leaseHolderId == null) {
            if (persistenceAdapter.getBrokerService() != null) {
                leaseHolderId =
persistenceAdapter.getBrokerService().getBrokerName();
            }
        }
        return leaseHolderId;
    }

Thanks in advance for helping figure where the ghost is that's nulling the
broker name in lock table.
-gaurav

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message