org.ow2.jonas.naming
Interface JNamingManager

All Known Implementing Classes:
SingletonNamingManager

public interface JNamingManager

Provide naming services for JOnAS containers. Containers use this interface for binding the environment entries, remote object references, resource factories and for managing the naming context of the current thread.


Method Summary
 Context getComponentContext()
          Return the Context associated with the current thread.
 Context getComponentContext(ClassLoader cl)
          Return the ComponentContext associated with the given classloader.
 Hashtable getEnv()
           
 InitialContext getInitialContext()
          Gets the initial context.
 void resetComponentContext(Context ctx)
          Set back the context with the given value.
 void setClientContainerComponentContext(Context ctx)
          Set the context used by client container (per JVM instead of per thread).
 Context setComponentContext(Context ctx)
          Associate this Context with the current thread.
 void setComponentContext(Context ctx, ClassLoader cl)
          Associate the specified ComponentContext with the given classloader.
 void setJComponentContextFactory(JComponentContextFactory factory)
          Set the unique instance of the JComponentContextFactory.
 void unSetComponentContext(ClassLoader cl)
          Remove the ComponentContext associated with the given classloader.
 

Method Detail

getComponentContext

Context getComponentContext()
                            throws NamingException
Return the Context associated with the current thread.

Returns:
Context for current thread.
Throws:
NamingException - If context namespace does not exist.

setComponentContext

Context setComponentContext(Context ctx)
Associate this Context with the current thread. This method should be called in preinvoke/postinvoke and when we build the bean environment.

Parameters:
ctx - Context to associate with the current thread.
Returns:
Previous context setting for current thread.

resetComponentContext

void resetComponentContext(Context ctx)
Set back the context with the given value. Don't return the previous context, use setComponentContext() method for this.

Parameters:
ctx - the context to associate to the current thread.

setComponentContext

void setComponentContext(Context ctx,
                         ClassLoader cl)
Associate the specified ComponentContext with the given classloader.

Parameters:
ctx - the context to associate to the classloader.
cl - the classloader which is bind to the context.

setClientContainerComponentContext

void setClientContainerComponentContext(Context ctx)
Set the context used by client container (per JVM instead of per thread).

Parameters:
ctx - the context to set

getComponentContext

Context getComponentContext(ClassLoader cl)
Return the ComponentContext associated with the given classloader.

Parameters:
cl - the classloader which is bind to the context.
Returns:
the ComponentContext associated with the given classloader.

unSetComponentContext

void unSetComponentContext(ClassLoader cl)
Remove the ComponentContext associated with the given classloader.

Parameters:
cl - the classloader which is bind to the context.

getInitialContext

InitialContext getInitialContext()
Gets the initial context.

Returns:
the initial context

getEnv

Hashtable getEnv()
Returns:
the environment associated to this initial context

setJComponentContextFactory

void setJComponentContextFactory(JComponentContextFactory factory)
Set the unique instance of the JComponentContextFactory.

Parameters:
factory - the component context factory


Copyright © 2010 OW2 Consortium. All Rights Reserved.