Class ThreadInitialContextFactory

java.lang.Object
cloud.piranha.naming.thread.ThreadInitialContextFactory
All Implemented Interfaces:
javax.naming.spi.InitialContextFactory

public class ThreadInitialContextFactory
extends java.lang.Object
implements javax.naming.spi.InitialContextFactory
The Thread InitialContextFactory.
Author:
Manfred Riem ([email protected])
  • Constructor Summary

    Constructors
    Constructor Description
    ThreadInitialContextFactory()  
  • Method Summary

    Modifier and Type Method Description
    javax.naming.Context getInitialContext​(java.util.Hashtable<?,​?> environment)
    Get the initial context.
    static void removeInitialContext()
    Remove the initial context.
    static void setInitialContext​(javax.naming.Context initialContext)
    Set the initial context.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ThreadInitialContextFactory

      public ThreadInitialContextFactory()
  • Method Details

    • getInitialContext

      public javax.naming.Context getInitialContext​(java.util.Hashtable<?,​?> environment) throws javax.naming.NamingException
      Get the initial context.
      Specified by:
      getInitialContext in interface javax.naming.spi.InitialContextFactory
      Parameters:
      environment - the environment.
      Returns:
      the initial context.
      Throws:
      javax.naming.NamingException - when a naming error occurs.
    • removeInitialContext

      public static void removeInitialContext()
      Remove the initial context.
    • setInitialContext

      public static void setInitialContext​(javax.naming.Context initialContext)
      Set the initial context.
      Parameters:
      initialContext - the initial context.