On Wed, 5 Dec 2001, Lucas Gonze wrote:

> Background: my goal is to pick up messages from external sources, not SMTP 
> senders, and drop them into the normal message processing loop.  My class will 
> be a new thread looping on its data source. 

I think the easiest way is to look into SMTPHandler, and see what it does
before storing the messages into the spool (ie: SMTPHandler.doDATA()) By
using database repository, you could write your class so that it stores
the data (messages?) in the spool. Later, James spool manager would just
pick the messages up and send them out.

BTW, using other kind of repositories will do, but I think the db one is
the easiest to implement; you can just "select" and see whether your class
works as expected.

> So my question: how can an external class get a handle to either the
> SpoolRepository or the ComponentManager?  (This may be an Avalon issue?  Don't
> think so.)

You can write an Avalon block, and then get a handle on the spool
repository; take a look at JamesSpoolManager.initialize(). Problem is,
this block would be one of the James blocks, so that the class wouldn't be
quite external.

Oki




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

Reply via email to