Would this patch be too simplistic? Or plain wrong for some reason? It
would give apps the option to start up the broker in a separate thread. One
problem I could see would be that they wouldn't receive any notification as
to the success/failure of the broker initialization. Perhaps a callback
interface to the app would solve that? --Eric
Index:
BrokerService.java===================================================================
--- BrokerService.java (revision 547009)
+++ BrokerService.java (working copy)
@@ -391,6 +391,21 @@
return started.get();
}
+ public void startAsync() throws Exception {
+ Thread startupThread = new Thread (new Runnable() {
+ public void run() {
+ Log log = LogFactory.getLog(BrokerService.class);
+ try {
+ start();
+ }
+ catch (Exception ex) {
+ log.error("Failed to start broker", ex);
+ }
+ }
+ });
+ startupThread.start();
+ }
+
// Service interface
//
-------------------------------------------------------------------------
public void start() throws Exception {
--
View this message in context:
http://www.nabble.com/AMQ-1273-tf3917378s2354.html#a11107435
Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.