On 17 Aug, Hiram Chirino wrote:
>
> The MQ provider could keep track of the redelivery counter.. but yes..
> that looks good.
Would that be a custom property or are there any standards for this (the
counter that is)?
By, the way. I will no be able to do this until next week, so if some
one else feels trigger happy, pleas jump the bandwagon ;-)
(Changes need to be done in JMSContainerInvoker, MessageDrivenMetadata
(parhaps, dependning on where we place the config), any jboss.dtd,
perhaps jboss.jcml to ad a default dead letter queue, and in the JMS
chapter in the manual).
One thing hits me. It could perhaps be done as an interceptor?
//Peter
>
> Regards,
> Hiram
>
>>From: Peter Antman <[EMAIL PROTECTED]>
>>Reply-To: [EMAIL PROTECTED]
>>To: [EMAIL PROTECTED]
>>Subject: Re: [JBoss-dev] Improving MDB behavior in the presence of delivery
>>failures
>>Date: Fri, 17 Aug 2001 15:31:10 +0200 (CEST)
>>
>>On 17 Aug, Hiram Chirino wrote:
>> >
>> >
>> >>Problem is here:
>> >>
>> >>Is it not so, that the only way to ack the message (inspite of the fact
>> >>that it should be marked as roolback) to actually do a trans.commit()
>> >>here.
>> >>
>> >>But this is not possible, since that would also try to commit any faulty
>> >>bean, or am I wrong here.
>> >>
>> >>Or is it possible to delist the XAResource, start a new transaction and
>> >>make that commit?
>> >>
>> >>In that case we could probably do dead queue handling here.
>> >>
>> >
>> > ah.. I see the problem.. I guess an easier way to do dead letter
>>handling
>> > is to make sure jboss mq is marking its message resends and when the
>>Invoker
>> > sees that a message has been resent x times, then it bypasses the bean
>>and
>> > places it on the dead letter queue.
>> >
>> > Regards,
>> > Hiram
>> >
>>
>>OK, I get it (I think).
>>
>>Pseudocode:
>>
>>In JMSContainerInvoker:
>>
>> public void onMessage(final Message message)
>> {
>> // assert message != null;
>>
>> if (log.isDebugEnabled()) {
>> log.debug("processing message: " + message);
>> }
>>
>>Here is the new logic:
>> if(message.getJMSRedelivered()) {
>> id = message.getJMSMessageID();
>> if ( idchecker.howManyTimesRedelivered(id ) > maxRedeliver)
>>{
>> placeMessageOnDeadLetterQueue( message );
>> return;// The bean is never invoked - will transaction be
>>OK
>> }
>> }
>>
>>
>> Object id;
>> try {
>> id = message.getJMSMessageID();
>> } catch (JMSException e) {
>> // what ?
>> id = "JMSContainerInvoker";
>> }
>>
>> // Invoke, shuld we catch any Exceptions??
>> try {
>> invoker.invoke(id, // Object id - where used?
>> ON_MESSAGE, // Method to invoke
>> new Object[] {message}, // argument
>> tm.getTransaction(), // Transaction
>> null, // Principal
>> null); // Cred
>> }
>> catch (Exception e) {
>> log.error("Exception in JMSCI message listener", e);
>> }
>> }
>>
>>//Peter
>> >
>> > _________________________________________________________________
>> > Get your FREE download of MSN Explorer at
>>http://explorer.msn.com/intl.asp
>> >
>> >
>> > _______________________________________________
>> > Jboss-development mailing list
>> > [EMAIL PROTECTED]
>> > http://lists.sourceforge.net/lists/listinfo/jboss-development
>>
>>--
>>Jobba hos oss: http://www.tim.se/weblab
>>------------------------------------------------------------
>>Peter Antman Technology in Media, Box 34105 100 26 Stockholm
>>Systems Architect WWW: http://www.tim.se
>>Email: [EMAIL PROTECTED] WWW: http://www.backsource.org
>>Phone: +46-(0)8-506 381 11 Mobile: 070-675 3942
>>------------------------------------------------------------
>>
>>
>>_______________________________________________
>>Jboss-development mailing list
>>[EMAIL PROTECTED]
>>http://lists.sourceforge.net/lists/listinfo/jboss-development
>
>
> _________________________________________________________________
> Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
>
>
> _______________________________________________
> Jboss-development mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/jboss-development
--
Jobba hos oss: http://www.tim.se/weblab
------------------------------------------------------------
Peter Antman Technology in Media, Box 34105 100 26 Stockholm
Systems Architect WWW: http://www.tim.se
Email: [EMAIL PROTECTED] WWW: http://www.backsource.org
Phone: +46-(0)8-506 381 11 Mobile: 070-675 3942
------------------------------------------------------------
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development