On Tue, Mar 17, 2009 at 15:57, Corrado Alesso <[email protected]> wrote:
> Hello everyone.
>
> I have to write a Mailet for the James Mail Server, and the Mailet is going
> to need some collaborators defined as Spring Beans.
>
> Do you have any advice about how to architect this system? My problems are
> about Spring Application Context visibility from James.

You could create a singleton object within the Spring App Context
which is also available through a public static getter
"getInstance()". Then, at Mailet creation, you access all spring
context objects through this singleton. Make the singleton implement
ApplicationContextAware.

The best way depends on how you set up your James Server / Spring App.
Can you tell more about how you intend to let both run in the same VM?

  Bernd

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to