1 Reply Latest reply on Oct 13, 2001 3:43 PM by Scott Stark

    JBossMQ endless loop condition

    java4sale Newbie

      Hi,

      I'm new to JMS, and I've encountered a very frustrating problem. I've written a java application, not an EJB which connects to a JMS Queue and sends a message. The problem is that the QueueSender.send method never returns, stops the Thread that it is running on, and eventually causes an OutOfMemory error. I am inserting a BytesMessage and using java 1.4 running on linux. I am certain the problem is not due to threading on my end because, when I execute it in a single Thread I get the same problem.

      I have delved into the source code and it looks like the problem is in the OILServerIL class waitAnswer() method. This method checks an ObjectInputStream and waits for the object to be received. I'm guessing that the server is continually sending stuff casuing the method to wait forever, and eventually causes the out of memory error. It could also be a JDK1.4 bug. Or it could be something I'm doing wrong.

      I can submit code if anyone is interested.

      Any ideas?