On 6/11/07, eta <[EMAIL PROTECTED]> wrote:
I've been messing with the JDBC database locker code recently, and yes, it will work as you described. The default database locker service start() method will not return until it has acquired the lock, indicating that it is the master broker. I'm not sure what the recommended way around this would be, but what I would do would be to run the BrokerService.start() method in a separate thread from my servlet init() or service() methods. This will at least allow the servlet to fully deploy even though the broker has not yet fully initialized because it is a slave.
Eric's exactly right; currnently the starting of a broker in master/slave is synchronous which would block the calling thread (such as a web app or Spring configuration) until it becomes the master. We need a way to allow the starting of the broker to be asynchronous to avoid blocking the calling thread. I've created a JIRA for this https://issues.apache.org/activemq/browse/AMQ-1273 In the mean time; another work around is to run the broker as a separate deployment unit in your server (e.g. in a separate web app) -- James ------- http://macstrac.blogspot.com/