The way you've explained it, it also makes perfect sense to me. But even
thought it makes sense, that's little consolation when every member of the
distribution list gets 1000 copies of the same email before I can be
contacted, log on, and kill the server.
The error (see log dump in my post from yesterday) appears to be the maildb
datasource has run out of connections. Ok, I can increase the number of
connections in the datasource def. That may reduce the chance of this
problem. But it's not going to eliminate it. No matter how high I set the
connection pool, there will always be the possibility that in some
situation, it will be exceeded.
I would almost prefer the server completely die in this case. I'd have to
log on and restart the server. But at least 1000 copies of the email
wouldn't go out in the meantime.
>From what I think you are saying, it's working as designed. Granted, I have
written my own custom maillist mailet. But I'm curious if the shipped
maillist mailet wouldn't have the same potential catastrophic problem.
Is the only hope for me going to be to write defensive code in my mailet?
i.e.
1) create some unique signature for the message
2) store the fact that I've started processing this message in my
own db table
3) ONLY process the list if:
a) I can successfully query the table and determine this
signature isn't already there
b) I can successfully write this signature to the db
4) Otherwise, abort this list
This isn't going to solve the problem that the message is still going to be
in the infinite loop on the spool. But at least it's a dormant loop.
If my proposal above for my own code sounds reasonable, then so be it. I
have no problem writing it. I just want to know if that is my only/best
solution for guaranteeing 100% that never more than 1 copy of the email is
sent. (I'll accept 0 or 1 copy being sent. The sender can resend if
necessary).
Thanks.
Jerry
-----Original Message-----
From: Stefano Bagnara [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 22, 2006 2:09 PM
To: James Users List
Subject: Re: Mail List Mailet Infinite Loop on db failure
JWM wrote:
> Maybe I'm at the wrong level of discussion. When the exception occurs, my
> mailet exits. The mailet is the last thing in the processor. So 'ending'
> the processor and 'continuing' the processor when this is the last step
> would basically be the same thing, right? It still comes back to whether
or
> not the message gets left on the spool and starts over.
>
> Can you clarify this for me?
If it throws the exception while updating the mail in the repository
then it will never update the state of the message to say it must be
moved to another processor and the next thread will take the same
message to be processed.
Basically if you have problems while persisting the fact that the
message should not be retried it will retry it again and again: It makes
perfect sense to me.
Stefano
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]