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:
$Rev: 355877 $ $Date: 2005-12-11 03:48:27 +0100 (Sun, 11 Dec 2005) $
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
 
Constructor Summary
RootContext()
           
 
Method Summary
static Context getComponentContext()
          Get the component context for the current thread.
 Object lookup(String name)
           
static void setComponentContext(Context 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, setClassLoader, setKernel, unbind, unbind
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RootContext

public RootContext()
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(Context 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 Context getComponentContext()
Get the component context for the current thread.

Returns:
the current components context


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