Has anyone else come up with a way to do this cleanly?  I think one big step in the right direction would be support for overriding the interceptor’s name, replacing the factory’s id with something else.  This way, we could define ONE service interceptor factory which inserts a MethodInterceptor defined elsewhere in the registry (or inline maybe) and the interceptors could still be ordered, since they could have unique names.  We could leave it backward compatible, of course, defaulting the interceptor name to the service id of the interceptor factory.

 

<interceptor service-id=”hivemind.lib.MethodInterceptorFactory” name=”security”>

  <impl object=”service:mymodule.SecurityInterceptor” />

</interceptor>

 

<interceptor service-id=”hivemind.lib.MethodInterceptorFactory” name=”logging” before=”security”>

  <impl object=”instance:com.myco.myproject.interceptor.LoggingInterceptor” />

</interceptor>

 

Here, we have defined a service interceptor using another service and one using just a plain ole object.  What do you guys think?

 

 

-----Original Message-----
From: James Carman [mailto:[EMAIL PROTECTED]
Sent:
Saturday, February 05, 2005 7:35 AM
To: [email protected]
Subject: AOPAlliance Service Interceptors...

 

-->

Hello, All.  Since the AOPAlliance Service Interceptors support didn’t make it into 1.1, when can we expect that to become available?  I would like to discuss service interceptors in my article, but there is NO WAY that I’m going to try to explain how to do it using Javassist.  I would like to use the AOPAlliance stuff.

 

James

Reply via email to