Uploaded image for project: 'EJB 3.0'
  1. EJB 3.0
  2. EJBTHREE-2231

Interceptor with generics, applied on a bean, isn't invoked

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Major
    • None
    • depchain-1.0.0-alpha-43
    • None
    • None

    Description

      A user has reported that a interceptor which involves generics and subclassing, as follows:

      public abstract class AbstractServiceInitializer<T> {
      @PostConstruct
      public void init(InvocationContext ctx) {
      Object o = ctx.getTarget();
      try

      { T service = (T) o; init(service); }

      catch (ClassCastException e) {
      log.warn("Class {} is not supported... doing nothing", o.getClass().getName());
      return;
      }
      }
      public abstract void init(T service);
      }

      public class MyEjbImplInitializer extends AbstractServiceInitializer<MyEjbImpl>{
      @Override
      public void init(MyEjbImpl service)

      { // specific init stuff }

      }

      doesn't get invoked when the interceptor is applied to a EJB.

      Please see the referenced forum thread for details.

      Attachments

        Activity

          People

            Unassigned Unassigned
            jaikiran Jaikiran Pai (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: