
org.jboss.naming.remote.client.CacheShutdown Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jboss-remote-naming Show documentation
Show all versions of jboss-remote-naming Show documentation
Library for remote naming (JNDI) with JBoss AS
The newest version!
package org.jboss.naming.remote.client;
import java.security.AccessController;
import java.security.PrivilegedAction;
/**
* Class which registers a shutdown hook to close any outstanding endpoints and connections.
*
* @author Stuart Douglas
*/
public class CacheShutdown implements Runnable {
private final EndpointCache endpointCache;
private final NamingStoreCache contextCache;
public CacheShutdown(final NamingStoreCache contextCache, final EndpointCache endpointCache) {
this.contextCache = contextCache;
this.endpointCache = endpointCache;
}
public void registerShutdownHandler() {
AccessController.doPrivileged(new PrivilegedAction
© 2015 - 2025 Weber Informatics LLC | Privacy Policy