Tabnine Logo
WebAppLoaderFix
Code IndexAdd Tabnine to your IDE (free)

How to use
WebAppLoaderFix
in
org.eclipse.jetty.util

Best Java code snippets using org.eclipse.jetty.util.WebAppLoaderFix (Showing top 4 results out of 315)

origin: igniterealtime/Openfire

public static void checkAndClose(ClassLoader classLoader)
{
  if (!isWindows() || !(classLoader instanceof URLClassLoader))
  {
    return;
  }
  HashSet<String> leakedJarNames = preClose((URLClassLoader)classLoader);
  cleanupJarFileFactory(leakedJarNames);
}
origin: igniterealtime/Openfire

private static HashSet<String> preClose(URLClassLoader loader)
  Field f = getClassField(URLClassLoader.class, "ucp");
  if (f != null)
      f = getClassField(ucp.getClass(), "loaders");
      if (f != null)
          f = getClassField(obj.getClass(), "jar");
          if (f != null)
origin: igniterealtime/Openfire

/**
 * Removes a Jetty handler to be added to the embedded web server that is used to expose BOSH (HTTP-bind)
 * functionality.
 *
 * Removing a handler, even when null, or non-existing, might have side-effects as introduced by the Jetty
 * implementation. At the time of writing, Jetty will re
 *
 * @param handler The handler (should not be null).
 */
public void removeJettyHandler( Handler handler )
{
  if (handler instanceof WebAppContext) {
    // A work-around of the Jetty bug described at https://github.com/eclipse/jetty.project/issues/1425
    // NOTE: According to some comments on WebAppLoaderFix, this may stop working on Java 9.
    // Hopefully the Jetty team will have fixed the underlying bug by then
    WebAppLoaderFix.checkAndClose(((WebAppContext) handler).getClassLoader());
  }
  extensionHandlers.removeHandler( handler );
  if ( handler.isStarted() )
  {
    try
    {
      handler.stop();
    }
    catch ( Exception e )
    {
      Log.warn( "Unable to stop the handler that was removed: {}", handler, e );
    }
  }
}
origin: igniterealtime/Openfire

Field f = getClassField(classJarURLConnection, "factory");
f = getClassField(classJarFileFactory, "fileCache");
if (f == null)
f = getClassField(classJarFileFactory, "urlCache");
if (f == null)
org.eclipse.jetty.utilWebAppLoaderFix

Most used methods

  • checkAndClose
  • cleanupJarFileFactory
  • getClassField
  • isWindows
  • preClose

Popular in Java

  • Running tasks concurrently on multiple threads
  • requestLocationUpdates (LocationManager)
  • getExternalFilesDir (Context)
  • startActivity (Activity)
  • Table (com.google.common.collect)
    A collection that associates an ordered pair of keys, called a row key and a column key, with a sing
  • EOFException (java.io)
    Thrown when a program encounters the end of a file or stream during an input operation.
  • IOException (java.io)
    Signals a general, I/O-related error. Error details may be specified when calling the constructor, a
  • ZipFile (java.util.zip)
    This class provides random read access to a zip file. You pay more to read the zip file's central di
  • JLabel (javax.swing)
  • Table (org.hibernate.mapping)
    A relational table
  • Top plugins for WebStorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now