Noel,

Thank you for the precise information. The JDBC spool does indeed
implement the FIFO behaviour that I require.

Maybe you can offer quick answers to some more questions:

1. How can a mailet retrieve the arrival timestamp of a mail? I guess
this information is contained in column "last_updated" of table "spool",
but I don't know how often it is overwritten.

2. My mailet uses MySQL for storing data. Can it benefit from the James'
DataSource handling? I am thinking in adding my DataSource configuration
to the James config file and get a reference to the object from within
my mailet.

3. How can my mailet find out the size of the spool and the outgoing
repositories?

Regards,


Diego

-----Message d'origine-----
De�: Noel J. Bergman [mailto:[EMAIL PROTECTED]] 
Envoy�: vendredi 24 janvier 2003 19:54
��: James Users List
Objet�: RE: FIFO spool manager

Diego,

Interesting.  I am planning to re-visit the spooling mechanism for v3 to
allow other things, such as clustering.  So you have a requirement for
FIFO?

You would need to have a SpoolRepository subclass that ensures FIFO
behavior
for accept().  If you do it for James v2.x, the stable branch, the
package
is org.apache.james.services, but James v3 moves the spool interface to
org.apache.mailet.

However, I'm not sure that Steve is totally correct.  The JDBC spool
code
uses the message ID (see James.getId()) for the key.  getId() returns a
monotonically increasing value.  Although you might have to limit the
spool
threads to one, to ensure that processing finishes in a FIFO manner, a
quick
glance suggests that the JDBC spool should do what you want.

        --- Noel

-----Original Message-----
From: Diego Castillo [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 24, 2003 5:24
To: [EMAIL PROTECTED]
Subject: FIFO spool manager


Hi all,

I have been using James for about a year now. I have been able to solve
most of my issues thanks to this mailing list. But I have one last issue
that I must solve if I want the project to be used in production: I need
the spool manager to be FIFO.

Steve Short told me back in August 7th 2002 that message keys are stored
in a HashSet (sorry, I couldn't find the mail on the archives). This
does not seem to have changed in 2.1, and I haven't heard about such a
functionality being considered for James 3. So I guess that I will have
to implement it myself.

Can anyone (Noel, Danny, Serge...) offer any directions so that I do not
get lost in the James code? Which objects should I look into first?

Any recommendations on how to implement this FIFO ordering?

When I will be finished, I plan heavy load tests. Hopefully my
modification won't make James crash, and I will be happy to submit it if
anyone is interested.


Diego


--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to