org.apache.geronimo.naming.java
Class RootContext

java.lang.Object
  extended byorg.apache.geronimo.naming.java.ReadOnlyContext
      extended byorg.apache.geronimo.naming.java.RootContext
All Implemented Interfaces:
Context, Serializable

public class RootContext
extends ReadOnlyContext

The root context for the java: namespace. Automatically handles switching the "java:comp" sub-context to the appropriate one for the current thread.

Version:
$Revision: 1.4 $ $Date: 2004/04/19 21:58:31 $
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.apache.geronimo.naming.java.ReadOnlyContext
bindings, env, treeBindings
 
Fields inherited from interface javax.naming.Context
APPLET, AUTHORITATIVE, BATCHSIZE, DNS_URL, INITIAL_CONTEXT_FACTORY, LANGUAGE, OBJECT_FACTORIES, PROVIDER_URL, REFERRAL, SECURITY_AUTHENTICATION, SECURITY_CREDENTIALS, SECURITY_PRINCIPAL, SECURITY_PROTOCOL, STATE_FACTORIES, URL_PKG_PREFIXES
 
Method Summary
static ReadOnlyContext getComponentContext()
          Get the component context for the current thread.
 Object lookup(String name)
           
static void setComponentContext(ReadOnlyContext ctx)
          Set the component context for the current thread.
 
Methods inherited from class org.apache.geronimo.naming.java.ReadOnlyContext
addToEnvironment, bind, bind, close, composeName, composeName, createSubcontext, createSubcontext, destroySubcontext, destroySubcontext, freeze, getEnvironment, getNameInNamespace, getNameParser, getNameParser, internalBind, list, list, listBindings, listBindings, lookup, lookupLink, lookupLink, newContext, rebind, rebind, removeFromEnvironment, rename, rename, unbind, unbind
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

lookup

public Object lookup(String name)
              throws NamingException
Specified by:
lookup in interface Context
Overrides:
lookup in class ReadOnlyContext
Throws:
NamingException

setComponentContext

public static void setComponentContext(ReadOnlyContext ctx)
Set the component context for the current thread. This will be returned for all lookups of "java:comp"

Parameters:
ctx - the current components context

getComponentContext

public static ReadOnlyContext getComponentContext()
Get the component context for the current thread.

Returns:
the current components context


Copyright © 2003-2005 Apache Software Foundation. All Rights Reserved.