|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.xbean.naming.global.GlobalContextManager
public class GlobalContextManager
The GlobalContextManager contains the static global context object. JNDI effectively requires a single global static to resolve the root context, and this class manages that static. This class is also an URLContextFactory and an InitialContextFactory which returns the registered global context. To use this factory simply set the following system property or pass the property in the environment to new InitialContext: java.naming.factory.initial = org.apache.xbean.naming.global.GlobalContextManager
| Constructor Summary | |
|---|---|
GlobalContextManager()
|
|
| Method Summary | |
|---|---|
static Context |
getGlobalContext()
Gets the global context. |
Context |
getInitialContext(Hashtable environment)
Returns the Context registered with the GlobalManager. |
Object |
getObjectInstance(Object obj,
Name name,
Context nameCtx,
Hashtable environment)
Returns the Context registered with the GlobalManager. |
static void |
setGlobalContext(Context globalContext)
Sets the global context. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public GlobalContextManager()
| Method Detail |
|---|
public static Context getGlobalContext()
public static void setGlobalContext(Context globalContext)
globalContext - the new global context
public Object getObjectInstance(Object obj,
Name name,
Context nameCtx,
Hashtable environment)
throws Exception
getObjectInstance in interface ObjectFactoryobj - must be nullname - ignorednameCtx - ignoredenvironment - ignored
OperationNotSupportedException - if obj is not null
Exceptionpublic Context getInitialContext(Hashtable environment)
getInitialContext in interface InitialContextFactoryenvironment - ignored
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||