Mailbox Spring Responsibility

The Mailbox Spring module is designed to test the loading of mailbox implementations.

Mailbox Spring Classes

The module is small. It contains just two classes:

  • SpringMailbox - this loads the spring-mailbox.xml
  • AnonymousAuthenticator - provides a dummy org.apache.james.mailbox.Authenticator

SpringMailbox class is used to load the spring application context from spring-mailbox.xml and provides a method to get beans declared in that context.

spring-mailbox.xml contains references to Spring configuration files, one for each mailbox implementation and for other components. You might find the following files:

  • spring-mailbox-memory.xml
  • spring-mailbox-jpa.xml
  • spring-mailbox-authenticator.xml
  • spring-mailbox-locker.xml

Each mailbox configuration file is used to declare beans that will instantiate all components (MailboxSessionMapperFactory, MailboxManager, UidProvider, etc) needed to start that mailbox implementation.