james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shilpa Dalmia <Shi...@PostX.com>
Subject RE: Re: Matcher/Mailet Library
Date Tue, 14 May 2002 23:25:30 GMT
If u look at LinerProcessor service method

            //See if the state was changed by the mailet
            if (!mail.getState().equals(originalState)) {
                //If this message was ghosted, we just want to let it die
                if (mail.getState().equals(mail.GHOST)) {
                    //let this instance die...
                    mail = null;
                    continue;
                }
                //This was just set to another state... store this back in
the spool
                //  and it will get picked up and run in that processor

                //Note we need to store this with a new mail name, otherwise
it
                //  will get deleted upon leaving this processor
                //mail.setName(newName(mail));
                //We do not need to rename the message now as the spool
manager
                //will delete from the spool only if the processing is done.
                spool.store(mail);
                mail = null;
                continue;

the mail gets written to the spool only if the state is changed, which means
it needs to be transferred to the next processor. If the state is unchanged,
it won't be written back to the spool.

Now, it depends on whether his mailet is in the same processor or in a diff.
one. If it is in the same processor, the mail message would be transferred
on to the next mailet without being written to the spool. 
(I'm assuming he's trying to look at the spool file to see if its been
modified, if not this is irrelevant).

Shilpa

-----Original Message-----
From: Noel J. Bergman [mailto:noel@devtech.com]
Sent: Tuesday, May 14, 2002 3:10 PM
To: James Developers List
Subject: RE: Re: Matcher/Mailet Library


> 2. Check if your mailet is setting the state correctly to be
>    written back to the spool & transferred to the next mailet.

How does one do that?  The examples I've seen appear to show new messages
being re-posted, and the old message being ghosted.  He isn't doing that; he
appears to be trying to change the original message.  How does one affect
the operation you've suggested, and he appears to want to do?  Does the Mail
state cause that to happen?  Which state?

	--- Noel


--
To unsubscribe, e-mail:   <mailto:james-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:james-dev-help@jakarta.apache.org>

--
To unsubscribe, e-mail:   <mailto:james-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:james-dev-help@jakarta.apache.org>


Mime
View raw message