I managed to figure out what went wrong. I made following entry in
JAMES.conf.xml
<processor name="transport>
<mailet match="SomeCondition" class="ToProcessor">
<processor> someprocessor </processor>
</mailet>
---
---
<mailet match="SomeOtherCondition" class="ToProcessor">
<processor> someprocessor </processor>
</mailet>
---
---
</processor>
<processor name="someprocessor">
<mailet match="All" class="SomeProcessor">
<parameter1>value1</parameter1>
<parameter2>vale2</parameter2>
</mailet>
</processor>
The matchers SomeCondition & SomeOtherCondition were setting an error
message and the mailet SomeProcessor was trying to process the error
message. Since there is another matcher in between (All), the mail was
duplicated before being processed by SomeProcessor. The duplication of
mail does not duplicate the error message and hence the error messages
never reached SomeProcessor.
I updated the configuration file to look like following and things
worked as I wanted:
<processor name="transport>
<mailet match="SomeCondition" class="SomeProcessor">
<parameter1>value1</parameter1>
<parameter2>vale2</parameter2>
</mailet>
---
---
<mailet match="SomeOtherCondition" class="SomeProcessor">
<parameter1>value1</parameter1>
<parameter2>vale2</parameter2>
</mailet>
---
---
</processor>
Thanks for your help.
Hemendra
Steve Short wrote:
>For what it's worth, I could make use of a Message context feature like this
>too.
>
>Steve
>
>-----Original Message-----
>From: Serge Knystautas [mailto:[EMAIL PROTECTED]]
>Sent: Thursday, April 04, 2002 1:59 PM
>To: James Users List
>Subject: Re: Communicate from matcher to mailet.
>
>
>There isn't a great facility right now. I've been considering adding
>generic attribute support so you could get/set/remove attributes on the
>Mail object (of which the error message would be one such), but we
>haven't done that yet.
>
>Can you provide some sample code to show that setErrorMessage is not
>working? That should be getting stored.
>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>