You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-user@james.apache.org by Johnny Minty <jo...@minty.net.nz> on 2013/03/13 12:33:56 UTC
AOP / Mailet loading
Hi Guys,
When mailets are loaded are they registered as beans within the spring container?
I intend to use AOP on methods within a mailet however if it is not registered as a spring bean I will need to use load time weaving which I want to avoid if possible.
Kind regards,
Johnny Minty
Re: AOP / Mailet loading
Posted by Eric Charles <er...@apache.org>.
Hi,
As any mailet can be defined, there is not pre-defined mailet bean in
the spring context.
They are loaded with a MailetLoaderBeanFactory [1].
Maybe you could do some clever things in the MailetLoaderBeanFactory,
but it will always be acting runtime, the same way load-time weaving acts.
Are you looking on this do avoid any preformance penality?
Once you weave, I'm not sure if Compile or Load time makes a big
difference (read [2] for example). Weaving vs non-weaving does make the
difference.
Thx, Eric
[1]
https://svn.apache.org/repos/asf/james/server/trunk/container/spring/src/main/java/org/apache/james/container/spring/bean/factory/mailetcontainer/MailetLoaderBeanFactory.java
[2]
http://nurkiewicz.blogspot.co.uk/2009/10/yesterday-i-had-pleasure-to-participate.html
On 13/03/2013 11:33, Johnny Minty wrote:
> Hi Guys,
>
>
> When mailets are loaded are they registered as beans within the spring container?
>
> I intend to use AOP on methods within a mailet however if it is not registered as a spring bean I will need to use load time weaving which I want to avoid if possible.
>
>
>
> Kind regards,
>
> Johnny Minty
>
---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org