MQ connection not closed and giving MQ Error-2009

Problem :

Sometimes MQ connection does not close even after calling close method. It gives us MQ Error code-2009. I found out solution for this problem after a long struggle and hit & try, so i thought to share it with everyone.

Solution :

What most people do the mistake is that they close queue connection before queue manager connection. When you close queue connection first then it made queue manager connection unavailable and open inspite of firing disconnect method on queue manager connection after queue close. IBM MQ close these open connections self but when you create connection very frequently before MQ close them and eventually it gives you 2009 error. So always close queue manager before queue connection.

Other related posts are :
Top 10 spring interview questions and their answers. Spring basic concepts.
JPA Hibernate Sequence generator generating odd ID value and IntegrityConstraintVolation exception is coming
Set datasource spring bean properties dynamically if server is not available

Please share these posts on facebook,Linkeedin,Google+,Twitter by clicking on below icons.

Advertisements

13 thoughts on “MQ connection not closed and giving MQ Error-2009

  1. Pingback: Logback logs are not working. Log4j logs are not working. Steps to make logging work. | Gaurav 's Blog

  2. Pingback: JPA Hibernate Sequence generator generating odd ID value and IntegrityConstraintVolation exception is coming | Blogger's Views

  3. Pingback: How to render HTML in java | Techno Tailor

  4. Pingback: HTML to PDF conversion in JAVA | HTML to PDF example in JAVA | Techno Tailor

  5. Pingback: Set datasource spring bean properties dynamically if server is not available | Techno Tailor

  6. Pingback: Interview question on same name entity twice in Jpa/Hibernate | Techno Tailor

  7. Pingback: Interview questions on concept of code on interface rather then class | Techno Tailor

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s