private void checkUnusedInterceptors(final EjbModule ejbModule) { final AssemblyDescriptor assembly = ejbModule.getEjbJar().getAssemblyDescriptor(); final Interceptor[] interceptorsArray = ejbModule.getEjbJar().getInterceptors(); final List<Interceptor> interceptors = Arrays.asList(interceptorsArray); final Set<String> interceptorClassNames = new HashSet<String>(interceptors.size()); for (final Interceptor interceptor : interceptors) { interceptorClassNames.add(interceptor.getInterceptorClass()); } final Set<String> interceptorClassNamesUsedInBindings = new HashSet<String>(); for (final InterceptorBinding binding : assembly.getInterceptorBinding()) { final List<String> interceptorClass = binding.getInterceptorClass(); interceptorClassNamesUsedInBindings.addAll(interceptorClass); } final Set<String> unusedInterceptors = new HashSet<String>(); for (final String clazz : interceptorClassNames) { if (!interceptorClassNamesUsedInBindings.contains(clazz)) { unusedInterceptors.add(clazz); } } for (final String clazz : unusedInterceptors) { warn("Interceptors", "interceptor.unused", clazz); } } }
private void checkUnusedInterceptors(final EjbModule ejbModule) { final AssemblyDescriptor assembly = ejbModule.getEjbJar().getAssemblyDescriptor(); final Interceptor[] interceptorsArray = ejbModule.getEjbJar().getInterceptors(); final List<Interceptor> interceptors = Arrays.asList(interceptorsArray); final Set<String> interceptorClassNames = new HashSet<String>(interceptors.size()); for (final Interceptor interceptor : interceptors) { interceptorClassNames.add(interceptor.getInterceptorClass()); } final Set<String> interceptorClassNamesUsedInBindings = new HashSet<String>(); for (final InterceptorBinding binding : assembly.getInterceptorBinding()) { final List<String> interceptorClass = binding.getInterceptorClass(); interceptorClassNamesUsedInBindings.addAll(interceptorClass); } final Set<String> unusedInterceptors = new HashSet<String>(); for (final String clazz : interceptorClassNames) { if (!interceptorClassNamesUsedInBindings.contains(clazz)) { unusedInterceptors.add(clazz); } } for (final String clazz : unusedInterceptors) { warn("Interceptors", "interceptor.unused", clazz); } } }
for (final org.apache.openejb.jee.Interceptor interceptor : ejb.getEjbJar().getInterceptors()) { try { finderClasses.addAll(ancestors(classLoader.loadClass(interceptor.getInterceptorClass())));
for (final org.apache.openejb.jee.Interceptor interceptor : ejb.getEjbJar().getInterceptors()) { try { finderClasses.addAll(ancestors(classLoader.loadClass(interceptor.getInterceptorClass())));
for (Interceptor interceptor : ejbJar.getInterceptors()) { pruneRefs(interceptor, new EjbDeployment());
for (final Interceptor interceptor : ejbJar.getInterceptors()) { pruneRefs(interceptor, new EjbDeployment());
for (final Interceptor interceptor : ejbJar.getInterceptors()) { pruneRefs(interceptor, new EjbDeployment());
for (final Interceptor interceptor : ejbJar.getInterceptors()) { interceptor.getServiceRef().clear();
for (Interceptor interceptor : ejbJar.getInterceptors()) { interceptor.getServiceRef().clear();
for (final Interceptor interceptor : ejbJar.getInterceptors()) { interceptor.getServiceRef().clear();
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); } }
for (Interceptor interceptor : ejbModule.getEjbJar().getInterceptors()) { Class<?> clazz; try {
private void initInterceptors(final EjbModule jar, final EjbJarInfo ejbJar) throws OpenEJBException { if (jar.getEjbJar().getInterceptors().length == 0) { return; for (final Interceptor s : jar.getEjbJar().getInterceptors()) { final InterceptorInfo info = new InterceptorInfo();
private void initInterceptors(final EjbModule jar, final EjbJarInfo ejbJar) throws OpenEJBException { if (jar.getEjbJar().getInterceptors().length == 0) { return; for (final Interceptor s : jar.getEjbJar().getInterceptors()) { final InterceptorInfo info = new InterceptorInfo();
for (Interceptor interceptor : module.getEjbJar().getInterceptors()) { Class interceptorClass = null; try {
for (final Interceptor interceptor : module.getEjbJar().getInterceptors()) { final Class interceptorClass; try {
for (final Interceptor interceptor : module.getEjbJar().getInterceptors()) { Class interceptorClass = null; try {
for (Interceptor interceptor : ejbModule.getEjbJar().getInterceptors()) { check_hasInterceptorClass(interceptor);
for (final Interceptor interceptor : ejbModule.getEjbJar().getInterceptors()) { check_hasInterceptorClass(interceptor);
for (final Interceptor interceptor : ejbModule.getEjbJar().getInterceptors()) { check_hasInterceptorClass(loader, interceptor);