I wrote an EJB that consume JMS message from a queue. Everything works fine as long as I do not call the bean too frequently. As soon as the load increases (concurrent request to the same bean), then some messages get delivered twice.
I wrote a sample test case to demonstrate this behavior. The queue is named "jms/TestQueue", the connection factory "jms/ConnectionFactory", the EJB "ejb/JmsTest". The EJB can be used to produce or consume messages and the application creates several thread that will use the bean to produce/consume messages. The EJB will keep a static synchronized list of all the JMS message ID that are received. If a duplicate ID is found, then an exception is raised.
Is this a bug or am I doing something wrong ?
Note: the zip file contains the code for another problem (about UserTransaction) that I will post in a separate thread.
[Message sent by forum member 'ewernli' (ewernli)]
http://forums.java.net/jive/thread.jspa?messageID=252493