Re: BrokerService.isSlave() for pure master/slave only?

2009-01-09 Thread Ryan Stewart
That may work. I went and found the openwire connector and checked its status since slave brokers don't start their connectors. This required a bit of reflection, but it's very fast and only a temporary solution. The problem still remains, though, that isSlave() seems to make bad assumptions, and

Re: BrokerService.isSlave() for pure master/slave only?

2009-01-07 Thread Gary Tully
If you cast the value of brokerService.getPersistenceAdapter to the JDBCPersistenceAdapter you should be able to access the database locker[1] I suspect that the keepAlive() method will return false while still a slave. It is worth a try. This is the area you need to look at though. Gary. [1]

BrokerService.isSlave() for pure master/slave only?

2009-01-07 Thread Ryan Stewart
I'm trying to find a way to tell whether a broker is master or not on version 5.1. I know that 5.2 has the advisory topic for when a broker becomes master, but I can't use that just now. I do have access to the BrokerService, though, which has the isSlave() method; however I'm using JDBC master/sl