JMS subscriber (applet) stops receiving messages
jpbonn Aug 11, 2003 9:53 AMI have an applet that subscribes to a JMS queue. Messages are published very infrequently, about once every 6 hours. I've found that the applet stops receiving messages unless it is run on the same machine as the JMS server. The applet will stop receiving messages after a relatively short period of time (maybe 30 minutes +/- 20 minutes).
The applet receives no notification the connection has failed. The server log has a "Connection reset" error.
Everything works fine if I run the applet on the same machine as the JMS server.
1) Is this a configuration problem? Is there some sort of keep-alive I have to configure?
2) Why doesn't the subscriber receive any sort of disconnect exception?
I'm using JBoss 3.2.2RC2.
I attached parts the log from the JMS server below. I'm not sure why there is an OIL connection failure in there - I'm using a UIL connection factory. (The second exception is the UIL stacktrace).
INFO | jvm 1 | 2003/08/10 12:55:27 | 12:55:27,437 WARN [OILServerILService] Connection failure (1).
INFO | jvm 1 | 2003/08/10 12:55:27 | java.net.SocketException: Connection reset
INFO | jvm 1 | 2003/08/10 12:55:27 | at java.net.SocketInputStream.read(SocketInputStream.java:168)
INFO | jvm 1 | 2003/08/10 12:55:27 | at java.io.BufferedInputStream.fill(BufferedInputStream.java:183)
INFO | jvm 1 | 2003/08/10 12:55:27 | at java.io.BufferedInputStream.read(BufferedInputStream.java:201)
INFO | jvm 1 | 2003/08/10 12:55:27 | at java.io.ObjectInputStream$PeekInputStream.peek(ObjectInputStream.java:2133)
INFO | jvm 1 | 2003/08/10 12:55:27 | at java.io.ObjectInputStream$BlockDataInputStream.readBlockHeader(ObjectInputStream.java:2316)
INFO | jvm 1 | 2003/08/10 12:55:27 | at java.io.ObjectInputStream$BlockDataInputStream.refill(ObjectInputStream.java:2383)
INFO | jvm 1 | 2003/08/10 12:55:27 | at java.io.ObjectInputStream$BlockDataInputStream.read(ObjectInputStream.java:2455)
INFO | jvm 1 | 2003/08/10 12:55:27 | at java.io.ObjectInputStream$BlockDataInputStream.readByte(ObjectInputStream.java:2604)
INFO | jvm 1 | 2003/08/10 12:55:27 | at java.io.ObjectInputStream.readByte(ObjectInputStream.java:845)
INFO | jvm 1 | 2003/08/10 12:55:27 | at org.jboss.mq.il.oil.OILServerILService$Client.run(OILServerILService.java:205)
INFO | jvm 1 | 2003/08/10 12:55:27 | at java.lang.Thread.run(Thread.java:536)
INFO | jvm 1 | 2003/08/10 12:58:13 | 12:58:13,656
WARN [ClientConsumer] Could not send messages to a receiver.
INFO | jvm 1 | 2003/08/10 12:58:13 | java.rmi.RemoteException: Cannot contact the remote object; nested exception is:
INFO | jvm 1 | 2003/08/10 12:58:13 | java.net.SocketException: Connection reset
INFO | jvm 1 | 2003/08/10 12:58:13 | at org.jboss.mq.il.uil.UILClientIL.waitAnswer(UILClientIL.java:176)
INFO | jvm 1 | 2003/08/10 12:58:14 | at org.jboss.mq.il.uil.UILClientIL.receive(UILClientIL.java:112)
INFO | jvm 1 | 2003/08/10 12:58:14 | at org.jboss.mq.server.ClientConsumer.doWork(ClientConsumer.java:284)
INFO | jvm 1 | 2003/08/10 12:58:14 | at org.jboss.mq.threadpool.ThreadPool$WorkerThread.run(ThreadPool.java:230)
INFO | jvm 1 | 2003/08/10 12:58:14 | Caused by: java.net.SocketException: Connection reset
INFO | jvm 1 | 2003/08/10 12:58:14 | at java.net.SocketInputStream.read(SocketInputStream.java:113)
INFO | jvm 1 | 2003/08/10 12:58:14 | at java.net.SocketInputStream.read(SocketInputStream.java:182)
INFO | jvm 1 | 2003/08/10 12:58:14 | at java.io.DataInputStream.readShort(DataInputStream.java:320)
INFO | jvm 1 | 2003/08/10 12:58:14 | at org.jboss.mq.il.uil.multiplexor.StreamDemux.pumpData(StreamDemux.java:152)
INFO | jvm 1 | 2003/08/10 12:58:14 | at org.jboss.mq.il.uil.multiplexor.DemuxInputStream.fillBuffer(DemuxInputStream.java:127)
INFO | jvm 1 | 2003/08/10 12:58:14 | at org.jboss.mq.il.uil.multiplexor.DemuxInputStream.read(DemuxInputStream.java:92)
INFO | jvm 1 | 2003/08/10 12:58:14 | at java.io.BufferedInputStream.fill(BufferedInputStream.java:183)
INFO | jvm 1 | 2003/08/10 12:58:14 | at java.io.BufferedInputStream.read(BufferedInputStream.java:201)
INFO | jvm 1 | 2003/08/10 12:58:14 | at java.io.ObjectInputStream$PeekInputStream.peek(ObjectInputStream.java:2133)
INFO | jvm 1 | 2003/08/10 12:58:14 | at java.io.ObjectInputStream$BlockDataInputStream.readBlockHeader(ObjectInputStream.java:2316)
INFO | jvm 1 | 2003/08/10 12:58:14 | at java.io.ObjectInputStream$BlockDataInputStream.refill(ObjectInputStream.java:2383)
INFO | jvm 1 | 2003/08/10 12:58:15 | at java.io.ObjectInputStream$BlockDataInputStream.read(ObjectInputStream.java:2455)
INFO | jvm 1 | 2003/08/10 12:58:15 | at java.io.ObjectInputStream$BlockDataInputStream.readByte(ObjectInputStream.java:2604)
INFO | jvm 1 | 2003/08/10 12:58:15 | at java.io.ObjectInputStream.readByte(ObjectInputStream.java:845)
INFO | jvm 1 | 2003/08/10 12:58:15 | at org.jboss.mq.il.uil.UILClientIL.waitAnswer(UILClientIL.java:165)
INFO | jvm 1 | 2003/08/10 12:58:15 | ... 3 more
INFO | jvm 1 | 2003/08/10 12:58:15 | 12:58:13,656 ERROR [JMSDestinationManager] The connection to client ID:2 failed.