activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Radha Manickam <>
Subject Re: Connection problem in using Activemq-CPP
Date Thu, 09 Jun 2011 04:38:32 GMT
Hi Tim,

I didnt get any error. But the sample application i hanging somewhere.
So I have added some debug strings in the activemq library and tried.

It is hanging in the method Connection->Start. 
After some debugging i found that it got struck in the method syncRequest in
the ActiveMQConnection class(while getting the response from the transport.

I have pasted the code with the debug strings that i have added:

Pointer<Response> ActiveMQConnection::syncRequest( Pointer<Command> command,
unsigned int timeout ) {

    try {
		cout << "Entering sycnRequest\n";
		cout << "Checked if closed or failed\n";
        Pointer<Response> response;
		cout << "Checking for the timeout value\n";
        if( timeout == 0 ) {
			cout << "Timeout is zero\n";
            response = this->config->transport->request( command );
        } else {
			cout << "Timeout is non-zero\n";
            response = this->config->transport->request( command, timeout );
		cout << "Creating the exception response\n";
        commands::ExceptionResponse* exceptionResponse =
            dynamic_cast&lt;ExceptionResponse*&gt;( response.get() );
		cout << "Created\n";
        if( exceptionResponse != NULL ) {
			cout << "Exception response is not null\n";
            // Create an exception to hold the error information.
            BrokerException exception( __FILE__, __LINE__,
exceptionResponse->getException().get() );
			cout << "throwing the the exception response\n";
            // Throw the exception.
            throw exception;
		cout << "Leaving and returning the response\n";
        return response;
    AMQ_CATCH_RETHROW( ActiveMQException )
    AMQ_CATCH_EXCEPTION_CONVERT( IOException, ActiveMQException )
decaf::lang::exceptions::UnsupportedOperationException, ActiveMQException )
    AMQ_CATCH_EXCEPTION_CONVERT( Exception, ActiveMQException )
    AMQ_CATCHALL_THROW( ActiveMQException )

The output i got is as follows:

Pinging the broker
Entering sycnRequest
Checked if closed or failed
Checking for the timeout value
Timeout is zero

After this line the application got hanged.


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

View raw message