Class JndiCloser

java.lang.Object
org.apache.logging.log4j.core.util.JndiCloser

public final class JndiCloser extends Object
Helper class for closing JNDI resources. This class is separate from Closer because JNDI is not in Android.
  • Method Details

    • close

      public static void close(Context context) throws NamingException
      Closes the specified Context.
      Parameters:
      context - the JNDI Context to close, may be null
      Throws:
      NamingException - if a problem occurred closing the specified JNDI Context
      See Also:
    • closeSilently

      public static boolean closeSilently(Context context)
      Closes the specified Context, ignoring any exceptions thrown by the close operation.
      Parameters:
      context - the JNDI Context to close, may be null
      Returns:
      Whether closing succeeded
      See Also: