Hi, In my config.xml in the root processor,i included a matcher.If that returns success i am executing the mailet which sets the mail to ghost as u said.But my problem is the second matcher is executing first and then the first one.Why is this happening? Am i including them in the right processor? Thanx and regards Sundeep
----- Original Message ----- From: "Stefano Bagnara" <[EMAIL PROTECTED]> To: "James Users List" <server-user@james.apache.org> Sent: Monday, January 30, 2006 1:15 AM Subject: Re: Matcher priority > sundeep Gelli wrote: > > Hi, > > > > How can i assign priority to the matchers?I need to implement one matcher and if it fails i need to execute the other.Will the matchers execute in the order in which they appear? > > James execute matchers inside a processor in the same order you write them. > When a matcher matches the message then the associated mailet is > executed. The mailet can stop the message or let it being processed from > the following matcher. The mailet decide this by setting the "state" > field of the Mail. Use Mail.GHOST to stop the message, while > "processorname" to move the messsage to another processor. > > Many mailets support the <passThrough> option to alter the default > behaviour. Using <passThrough>true</passThrough> the mail will be > processed by the following matchers. > > > In my config.xml,if one of my matchers return success,i am assigning it to null i.e dont want to execute the mail anymore.But all the other matchers were also checked. > > Assigning an input parameter to null in Java does not put null in the > object, this is a Java foundation. > > You have to call mail.setState(Mail.GHOST) if you want to "eat" the message. > > 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]