// If the thread is not bound, return a shared writable context
if (initialContext == null) {
synchronized(javaURLContextFactory.class) {
if (initialContext == null) {
initialContext = new NamingContext(
(Hashtable<String,Object>)environment, MAIN);
}
}
}
return initialContext;