+1

 

I am already implementing it by adding a “name” attribute to ServiceInterceptorContribution (and its impl class and the code that builds it)...

 

public String getName()

{

  if( _name == null )

  {

    return getFactoryServiceId();

  }

  return _name;

}

 

Then, in ServicePointImpl, I changed…

 

orderer.add(sic, sic.getFactoryServiceId(), sic.getPrecedingInterceptorIds(), sic

                    .getFollowingInterceptorIds());

 

to…

 

orderer.add(sic, sic.getName(), sic.getPrecedingInterceptorIds(), sic

                    .getFollowingInterceptorIds());

 

So far, it hasn’t broken any test cases, and I’m adding in new ones to test the functionality.  I will send you guys a patch first before I commit, since I’m new to this whole thing and I’m scared that I’ll screw something up! 

 

 

 

-----Original Message-----
From:
James Carman [mailto:[EMAIL PROTECTED]
Sent:
Sunday, February 27, 2005 8:36 AM
To:
[email protected]
Subject: RE: AOPAlliance Service Interceptors...

 

-->

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