I\'m using Java EE 6 & Jboss AS7.1 and try to use interceptor binding (Example from jboss site).
I have an InterceptorBinding annotation:
@Interc
Did you enable your interceptor as described in the referenced example?
By default, a bean archive has no enabled interceptors bound via interceptor bindings. An interceptor must be explicitly enabled by listing its class under the element of the beans.xml file of the bean archive.
According to the documentation there is another way rather than using beans.xml:
You do not need to specify the interceptor in the beans.xml file when you use the @Priority annotation.
@Logged
@Interceptor
@Priority(Interceptor.Priority.APPLICATION)
public class LoggedInterceptor implements Serializable { ... }
And it works.
You can use any priority value = Priority.Application is 2000 by default.
For example =
@Interceptor
@Loggable
@Priority(100)
public class FileLogger {}
Priority type:
You manage primary loading for interceptors.