0 Replies Latest reply on Sep 21, 2007 7:25 AM by Andre Parodi

    Interceptors and Service dependencies

    Andre Parodi Newbie

      Hi,

      Is it possible to have have an interceptor class depend on a Service Bean. I have seen in Interceptor examples that you can inject EntityManagers and EJB references but i can't seem to inject a service dependency.

      here is my use case:
      I have a service MBean which tracks all my monitoring metrics. I have written a simple Interceptor to time the execution of EJB calls. So I would like to inject a reference to my Monitoring service MBean into an instance variable of my interceptor.
      I am using the @Depend annotation but that causes the following exception:
      java.lang.ArrayStoreException: org.jboss.injection.DependsFieldInjector

      I believe this is occuring when the stateless (which has interceptor) is being created.

      Any help much appreciated.

      thanks
      andre