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";
        checkClosedOrFailed();
                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 )
    AMQ_CATCH_EXCEPTION_CONVERT(
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.


Thanks,
Radha.

--
View this message in context: 
http://activemq.2283324.n4.nabble.com/Connection-problem-in-using-Activemq-CPP-tp3579368p3584424.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Reply via email to