[jboss-jira] [JBoss JIRA] (WFLY-6292) A Warning should be logged if an interceptor is ignored because of missing configuration

Stuart Douglas (JIRA) issues at jboss.org
Tue Apr 5 20:35:00 EDT 2016


     [ https://issues.jboss.org/browse/WFLY-6292?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Stuart Douglas resolved WFLY-6292.
----------------------------------
    Resolution: Rejected


This is already present:

10:33:43,674 WARN  [org.jboss.as.ejb3] (MSC service thread 1-6) WFLYEJB0010: Default interceptor class org.jboss.as.test.integration.ejb.interceptor.defaultinterceptor.DefaultInterceptor is not listed in the <interceptors> section of ejb-jar.xml and will not be applied

> A Warning should be logged if an interceptor is ignored because of missing configuration
> ----------------------------------------------------------------------------------------
>
>                 Key: WFLY-6292
>                 URL: https://issues.jboss.org/browse/WFLY-6292
>             Project: WildFly
>          Issue Type: Enhancement
>            Reporter: Wolf-Dieter Fink
>            Assignee: Stuart Douglas
>
> Every class can be used as interceptor without an annotation. The class must be listed within the ejb-jar.xml deployment descriptor.
> From the spec there are two elements in ejb-jar.xml:
> <!-- definition of Iterceptor classes -->
>     <interceptor>
>       <interceptor-class>ACLASS</interceptor-class>
>       <!--
>           no around-invoke needed if the method is unique
>        -->
>     </interceptor>
>   </interceptors>
>    <!-- the binding to EJB's -->
>   <assembly-descriptor>
>     <interceptor-binding>
>       <ejb-name>*</ejb-name>
>       <interceptor-class>ACLASS</interceptor-class>
>     </interceptor-binding>
>   </assembly-descriptor>
> The problem is that the <interceptor> is needed to define the interceptor class unless the class contains the @AroundInvoke annotation.
> The binding need this to take effect.
> The problem here is that any wrong configuration, like typo in the class name, might have the effect that the interceptor is ignored silent.
> As an enhancement a WARN message should be logged that the interceptor-binding can't find the related interceptor or even a ClassNotFoundException if the class is not available.



--
This message was sent by Atlassian JIRA
(v6.4.11#64026)


More information about the jboss-jira mailing list