Hey there,
This is how I've setup our application using james to handle retries...
In my config.xml I have to processors setup:
<processor name="resend">
<mailet match="All" class="ToProcessor">
<processor>resender</processor>
</mailet>
</processor>
<processor name="resender">
<mailet match="All" class="MMHandlerMailet">
<log4j.configuration>log4j.properties</log4j.configuration>
</mailet>
</processor>
My mailet does a try/catch around its processing (sending messages over RMI
to the actual server) and if any exceptions occur then I tell it to set the
state as resend:
mail.setState(RESEND);
I'm not sure off hand why I chain resend to resender, I vaguely remember
having to do this for some reason ( I think I wanted/needed to differentiate
between being a message being told to resend, and being resent), the
resender processor is identical to my main processor but uses the different
name so I can handle pausing a resend in the mailet:
if ("resender".equalsIgnoreCase(mail.getState())) {
...
Thread.sleep(30000);
}
Hope this helps..
On 3/16/07, Scott Mitchell <[EMAIL PROTECTED]> wrote:
Hello, we are attempting to use James as an SMTP front end to our
application. I've started work on the Mailet and things are generally
proceeding smoothly. I'm now at the point of adding logic to handle the