Bugs item #804485, was opened at 2003-09-11 14:50
Message generated for change (Comment added) made by ejort
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=376685&aid=804485&group_id=22866
Category: JBossMQ
Group: v3.2
>Status: Closed
>Resolution: Works For Me
Priority: 5
Submitted By: Udo Schwedt (schwedt)
>Assigned to: Adrian Brock (ejort)
Summary: JMS message lost on restart
Initial Comment:
Hello all,
the following problem occurs on both JBoss 3.2.1 and
3.2.2RC3. I'm running Sun VM 1.4.1_03-b02 on Win2K Pro.
With a MDB which listens on a queue using the file
based PM, when the server is stopped and started again
while JMS are left to consume, exactly one message is lost.
To reproduce, set up a simple client and MDB. The
client connects to the queue and sends some 50
persistent messages (with an increasing number) to the
queue. The MDB's onMessage() method does nothing but to
trace the received message and sleep for 10 seconds.
When the server is stopped (Ctrl-C) before all messages
were consumed, all messages not consumed yet can be
found in the persistence directory for the queue,
except the message immediately following the latest
consumed message (Dead letter queue is empty).
If the server is restarted, the remaining persisted
messages are processed, but one message is lost.
Also see files in attached ZIP archive:
- server trace for server 1 (before restart)
- server trace for server 2 (after restart)
- source for the client
- source and XML files MDB
- relevant server configuration files
In the example files, message no. 16 is lost.
BTW: the exception in the server 1 trace:
16:24:59,232 ERROR [JMSContainerInvoker] Exception in
JMSCI message listener
java.lang.NullPointerException
at
org.jboss.ejb.plugins.jms.JMSContainerInvoker.invoke(JMSContainerInvoker.java:728)
at
org.jboss.ejb.plugins.jms.JMSContainerInvoker$MessageListenerImpl.onMessage(JMSContainerInvoker.java:1020)
at
org.jboss.jms.asf.StdServerSession.onMessage(StdServerSession.java:241)
at
org.jboss.mq.SpyMessageConsumer.sessionConsumerProcessMessage(SpyMessageConsumer.java:636)
at
org.jboss.mq.SpyMessageConsumer.addMessage(SpyMessageConsumer.java:442)
at org.jboss.mq.SpySession.run(SpySession.java:294)
at
org.jboss.jms.asf.StdServerSession.run(StdServerSession.java:177)
at
EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:732)
at java.lang.Thread.run(Thread.java:536)
occurs on shutdown and looks just like the exception
mentioned in bug no. 781687 - I thought the bug was
already fixed (or didnt the fix make in in 3.2.2RC3)?
----------------------------------------------------------------------
>Comment By: Adrian Brock (ejort)
Date: 2003-09-15 09:48
Message:
Logged In: YES
user_id=9459
First, you are not allowed to throw EJBException from onMessage
you should use messageDrivenContext.setRollbackOnly()
You aren't using transactional delivery (onMessage is not marked
as Required), this falls into an implementation specific part
of the spec.
JBossMQ chooses to redeliver messages after a RuntimeException
from onMessage ZERO times.
I don't see the NullPointer problem with JBoss3.2.2RC4,
I do see it processing message number 16 before shuting down.
10:26:07,478 INFO [MessageDrivenContainer] Destroying
10:26:07,489 INFO [JMSContainerInvoker] Destroying
10:26:09,778 INFO [AbstractDeploymentScanner$ScannerThread]
Shutdown
10:26:14,164 INFO [TestMDB] OOOOOOOOOOOOOOOOOOOOO Received
message no. 16. OOOOOOOOOOOOOOOOOOOOO
10:26:24,171 INFO [DLQHandler] Destroying
10:26:24,172 INFO [DLQHandler] Destroyed
10:26:24,172 INFO [JMSContainerInvoker] Destroyed
10:26:24,173 INFO [MessageDrivenInstancePool] Destroying
I have changed the shutdown process to not destroy the DLQ
handler
until it has shutdown the session pool, but I don't think
that is
relevent to the problem. It was an obvious problem when
I reviewed the server log.
Regards,
Adrian
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=376685&aid=804485&group_id=22866
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development