}
if (!(ejbJarMetaData instanceof EjbJar3xMetaData)) {
return;
}
final EjbJar3xMetaData metaData = (EjbJar3xMetaData) ejbJarMetaData;
if (metaData.getAssemblyDescriptor() == null) {
return;
}
if (metaData.getAssemblyDescriptor().getInterceptorBindings() == null) {
return;
}
//default interceptors must be mentioned in the interceptors section
final Set<String> interceptorClasses = new HashSet<String>();
if (metaData.getInterceptors() != null) {
for (final InterceptorMetaData interceptor : metaData.getInterceptors()) {
interceptorClasses.add(interceptor.getInterceptorClass());
}
}
final Map<String, List<InterceptorBindingMetaData>> bindingsPerComponent = new HashMap<String, List<InterceptorBindingMetaData>>();
final List<InterceptorBindingMetaData> defaultInterceptorBindings = new ArrayList<InterceptorBindingMetaData>();
for (final InterceptorBindingMetaData binding : metaData.getAssemblyDescriptor().getInterceptorBindings()) {
if (binding.getEjbName().equals("*")) {
if (binding.getMethod() != null) {
throw new DeploymentUnitProcessingException("Default interceptors cannot specify a method to bind to in ejb-jar.xml");
}
defaultInterceptorBindings.add(binding);