Class ContextBindings


  • public class ContextBindings
    extends Object
    Handles the associations :
    • Catalina context name with the NamingContext
    • Calling thread with the NamingContext
    Version:
    $Revision: 1.3 $ $Date: 2007/05/05 05:32:59 $
    Author:
    Remy Maucherat
    • Constructor Detail

      • ContextBindings

        public ContextBindings()
    • Method Detail

      • bindContext

        public static void bindContext​(Object name,
                                       Context context)
        Binds a context name.
        Parameters:
        name - Name of the context
        context - Associated naming context instance
      • bindContext

        public static void bindContext​(Object name,
                                       Context context,
                                       Object token)
        Binds a context name.
        Parameters:
        name - Name of the context
        context - Associated naming context instance
        token - Security token
      • unbindContext

        public static void unbindContext​(Object name)
        Unbind context name.
        Parameters:
        name - Name of the context
      • unbindContext

        public static void unbindContext​(Object name,
                                         Object token)
        Unbind context name.
        Parameters:
        name - Name of the context
        token - Security token
      • bindThread

        public static void bindThread​(Object name)
                               throws NamingException
        Binds a naming context to a thread.
        Parameters:
        name - Name of the context
        Throws:
        NamingException
      • bindThread

        public static void bindThread​(Object name,
                                      Object token)
                               throws NamingException
        Binds a naming context to a thread.
        Parameters:
        name - Name of the context
        token - Security token
        Throws:
        NamingException
      • unbindThread

        public static void unbindThread​(Object name)
        Unbinds a naming context to a thread.
        Parameters:
        name - Name of the context
      • unbindThread

        public static void unbindThread​(Object name,
                                        Object token)
        Unbinds a naming context to a thread.
        Parameters:
        name - Name of the context
        token - Security token
      • isThreadBound

        public static boolean isThreadBound()
        Tests if current thread is bound to a context.
      • bindClassLoader

        public static void bindClassLoader​(Object name)
                                    throws NamingException
        Binds a naming context to a class loader.
        Parameters:
        name - Name of the context
        Throws:
        NamingException
      • bindClassLoader

        public static void bindClassLoader​(Object name,
                                           Object token)
                                    throws NamingException
        Binds a naming context to a thread.
        Parameters:
        name - Name of the context
        token - Security token
        Throws:
        NamingException
      • unbindClassLoader

        public static void unbindClassLoader​(Object name)
        Unbinds a naming context to a class loader.
        Parameters:
        name - Name of the context
      • unbindClassLoader

        public static void unbindClassLoader​(Object name,
                                             Object token)
        Unbinds a naming context to a class loader.
        Parameters:
        name - Name of the context
        token - Security token
      • unbindClassLoader

        public static void unbindClassLoader​(Object name,
                                             Object token,
                                             ClassLoader classLoader)
        Unbinds a naming context to a class loader.
        Parameters:
        name - Name of the context
        token - Security token
      • isClassLoaderBound

        public static boolean isClassLoaderBound()
        Tests if current class loader is bound to a context.