private void close() { if (closed.compareAndSet(false, true)) { try { for (final ClientLifecycleListener listener : lifecycleListeners) { try { listener.onClose(); } catch (final Throwable t) { LOG.log(Level.WARNING, LocalizationMessages.ERROR_LISTENER_CLOSE(listener.getClass().getName()), t); } } } finally { try { connector.close(); } finally { Injections.shutdownLocator(locator); } } } }
private void close() { if (closed.compareAndSet(false, true)) { try { for (final ClientLifecycleListener listener : lifecycleListeners) { try { listener.onClose(); } catch (final Throwable t) { LOG.log(Level.WARNING, LocalizationMessages.ERROR_LISTENER_CLOSE(listener.getClass().getName()), t); } } } finally { try { connector.close(); } finally { Injections.shutdownLocator(locator); } } } }
private void close() { if (closed.compareAndSet(false, true)) { try { for (final ClientLifecycleListener listener : lifecycleListeners) { try { listener.onClose(); } catch (final Throwable t) { LOG.log(Level.WARNING, LocalizationMessages.ERROR_LISTENER_CLOSE(listener.getClass().getName()), t); } } } finally { try { connector.close(); } finally { Injections.shutdownLocator(locator); } } } }
@Override public void onShutdown(final Container container) { try { for (final ContainerLifecycleListener listener : containerLifecycleListeners) { listener.onShutdown(container); } } finally { try { // Call @PreDestroy method on Application. locator.preDestroy(ResourceConfig.unwrapApplication(application)); } finally { // Shutdown ServiceLocator. // Takes care of the injected executors & schedulers shut-down too. Injections.shutdownLocator(locator); } } } }
@Override public void onShutdown(final Container container) { try { for (final ContainerLifecycleListener listener : containerLifecycleListeners) { listener.onShutdown(container); } } finally { try { // Call @PreDestroy method on Application. locator.preDestroy(ResourceConfig.unwrapApplication(application)); } finally { // Shutdown ServiceLocator. // Takes care of the injected executors & schedulers shut-down too. Injections.shutdownLocator(locator); } } } }
@Override public void onShutdown(final Container container) { try { for (final ContainerLifecycleListener listener : containerLifecycleListeners) { listener.onShutdown(container); } } finally { try { // Call @PreDestroy method on Application. locator.preDestroy(ResourceConfig.unwrapApplication(application)); } finally { // Shutdown ServiceLocator. // Takes care of the injected executors & schedulers shut-down too. Injections.shutdownLocator(locator); } } } }