Class 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 Detail

      • 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
      • 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