ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » IBM MQ Java / JMS » stopping QM blocks com.ibm...JmsMessageConsumerImpl -bug?

Post new topic  Reply to topic
 stopping QM blocks com.ibm...JmsMessageConsumerImpl -bug? « View previous topic :: View next topic » 
Author Message
gstasica
PostPosted: Thu Aug 12, 2010 9:17 am    Post subject: stopping QM blocks com.ibm...JmsMessageConsumerImpl -bug? Reply with quote

Newbie

Joined: 12 Aug 2010
Posts: 4

hi,

i'm trying to implement custom auto reconnect feature in my java code as i can't upgrade my MQ 7.0 to version 7.0.1. My configuration is as follows:
- many threads (MessageConsumers) all using the same connection factory
- all threads reuse the same Queue/TopicConnection object
- every thread has its own session object
- no 'shared conversation' parameter specified on the webshpere channel (if set to yes the my results were similar)

what i've noticed is that once the queue manager is gone some threads blocks in the websphere code and never return

Code:

"MyThread.0" daemon prio=6 tid=0x34ac0000 nid=0x161c in Object.wait() [0x38a5f000]
   java.lang.Thread.State: WAITING (on object monitor)
   at java.lang.Object.wait(Native Method)
   - waiting on <0x14691ec8> (a com.ibm.mq.jmqi.remote.internal.system.RemoteRequestEntry)
   at java.lang.Object.wait(Object.java:485)
   at com.ibm.mq.jmqi.remote.internal.RemoteHconn.exchangeTSH(RemoteHconn.java:1396)
   - locked <0x14691ec8> (a com.ibm.mq.jmqi.remote.internal.system.RemoteRequestEntry)
   at com.ibm.mq.jmqi.remote.internal.system.RemoteProxyQueue.requestMessages(RemoteProxyQueue.java:958)
   at com.ibm.mq.jmqi.remote.internal.system.RemoteProxyQueue.flushQueue(RemoteProxyQueue.java:1756)
   at com.ibm.mq.jmqi.remote.internal.system.RemoteProxyQueue.proxyMQGET(RemoteProxyQueue.java:2465)
   at com.ibm.mq.jmqi.remote.internal.RemoteFAP.jmqiGetMessage(RemoteFAP.java:4651)
   at com.ibm.mq.jmqi.internal.JmqiTools.getMessage(JmqiTools.java:1010)
   at com.ibm.mq.jmqi.remote.internal.RemoteFAP.jmqiGet(RemoteFAP.java:4601)
   at com.ibm.msg.client.wmq.internal.WMQConsumerShadow.getMsg(WMQConsumerShadow.java:1051)
   - locked <0x145cb7f8> (a java.lang.Object)
   at com.ibm.msg.client.wmq.internal.WMQSyncConsumerShadow.receiveInternal(WMQSyncConsumerShadow.java:203)
   at com.ibm.msg.client.wmq.internal.WMQConsumerShadow.receive(WMQConsumerShadow.java:818)
   at com.ibm.msg.client.wmq.internal.WMQMessageConsumer.receive(WMQMessageConsumer.java:452)
   at com.ibm.msg.client.jms.internal.JmsMessageConsumerImpl.receiveInboundMessage(JmsMessageConsumerImpl.java:725)
   - locked <0x145cb8a8> (a java.lang.Object)
   at com.ibm.msg.client.jms.internal.JmsMessageConsumerImpl.receive(JmsMessageConsumerImpl.java:421)
   at com.ibm.mq.jms.MQMessageConsumer.receive(MQMessageConsumer.java:258)
   at com.xx.service.MessageListenerThread.getMsg(MessageListenerThread.java:198)



