hivemind-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Carman" <ja...@carmanconsulting.com>
Subject RE: MethodInterceptorFactory and multiple interceptors
Date Wed, 19 Jul 2006 14:24:59 GMT
There shouldn't be any difference.  Notice the "name" attribute, as Knut
pointed out.  That's what is used to tell them apart.

-----Original Message-----
From: Johan Lindquist [mailto:johan@kawoo.co.uk] 
Sent: Wednesday, July 19, 2006 10:19 AM
To: user@hivemind.apache.org
Subject: Re: MethodInterceptorFactory and multiple interceptors

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

What happens if you contribute twice to the service point outside of the
service point definition?

Johan

James Carman wrote:
> In my test case for multiple method interceptors, I use multiple like
this:
> 
> <module id="hivemind.lib.test" version="1.0.0">
>   
>   <service-point id="FortuneCookie"
> interface="org.apache.hivemind.lib.impl.FortuneCookie">
>     <create-instance
> class="org.apache.hivemind.lib.impl.FortuneCookieImpl"/>
>     <interceptor service-id="hivemind.lib.MethodInterceptorFactory"
> name="first">
>       <impl
> object="instance:org.apache.hivemind.lib.impl.SuffixMethodInterceptor" />
>     </interceptor>
>     <interceptor service-id="hivemind.lib.MethodInterceptorFactory"
> name="second">
>       <impl
> object="instance:org.apache.hivemind.lib.impl.SuffixMethodInterceptor" />
>     </interceptor>
>   </service-point>
>   
> </module>
> 
> -----Original Message-----
> From: Johan Lindquist [mailto:johan@kawoo.co.uk] 
> Sent: Wednesday, July 19, 2006 9:22 AM
> To: user@hivemind.apache.org
> Subject: MethodInterceptorFactory and multiple interceptors
> 
> Hi All,
> 
> I have recently been using the MethodInterceptorFactory to create
> interceptors based on the AOP Alliance libraries.
> 
> Now, it is all fine until I realised that I can not have two different
> interceptors (using the MethodInterceptorFactory service id) added to
> the same service point.
> 
> This would make sense if you for example referred to the logging
> interceptor - two of it would be kinda dum.  But since the
> MethodInterceptorFactory is simply providing the plumbing for the real
> implementation, 2 or more of this particular contribution should be fine
> right?
> 
> Not sure if this is an easy problem to solve or not?
> 
> Cheers,
> 
> johan
> 

- --
you too?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFEvj9M1Tv8wj7aQ34RArZiAJsGllZwd5FgwABxjAGU7OJRKathuQCdHoNZ
S6bhZkekFEjAfCrOphjtI0E=
=O2B6
-----END PGP SIGNATURE-----



Mime
View raw message