void releaseFactories() { InjectionProvider provider = getInjectionProvider(); if (provider != null) { lock.writeLock().lock(); try { for (Entry<String, Object> entry : factories.entrySet()) { Object curFactory = entry.getValue(); // If the current entry is not the injectionProvider itself // and the current entry has a non-null value // and the value is not a string... if (!INJECTION_PROVIDER_KEY.equals(entry.getKey()) && curFactory != null && !(curFactory instanceof String)) { try { provider.invokePreDestroy(curFactory); } catch (Exception ex) { logPreDestroyFail(entry.getValue(), ex); } } } } finally { factories.clear(); lock.writeLock().unlock(); } } else { LOGGER.log(SEVERE, "Unable to call @PreDestroy annotated methods because no InjectionProvider can be found. Does this container implement the Mojarra Injection SPI?"); } }
void releaseFactories() { InjectionProvider provider = getInjectionProvider(); if (provider != null) { lock.writeLock().lock(); try { for (Entry<String, Object> entry : factories.entrySet()) { Object curFactory = entry.getValue(); // If the current entry is not the injectionProvider itself // and the current entry has a non-null value // and the value is not a string... if (!INJECTION_PROVIDER_KEY.equals(entry.getKey()) && curFactory != null && !(curFactory instanceof String)) { try { provider.invokePreDestroy(curFactory); } catch (Exception ex) { logPreDestroyFail(entry.getValue(), ex); } } } } finally { factories.clear(); lock.writeLock().unlock(); } } else { LOGGER.log(SEVERE, "Unable to call @PreDestroy annotated methods because no InjectionProvider can be found. Does this container implement the Mojarra Injection SPI?"); } }
void releaseFactories() { InjectionProvider provider = getInjectionProvider(); if (provider != null) { lock.writeLock().lock(); try { for (Entry<String, Object> entry : factories.entrySet()) { Object curFactory = entry.getValue(); // If the current entry is not the injectionProvider itself // and the current entry has a non-null value // and the value is not a string... if (!INJECTION_PROVIDER_KEY.equals(entry.getKey()) && curFactory != null && !(curFactory instanceof String)) { try { provider.invokePreDestroy(curFactory); } catch (Exception ex) { logPreDestroyFail(entry.getValue(), ex); } } } } finally { factories.clear(); lock.writeLock().unlock(); } } else { LOGGER.log(SEVERE, "Unable to call @PreDestroy annotated methods because no InjectionProvider can be found. Does this container implement the Mojarra Injection SPI?"); } }
void releaseFactories() { InjectionProvider provider = getInjectionProvider(); if (provider != null) { lock.writeLock().lock(); try { for (Entry<String, Object> entry : factories.entrySet()) { Object curFactory = entry.getValue(); // If the current entry is not the injectionProvider itself // and the current entry has a non-null value // and the value is not a string... if (!INJECTION_PROVIDER_KEY.equals(entry.getKey()) && curFactory != null && !(curFactory instanceof String)) { try { provider.invokePreDestroy(curFactory); } catch (Exception ex) { logPreDestroyFail(entry.getValue(), ex); } } } } finally { factories.clear(); lock.writeLock().unlock(); } } else { LOGGER.log(SEVERE, "Unable to call @PreDestroy annotated methods because no InjectionProvider can be found. Does this container implement the Mojarra Injection SPI?"); } }