the way the code works is that when an exception happens (QM is gone) the first thread tries to call
- connection stop
- connection close
(other threads don't repeat these steps as long as the exception happened within 5minutes) and subsequently
- create connection factory
- create queue/topicconnection object

once this has been done (i got valid connection & connection factory object) it's safe to create new message consumer objects

the problem i have here is that for all these threads that got stuck inside JmsMessageConsumerImpl class there is no way to create new valid message consumers!!!

i've tried to call receive method both with some timeout e.g. receive(200) and without receiveNoWait() but the results were the same - some threads would get stuck in the JmsMessageConsumerImpl class
Back to top
View user's profile Send private message
mvic
PostPosted: Thu Aug 12, 2010 4:05 pm    Post subject: Re: stopping QM blocks com.ibm...JmsMessageConsumerImpl -bug Reply with quote

Jedi

Joined: 09 Mar 2004
Posts: 2080

gstasica wrote:
i'm trying to implement custom auto reconnect feature in my java code as i can't upgrade my MQ 7.0 to version 7.0.1.

I think you're using JMS, as distinct from simply "Java". it's worth being clear about that.

I don't understand why you develop new application software ignoring the fact that 7.0.1.2 is current. Not old, but current.

7.0.1.3 is released later this month.

I suggest you do not develop for the 7.0.0.x stream. It is a waste of time.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Thu Aug 12, 2010 9:16 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

gstasica wrote:
i'm trying to implement custom auto reconnect feature in my java code as i can't upgrade my MQ 7.0 to version 7.0.1


Why can't you upgrade? I understand not wanting to go to 7.0.1.1 looking at the number of bugs fixed in JMS in 7.0.1.2... but as this (7.0.1.2) is the latest available you should be able to take advantage of all those fixes, get the latest APARs and open PMRs against any defects.

Have fun
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
gstasica
PostPosted: Fri Aug 13, 2010 2:38 am    Post subject: Reply with quote

Newbie

Joined: 12 Aug 2010
Posts: 4

hi,

i did some tests with 7.0.1.2 but the results were the same i.e. some threads would get stuck in the same place
Code:

"MyThread.0" daemon prio=6 tid=0x34ac0000 nid=0x161c in Object.wait() [0x38a5f000]
   java.lang.Thread.State: WAITING (on object monitor)
   at java.lang.Object.wait(Native Method)
   - waiting on <0x14691ec8> (a com.ibm.mq.jmqi.remote.internal.system.RemoteRequestEntry)
   at java.lang.Object.wait(Object.java:485)
   at com.ibm.mq.jmqi.remote.internal.RemoteHconn.exchangeTSH(RemoteHconn.java:1396)
   - locked <0x14691ec8> (a com.ibm.mq.jmqi.remote.internal.system.RemoteRequestEntry)
   at com.ibm.mq.jmqi.remote.internal.system.RemoteProxyQueue.requestMessages(RemoteProxyQueue.java:958)
   at com.ibm.mq.jmqi.remote.internal.system.RemoteProxyQueue.flushQueue(RemoteProxyQueue.java:1756)
   at com.ibm.mq.jmqi.remote.internal.system.RemoteProxyQueue.proxyMQGET(RemoteProxyQueue.java:2465)
   at com.ibm.mq.jmqi.remote.internal.RemoteFAP.jmqiGetMessage(RemoteFAP.java:4651)
   at com.ibm.mq.jmqi.internal.JmqiTools.getMessage(JmqiTools.java:1010)
...


why these threads can't detect server being down and there is no point in waiting for any resource. i would imagine that once the server is gone all threads which called getMessage and subsequently wait method would be notified and become active letting client code to react accordingly
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Fri Aug 13, 2010 5:48 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

Looks to me that maybe you are doing things in your program you shouldn't.

  • make sure you have no concurrent get/receive with wait on the same connection as this operation is serialized through the connection.
  • make sure you are not connection sharing. There are a lot of bug fixes in this area that are targeted for fix 7.0.1.4. As well remember that the previous point still applies.
  • remember that the default with V7 on client channel is sharing 10 instances.

I'm sure there is more but this is all I could think of right now
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
tfennelly
PostPosted: Tue Oct 19, 2010 12:06 am    Post subject: Reply with quote

Newbie

Joined: 20 May 2009
Posts: 9

Hi guys.

I'm also seeing this issue in a test I'm running for a customer, but only when I try using an XAConnectionFactory (extended transaction client installed). I upgraded to 7.0.1.2, but am still seeing the blocking thread.

One issue I may have is that I am testing this on ubuntu. As far as I can see, RHEL is the only "supported" Linux variant, but does that mean non of the others will work? What about fedora or centos? Must I have RHEL, even to just run a test env?
Back to top
View user's profile Send private message
tfennelly
PostPosted: Tue Oct 19, 2010 12:11 am    Post subject: Reply with quote

Newbie

Joined: 20 May 2009
Posts: 9

fjb_saper wrote:
[*]make sure you are not connection sharing. There are a lot of bug fixes in this area that are targeted for fix 7.0.1.4.


Sorry... if I can ask another question too please... how exactly do I turn off connection sharing? Through the explorer? Set something in the JNDI lookup properties for the Connection Factory?

Thanks.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Tue Oct 19, 2010 7:57 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

tfennelly wrote:
fjb_saper wrote:
[*]make sure you are not connection sharing. There are a lot of bug fixes in this area that are targeted for fix 7.0.1.4.


Sorry... if I can ask another question too please... how exactly do I turn off connection sharing? Through the explorer? Set something in the JNDI lookup properties for the Connection Factory?

Thanks.

It's a channel property. Check the setup of your channels
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » stopping QM blocks com.ibm...JmsMessageConsumerImpl -bug?
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.