You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by Norman Maurer <no...@apache.org> on 2010/02/03 20:15:21 UTC

Moving class loading stuff to spring-beans.xml

Hi all,

after thinking a bit more about the current way how james "load" the
specific implementation of (for example) UsersRepositories or
MailRepositories is really not optimal in terms of injection and J2EE
stuff. I would suggest to move the whole class config of Repositories
(and handlers) to spring-beans.xml  and let the container handle the
loading stuff. In the "normal" configs we then just would let the user
dedicide which implementation he want to choose (he is prolly not
interested in specify the class at all). We could use springs lazy
loading to not waste memory for not needed repository implementations.
So we would be able to easly inject (for example) EntityManager etc.


Does this sound ok to you all ?

Bye,
Norman

---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Re: Moving class loading stuff to spring-beans.xml

Posted by Manuel Carrasco Moñino <ma...@apache.org>.
yes it makes sense,
+1
Manolo

On Wed, Feb 3, 2010 at 8:15 PM, Norman Maurer <no...@apache.org> wrote:
> Hi all,
>
> after thinking a bit more about the current way how james "load" the
> specific implementation of (for example) UsersRepositories or
> MailRepositories is really not optimal in terms of injection and J2EE
> stuff. I would suggest to move the whole class config of Repositories
> (and handlers) to spring-beans.xml  and let the container handle the
> loading stuff. In the "normal" configs we then just would let the user
> dedicide which implementation he want to choose (he is prolly not
> interested in specify the class at all). We could use springs lazy
> loading to not waste memory for not needed repository implementations.
> So we would be able to easly inject (for example) EntityManager etc.
>
>
> Does this sound ok to you all ?
>
> Bye,
> Norman
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
> For additional commands, e-mail: server-dev-help@james.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org