I'd prefer the plain java way for such things.
The refactoring I mentioned here (http://article.gmane.org/gmane.comp.jakarta.hivemind.devel/2333)
allows such things quite easily:

You can register a new RegistryProvider, that is called by the RegistryBuilder during registry construction:

class MyRegistryProvider {
 public void postProcess(RegistryConstruction construction) {
    // get all service points registered by all modules
    List servicePoints = construction.getServicePointDefinitions();
    for (.....) {
         if (whateverIsTrue)
construction.addIntercepter(currentServicePointDef, myInterceptor);
    }
 }
}

Or what about an interceptor factory in a annotated module that gets all service implementations
when they are constructed, so it could decide what to do?

public class MyModule()
{
   @interceptorFactory(id='myInterceptor')
   public void addMyInterceptor(Object coreImplementation) {
      if (coreImplementation.getClass().hasAnnotation("transactional")) {
           addInterceptor(coreImpolementation, myInterceptor);
      }
   }
}


Achim

James Carman schrieb:
All,

I would also like to come up with a way to allow interceptors to be added to
service points based upon some criteria.  Maybe we could have
InterceptorInjector or something.  I don't know.  But, in Spring, I can use
annotations (@Transactional for instance) to decide whether an interceptor
needs to be added to a "bean."  I'd like to be able to do the same thing
with HiveMind.  Thoughts/ideas?

James



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to