activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Fran├žois Thillen <fre...@gmx.net>
Subject Closing connection
Date Wed, 06 Feb 2013 16:56:46 GMT
Dear Apache team,

 

I have a problem with closing a connection in my c# project.

 

Always when I open the connection, i am closing it as well. However, when I
close the complete application, ActiveMQ is blocking and so it is not
possible to close the my application. Here is my connection code:

 

        protected void Configure()

        {

            try

            {

                Destination dest = new Destination(string_destination);

                Uri connectionUri = new Uri(dest.Host);

                factory = new
Apache.NMS.ActiveMQ.ConnectionFactory(connectionUri);

                connection = factory.CreateConnection();

                session = connection.CreateSession();

                connection.Start();

                this.destination = session.GetDestination(dest.Queue);

            }

            catch (Exception ex)

            {

               handling.HandleException(ex);

            }

        }

    

        protected void Close()

        {

            session.Close();

            session.Dispose();

     //connection.Stop();

            connection.Close();

            connection.Dispose();

            connection = null;

            close = true;

        }

 

I figured out that ActiveMQ blockes in the Class ThreadPoolExecutor.cs at
the line 122 (this.executionComplete.WaitOne();)

 

Did I missed closing something?

 

Thank you very much

 

Best regards

Fran├žois


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message