activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From joost <>
Subject ActiveMQ-cpp: Check if ActiveMQ server is running
Date Wed, 08 Dec 2010 13:17:55 GMT

I use ActiveMQ-cpp to make a connection with an AcitveMQ server. The
CMSConnection is started with: 

        // Create a ConnectionFactory 
        auto_ptr<ConnectionFactory> connectionFactory( 
            ConnectionFactory::createCMSConnectionFactory( brokerURI ) ); 

        // Create a Connection 
        connection = connectionFactory->createConnection(); 

This works fine if the ActiveMQ server is running, but when the user forgets
to start the ActiveMQ server before starting my application, the application
hangs in the function CMSConnection::start(). Is there a way to check if a
connection can be made with the ActiveMQ server before starting the
connection, or maybe a timeout on CMSConnection->start() is possible? 


View this message in context:
Sent from the ActiveMQ - User mailing list archive at

View raw message