On Wed, 2011-06-08 at 21:38 -0700, Radha Manickam wrote:
> 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.
> 
> 


That sounds like normal behavior when the client is attempting to
connect but there is no broker available and you have the failover
transport enabled.  Is there a broker running on the ip / port you've
specified?

Regards

-- 
Tim Bish
------------
FuseSource
Email: tim.b...@fusesource.com
Web: http://fusesource.com
Twitter: tabish121
Blog: http://timbish.blogspot.com/



Reply via email to