private void initInterceptors(EjbModule jar, EjbJarInfo ejbJar, Map<String, EnterpriseBeanInfo> beanInfos) throws OpenEJBException {
if (jar.getEjbJar().getInterceptors().length == 0) return;
if (jar.getEjbJar().getAssemblyDescriptor() == null) return;
if (jar.getEjbJar().getAssemblyDescriptor().getInterceptorBinding() == null) return;
for (Interceptor s : jar.getEjbJar().getInterceptors()) {
InterceptorInfo info = new InterceptorInfo();
info.clazz = s.getInterceptorClass();
copyCallbacks(s.getAroundInvoke(), info.aroundInvoke);
copyCallbacks(s.getPostConstruct(), info.postConstruct);
copyCallbacks(s.getPreDestroy(), info.preDestroy);
copyCallbacks(s.getPostActivate(), info.postActivate);
copyCallbacks(s.getPrePassivate(), info.prePassivate);
ejbJar.interceptors.add(info);
}
for (InterceptorBinding binding : jar.getEjbJar().getAssemblyDescriptor().getInterceptorBinding()) {
InterceptorBindingInfo info = new InterceptorBindingInfo();
info.ejbName = binding.getEjbName();
info.excludeClassInterceptors = binding.getExcludeClassInterceptors();
info.excludeDefaultInterceptors = binding.getExcludeDefaultInterceptors();
info.interceptors.addAll(binding.getInterceptorClass());
if (binding.getInterceptorOrder() != null) {
info.interceptorOrder.addAll(binding.getInterceptorOrder().getInterceptorClass());
}
info.method = toInfo(binding.getMethod());
ejbJar.interceptorBindings.add(info);
}
}