Methods Summary |
---|
private javax.naming.Context | createMultiplexer(javax.naming.Context ctx)
Context ctxTwo = (Context) ctx.lookup("comp.ejb3");
Context ctxOne = (Context) ctx.lookup("comp.original");
if(log.isTraceEnabled())
{
log.trace("contextClassLoader = " + getContextClassLoader() + " ctxOne = " + ctxOne);
}
if(ctxTwo == null)
return ctxOne;
return new MultiplexerContext(ctxOne, ctxTwo);
|
private static java.lang.ClassLoader | getContextClassLoader()
if(System.getSecurityManager() == null)
return Thread.currentThread().getContextClassLoader();
else
{
PrivilegedAction<ClassLoader> action = new PrivilegedAction<ClassLoader>()
{
public ClassLoader run()
{
return Thread.currentThread().getContextClassLoader();
}
};
return AccessController.doPrivileged(action);
}
|
public java.lang.Object | getObjectInstance(java.lang.Object obj, javax.naming.Name name, javax.naming.Context nameCtx, java.util.Hashtable environment)
if(nameCtx == null)
{
nameCtx = (Context) new InitialContext().lookup("java:");
try
{
return createMultiplexer(nameCtx);
}
finally
{
nameCtx.close();
}
}
else
{
return createMultiplexer(nameCtx);
}
|