Details
-
Enhancement
-
Resolution: Won't Do
-
Major
-
None
-
None
-
None
-
None
Description
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.
Attachments
Issue Links
- relates to
-
WFLY-3554 ejb-jar.xml interceptor-binding does not accept "*"
- Closed