|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.easybeans.naming.NamingManager
public final class NamingManager
Manages the java: context used by components.
Field Summary | |
---|---|
private static javax.naming.Context |
clientCtx
Static context used by client container. |
private javax.naming.InitialContext |
ictx
Initial Context. |
private static JLog |
logger
Logger. |
private static java.lang.ThreadLocal<javax.naming.Context> |
threadContext
Associate a context to a thread. |
private static NamingManager |
unique
Singleton management: - the constructor is private. |
private javax.transaction.UserTransaction |
userTransaction
UserTransaction object, to be shared by all components. |
Constructor Summary | |
---|---|
private |
NamingManager()
Create the naming manager. |
Method Summary | |
---|---|
javax.naming.Context |
createEnvironmentContext(java.lang.String namespace)
Create Context for application and component environments. |
javax.naming.Context |
getComponentContext()
Get the Context associated with the current thread or to a class loader. |
javax.naming.InitialContext |
getInitialContext()
Get the initialContext used in this jonas server. |
static NamingManager |
getInstance()
Return the unique instance of a NamingManager. |
void |
resetComponentContext(javax.naming.Context ctx)
Set back the context with the given value. |
void |
setClientContainerComponentContext(javax.naming.Context ctx)
Set the context used by client container (per JVM instead of per thread). |
javax.naming.Context |
setComponentContext(javax.naming.Context ctx)
Associate this CompNamingContext with the current thread. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static JLog logger
private static java.lang.ThreadLocal<javax.naming.Context> threadContext
private javax.naming.InitialContext ictx
private static javax.naming.Context clientCtx
private static NamingManager unique
private javax.transaction.UserTransaction userTransaction
Constructor Detail |
---|
private NamingManager() throws javax.naming.NamingException
javax.naming.NamingException
- if no initial context is builtMethod Detail |
---|
public static NamingManager getInstance() throws javax.naming.NamingException
javax.naming.NamingException
- if it failed.public javax.naming.InitialContext getInitialContext()
public javax.naming.Context createEnvironmentContext(java.lang.String namespace) throws javax.naming.NamingException
namespace
- namespace to used for the Context
javax.naming.NamingException
- if the creation of the java: context failed.public javax.naming.Context getComponentContext() throws javax.naming.NamingException
javax.naming.NamingException
- When operation is not allowedpublic javax.naming.Context setComponentContext(javax.naming.Context ctx)
ctx
- the context to associate to the current thread.
public void resetComponentContext(javax.naming.Context ctx)
ctx
- the context to associate to the current thread.public void setClientContainerComponentContext(javax.naming.Context ctx)
ctx
- the context to set
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |