if (ejbJar.getInterceptor(interceptor.getName()) == null) {
ejbJar.addInterceptor(new Interceptor(interceptor.getName()));
}
}
InterceptorBinding binding = new InterceptorBinding(bean);
assemblyDescriptor.getInterceptorBinding().add(0, binding);
for (Class interceptor : interceptors.value()) {
binding.getInterceptorClass().add(interceptor.getName());
}
}
for (Method method : inheritedClassFinder.findAnnotatedMethods(Interceptors.class)) {
Interceptors interceptors = method.getAnnotation(Interceptors.class);
if (interceptors != null) {
EjbJar ejbJar = ejbModule.getEjbJar();
for (Class interceptor : interceptors.value()) {
if (ejbJar.getInterceptor(interceptor.getName()) == null) {
ejbJar.addInterceptor(new Interceptor(interceptor.getName()));
}
}
InterceptorBinding binding = new InterceptorBinding(bean);
assemblyDescriptor.getInterceptorBinding().add(0, binding);
for (Class interceptor : interceptors.value()) {
binding.getInterceptorClass().add(interceptor.getName());
}
binding.setMethod(new NamedMethod(method));
}
}
/*
* @ExcludeDefaultInterceptors
*/
ExcludeDefaultInterceptors excludeDefaultInterceptors = clazz.getAnnotation(ExcludeDefaultInterceptors.class);
if (excludeDefaultInterceptors != null) {
InterceptorBinding binding = assemblyDescriptor.addInterceptorBinding(new InterceptorBinding(bean));
binding.setExcludeDefaultInterceptors(true);
}
for (Method method : classFinder.findAnnotatedMethods(ExcludeDefaultInterceptors.class)) {
InterceptorBinding binding = assemblyDescriptor.addInterceptorBinding(new InterceptorBinding(bean));
binding.setExcludeDefaultInterceptors(true);
binding.setMethod(new NamedMethod(method));
}
ExcludeClassInterceptors excludeClassInterceptors = clazz.getAnnotation(ExcludeClassInterceptors.class);
if (excludeClassInterceptors != null) {
InterceptorBinding binding = assemblyDescriptor.addInterceptorBinding(new InterceptorBinding(bean));
binding.setExcludeClassInterceptors(true);
}
for (Method method : classFinder.findAnnotatedMethods(ExcludeClassInterceptors.class)) {
InterceptorBinding binding = assemblyDescriptor.addInterceptorBinding(new InterceptorBinding(bean));
binding.setExcludeClassInterceptors(true);
binding.setMethod(new NamedMethod(method));
}
/**
* All beans except MDBs have remoting capabilities (busines or legacy interfaces)
*/