org.sonar.l10n.java.rules.squid.S3281.html Maven / Gradle / Ivy
Default interceptors, such as application security interceptors, must be listed in the ejb-jar.xml
file, or they will not be treated as default.
This rule applies to projects that contain JEE Beans (any one of javax.ejb.Singleton
, MessageDriven
, Stateless
or Stateful
).
Noncompliant Code Example
// file: ejb-interceptors.xml
<assembly-descriptor>
<interceptor-binding>
<ejb-name>*</ejb-name>
<interceptor-class>com.myco.ImportantInterceptor</interceptor-class><!-- Noncompliant; will not be treated as default -->
</interceptor-binding>
</assembly-descriptor>
Compliant Solution
// file: ejb-jar.xml
<assembly-descriptor>
<interceptor-binding>
<ejb-name>*</ejb-name>
<interceptor-class>com.myco.ImportantInterceptor</interceptor-class>
</interceptor-binding>
</assembly-descriptor>
© 2015 - 2025 Weber Informatics LLC | Privacy Policy