[prev in list] [next in list] [prev in thread] [next in thread] 

List:       jboss-user
Subject:    Re: [JBoss-user] MDB stopping and starting
From:       Adrian Brock <adrian () jboss ! org>
Date:       2003-09-30 22:12:46
[Download RAW message or body]

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/jboss-user@lists.sourceforge.net/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
> >>>>JBoss-user@lists.sourceforge.net
> >>>>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
> >>JBoss-user@lists.sourceforge.net
> >>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
> JBoss-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jboss-user
-- 
xxxxxxxxxxxxxxxxxxxxxxxx 
Adrian Brock
Director of Support
Back Office
JBoss Group, LLC 
xxxxxxxxxxxxxxxxxxxxxxxx 



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

Configure | About | News | Add a list | Sponsored by KoreLogic