[jboss-jira] [JBoss JIRA] Created: (EJBTHREE-2231) Interceptor with generics, applied on a bean, isn't invoked

jaikiran pai (JIRA) jira-events at lists.jboss.org
Wed Jan 12 03:37:49 EST 2011


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

                 Key: EJBTHREE-2231
                 URL: https://issues.jboss.org/browse/EJBTHREE-2231
             Project: EJB 3.0
          Issue Type: Bug
    Affects Versions: depchain-1.0.0-alpha-43
            Reporter: jaikiran pai


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.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jboss-jira mailing list