org.apache.geronimo.naming.java
Class RootContext

java.lang.Object
  extended by org.apache.xbean.naming.context.AbstractContext
      extended by org.apache.xbean.naming.context.ImmutableContext
          extended by org.apache.geronimo.naming.java.RootContext
All Implemented Interfaces:
Serializable, Context, org.apache.xbean.naming.context.NestedContextFactory

public class RootContext
extends org.apache.xbean.naming.context.ImmutableContext

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

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.xbean.naming.context.ImmutableContext
org.apache.xbean.naming.context.ImmutableContext.NestedImmutableContext
 
Field Summary
 
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.xbean.naming.context.ImmutableContext
addBinding, addDeepBinding, createNestedSubcontext, getBindings, getDeepBinding, isNestedSubcontext, removeBinding, removeDeepBinding
 
Methods inherited from class org.apache.xbean.naming.context.AbstractContext
addBinding, addDeepBinding, addToEnvironment, bind, bind, close, composeName, composeName, createSubcontext, createSubcontext, createSubcontextTree, destroySubcontext, destroySubcontext, faultLookup, getBinding, getContextAccess, getEnvironment, getNameInNamespace, getNameInNamespace, getNameInNamespace, getNameParser, getNameParser, getNameParser, getParsedNameInNamespace, getSize, isEmpty, list, list, list, listBindings, listBindings, listBindings, lookup, lookup, lookupFinalContext, lookupLink, lookupLink, rebind, rebind, removeDeepBinding, removeFromEnvironment, rename, rename, 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()
            throws NamingException
Throws:
NamingException
Method Detail

lookup

public Object lookup(String name)
              throws NamingException
Specified by:
lookup in interface Context
Overrides:
lookup in class org.apache.xbean.naming.context.AbstractContext
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.