InterruptedException while publishing
daveespo Oct 1, 2004 10:08 AMHi,
I have an application with a multithreaded client that publishes to a topic that has one durable subscriber ... I have ensured that my client uses synchronized access to the TopicSession (rather than creating seperate TopicSessions for each thread) but I am still receiving this Exception at random times ... I saw a previous post with a similar exception and someone suggested checking my code over for Thread.interrupt() ... I have done that and can't find any case where I'm interrupting a thread while it's publishing ... I'm seeing no exceptions on the machine that's running the Topic nor any exceptions for the Subscriber (running on the same machine)
My platform is:
Machine A:
Redhat 7
JRockit 1.4.1 JVM
JMS Topic A
JDBC2 PersistenceManager using the Hypersonic DS for peristence
UIL2 Invocation layer
MBean running with one subscriber to Topic A
Machine B:
Redhat 9
Sun JVM 1.4.2_05
MBean running 150 threads with synchronized access to a TopicSession/TopicPublisher which publishes to Topic A
This box is sometimes under _very_ heavy load (Load average greater than 10)
I can't replicate this problem in a clean-room application; only under load in my application ...
[10/1 09:47:23.004,ERROR,PublishingTools] Caught JMSException while trying to send but we're going to keep trying ...
org.jboss.mq.SpyJMSException: Cannot send a message to the JMS server; - nested throwable: (java.lang.InterruptedException)
at org.jboss.mq.Connection.sendToServer(Connection.java:1021)
at org.jboss.mq.SpySession.sendMessage(SpySession.java:1001)
at org.jboss.mq.SpyMessageProducer.send(SpyMessageProducer.java:247)
at org.jboss.mq.SpyMessageProducer.send(SpyMessageProducer.java:212)
at org.jboss.mq.SpyTopicPublisher.publish(SpyTopicPublisher.java:63)
at com.xxx.PublishingTools.publish(PublishingTools.java:318)
at com.xxx.PublishingTools.publishRetry(PublishingTools.java:238)
at com.xxx.SenderThread.run(SenderThread.java:443)
at java.lang.Thread.run(Thread.java:534)
Caused by: java.lang.InterruptedException
at EDU.oswego.cs.dl.util.concurrent.LinkedQueue.put(LinkedQueue.java:94)
at org.jboss.mq.il.uil2.SocketManager.internalSendMessage(SocketManager.java:239)
at org.jboss.mq.il.uil2.SocketManager.sendMessage(SocketManager.java:192)
at org.jboss.mq.il.uil2.UILServerIL.addMessage(UILServerIL.java:240)
at org.jboss.mq.Connection.sendToServer(Connection.java:1013)
... 8 more