activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Timothy Bish <tabish...@gmail.com>
Subject Re: Closing connection properly in C++?
Date Wed, 27 Feb 2008 21:45:57 GMT
Its normal to see a couple exceptions on closing down the transport,
depending on your version there may be more things logged, we've cleaned
up some of that in later releases and trunk is even better.

Regards
Tim.

On Wed, 2008-02-27 at 10:43 -0800, Tom Johnson wrote:
> When I close the connection using the CMS C++ library, I get six IOExceptions
> logged to the debug console of VS2005.   These don't seem to cause a
> problem, but wondering if I'm forgetting to do something.  I am currently
> doing it this way:
> 
> if (producer!=NULL) {
> 			delete producer;
> 			producer=NULL;
> 		}
> 		if (destination!=NULL) {
> 			delete destination;
> 			destination=NULL;
> 		}
> 		// close session and connection before deleting
> 		if (session!=NULL)
> 			session->close();
> 		if (connection!=NULL)
> 			connection->close();
> 		if (session!=NULL) {
> 			delete session;
> 			session=NULL;
> 		}
> 		if (connection!=NULL) {
> 			delete connection;
> 			connection=NULL;
> 		}
>  
> Am I forgetting to do anything?
> 


Mime
View raw message