Adrian,

Looks like I'm not crazy after all. I was able to recreate the problem running your code. It looks like it has nothing to do with stopping/starting the JMS container invoker. This is what I did to recreate it.

I built your test case and created a single message using "ant send". This causes a single message to thrash back and forth between the main queue and the DLQ. All is good at this point and it will run indefinitely.

The problem occurs after additional load is put on JBoss. What happens is that the message just "disappears" and the logging messages stops. If another app is running a mildly intensive operation or something significant is hot deployed while the thrashing is occurring, it just stops. This is all the indication I get when a finder method was called that returned a dozen or so entity beans. No other messages appear after this.

2003-10-01 16:39:46,669 INFO [test.mdb.MainMDBBean] ID:23-10650515866582586 null
2003-10-01 16:39:46,674 INFO [test.mdb.MainMDBBean] ID:23-10650515866582586 1
2003-10-01 16:39:46,695 INFO [test.mdb.MainMDBBean] ID:23-10650515866582586 2
2003-10-01 16:39:46,700 WARN [org.jboss.ejb.plugins.jms.DLQHandler] Message resent too many times; sending it to DLQ; message id=ID:23-10650515866582586
2003-10-01 16:39:46,703 INFO [test.mdb.DLQMDBBean] ID:2-10650515867013092
2003-10-01 16:39:46,703 DEBUG [org.jboss.resource.adapter.jms.JmsSessionFactoryImpl] [EMAIL PROTECTED], [EMAIL PROTECTED], isTopic=false
2003-10-01 16:39:46,704 DEBUG [org.jboss.resource.adapter.jms.JmsSession] Closing session
2003-10-01 16:39:46,704 DEBUG [org.jboss.resource.adapter.jms.JmsManagedConnection] Sending connection event: 1
2003-10-01 16:39:46,713 DEBUG [org.jboss.mq.SpySession] Session closing.
2003-10-01 16:39:46,716 INFO [test.mdb.MainMDBBean] ID:23-10650515867042587 null
2003-10-01 16:39:46,722 INFO [test.mdb.MainMDBBean] ID:23-10650515867042587 1
2003-10-01 16:39:46,729 INFO [test.mdb.MainMDBBean] ID:23-10650515867042587 2
2003-10-01 16:39:46,734 WARN [org.jboss.ejb.plugins.jms.DLQHandler] Message resent too many times; sending it to DLQ; message id=ID:23-10650515867042587
2003-10-01 16:39:46,743 DEBUG [org.jboss.mq.SpySession] Session closing.
2003-10-01 16:39:46,744 INFO [test.mdb.DLQMDBBean] ID:2-10650515867353093
2003-10-01 16:39:46,744 DEBUG [org.jboss.resource.adapter.jms.JmsSessionFactoryImpl] [EMAIL PROTECTED], [EMAIL PROTECTED], isTopic=false
2003-10-01 16:39:46,744 DEBUG [org.jboss.resource.adapter.jms.JmsSession] Closing session
2003-10-01 16:39:46,744 DEBUG [org.jboss.resource.adapter.jms.JmsManagedConnection] Sending connection event: 1
2003-10-01 16:42:48,201 DEBUG [org.jboss.resource.connectionmanager.IdleRemover] run: IdleRemover notifying pools, interval: 450000
2003-10-01 16:42:48,203 DEBUG [org.jboss.mq.SpySession] Session closing.
2003-10-01 16:42:48,204 DEBUG [org.jboss.mq.SpySession] Session closing.
2003-10-01 16:42:48,204 DEBUG [org.jboss.mq.SpySession] Session closing.
2003-10-01 16:42:48,204 DEBUG [org.jboss.mq.SpySession] Session closing.



Restarting JBoss usually causes the message to reappear and the thrashing to continue. I am running JBoss 3.2.2RC4, Java 1.4.1_01, Mac OS X 10.2.6, PowerBook G4 1Ghz, 1 GB RAM. Hardware resources shouldn't be an issue.


Bruce





Bruce Slawson wrote:

Thanks Adrian. I did a short run and your test seems to work as planned. At first glance your code looks almost identical to what I'm doing. I'm going to go through my code shortly and see what up.

Bruce


Adrian Brock wrote:


Hello Bruce,

I couldn't understands the details of your test, so I've created
my own. I think it reproduces what you are asking for?

I have posted it to the forums, you can choose to respond there
or here.
http://www.jboss.org/thread.jsp?forum=48&thread=39974

Regards,
Adrian

On Tue, 2003-09-30 at 20:57, Bruce Slawson wrote:


No, that doesn't appear to be that problem. When the message disappears, all the DLQs are empty. Which release has that fix? I am using 3.2.2RC4. When I redeploy the ear or restart JBoss the lost message sometimes reappears in the DLQ. Not always though.

Bruce

Adrian Brock wrote:



On Tue, 2003-09-30 at 18:04, Bruce Slawson wrote:



Adrian,

I did see that message too. Any idea why it doesn't work reliably?


Is this the bug I fixed where the Redelivered flag/count wasn't reset when it was sent to the dlq? So another mdb pulling from the dlq
would send it to its dlq straight away.


This was also on this list last month.

Regards,
Adrian




Bruce


Adrian Brock wrote:




deja-vu :-)

http://www.mail-archive.com/[EMAIL PROTECTED]/msg31889.html


Regards, Adrian

On Tue, 2003-09-30 at 01:32, Bruce Slawson wrote:



I know this question has been asked a few times before but I have not found a way to stop and start MDBs that works reliably. Might be a bug in the JMSContainerInvoker code.

Adrian Brock responded a while back:

<snip>


1. Is it possible to disable/enable an MDB from receiving messages
from a queue via JMX?




There is an outstanding bug report (670068) where it doesn't setup ENC correctly if you manually stop()/start() the MDB container.

A simpler approach would be to register the JMSContainerInvoker
as an MBean, exposing the JMS connection stop()/start()
</snip>

I used this as my starting point. The JMSContainerInvoker in 3.2.2 has stopDelivery() and startDelivery() methods in addition to the stop() and start() methods Adrian mentioned.

What I want to do is create a DLQ monitor MDB that will pull messages off the DLQ and put them back on the originating queue. I wanted the monitor start the MDB, sleep for a few seconds, and then stop the MDB. The monitor is to run periodically using a timer.

What I did first was register the invoker proxy bindings, container configuration, and assign the configuration name to the MDB in jboss.xml. I also set DeliveryActive to false so the MDB would not be active a startup.

Next I wrote a timer that called startDelivery(), slept for a few seconds, and then called stopDelivery().

All seemed to work okay at first. When I did some minor queue thrash testing the problems started. The test involved a message that went to the DLQ, was taken out by the started MDB, and put back in the originating queue. The originating queue MDB would roll back its transaction and go back into the DLQ. The cycle of moving a message from the DLQ to original queue and back to DLQ might occur several times



in the few seconds the monitor MDB is turned on.

The results for the the first few times the monitor ran were as expected (thrashing between queues). After some number (varies) of monitor stop/starts the message disappeared. Sometimes after redeploying the ear containing the MDBs and monitor the message would reappear on the DLQ and the cycle would start again. Sometimes it was gone for good.

Am I using stopDelivery()/startDelivery() correctly? I also tried using start()/stop() with the same results. Is there something else I need to be doing? Is this a bug?

TIA,
Bruce


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user




------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to