org.objectweb.jonas.naming
Class NamingManager

java.lang.Object
  |
  +--org.objectweb.jonas.naming.NamingManager
All Implemented Interfaces:
org.enhydra.naming.ContainerNaming

public class NamingManager
extends java.lang.Object
implements org.enhydra.naming.ContainerNaming

Naming Manager for an EJB Server. this singleton class must exist in each jonas server.

Author:
Philippe Durieux Contributor(s): Philippe Coq Monolog

Method Summary
 javax.naming.Context createEnvironmentContext(java.lang.String namespace)
          Create Context for application and component environments.
 javax.naming.Context createImmutableEnvironmentContext(java.lang.String namespace)
           
 javax.naming.Context getComponentContext()
          return the Context associated with the current thread.
 javax.naming.InitialContext getCorbaInitialContext()
          return the initialContext used to bind CORBA objects
 java.util.Hashtable getEnv()
          Return the environment for JNDI This is used only for handles today.
 javax.naming.InitialContext getInitialContext()
          return the initialContext used in this jonas server
static NamingManager getInstance()
           
 javax.naming.Context getServerContext()
          gets the server component context This is used only internally in the jonas NamingManager.
 javax.naming.Context setComponentContext(javax.naming.Context ctx)
          associate this CompNamingContext with the current thread.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static NamingManager getInstance()
                                 throws javax.naming.NamingException

getInitialContext

public javax.naming.InitialContext getInitialContext()
return the initialContext used in this jonas server
Specified by:
getInitialContext in interface org.enhydra.naming.ContainerNaming

getCorbaInitialContext

public javax.naming.InitialContext getCorbaInitialContext()
return the initialContext used to bind CORBA objects

createEnvironmentContext

public javax.naming.Context createEnvironmentContext(java.lang.String namespace)
                                              throws javax.naming.NamingException
Create Context for application and component environments. (formally known as createComponentContext)
Specified by:
createEnvironmentContext in interface org.enhydra.naming.ContainerNaming

getComponentContext

public javax.naming.Context getComponentContext()
return the Context associated with the current thread.
Specified by:
getComponentContext in interface org.enhydra.naming.ContainerNaming

setComponentContext

public javax.naming.Context setComponentContext(javax.naming.Context ctx)
associate this CompNamingContext with the current thread. this method should be called in preinvoke/postinvoke and when we build the bean environment.
Specified by:
setComponentContext in interface org.enhydra.naming.ContainerNaming

getEnv

public java.util.Hashtable getEnv()
Return the environment for JNDI This is used only for handles today.
Specified by:
getEnv in interface org.enhydra.naming.ContainerNaming

createImmutableEnvironmentContext

public javax.naming.Context createImmutableEnvironmentContext(java.lang.String namespace)
                                                       throws javax.naming.NamingException
Specified by:
createImmutableEnvironmentContext in interface org.enhydra.naming.ContainerNaming

getServerContext

public javax.naming.Context getServerContext()
gets the server component context This is used only internally in the jonas NamingManager.