/** * Crete a new Context's instance. */ public Object getObjectInstance(Object obj, Name name, Context nameCtx, Hashtable environment) throws NamingException { if ((ContextBindings.isThreadBound()) || (ContextBindings.isClassLoaderBound())) { return new SelectorContext(environment); } else { return null; } }
/** * Crete a new Context's instance. */ @SuppressWarnings("unchecked") @Override public Object getObjectInstance(Object obj, Name name, Context nameCtx, Hashtable<?,?> environment) throws NamingException { if ((ContextBindings.isThreadBound()) || (ContextBindings.isClassLoaderBound())) { return new SelectorContext((Hashtable<String,Object>)environment); } return null; }
/** * Crete a new Context's instance. */ @SuppressWarnings("unchecked") @Override public Object getObjectInstance(Object obj, Name name, Context nameCtx, Hashtable<?,?> environment) throws NamingException { if ((ContextBindings.isThreadBound()) || (ContextBindings.isClassLoaderBound())) { return new SelectorContext((Hashtable<String,Object>)environment); } return null; }
/** * Crete a new Context's instance. */ @SuppressWarnings("unchecked") @Override public Object getObjectInstance(Object obj, Name name, Context nameCtx, Hashtable<?,?> environment) throws NamingException { if ((ContextBindings.isThreadBound()) || (ContextBindings.isClassLoaderBound())) { return new SelectorContext((Hashtable<String,Object>)environment); } return null; }
/** * Crete a new Context's instance. */ @SuppressWarnings("unchecked") @Override public Object getObjectInstance(Object obj, Name name, Context nameCtx, Hashtable<?,?> environment) throws NamingException { if ((ContextBindings.isThreadBound()) || (ContextBindings.isClassLoaderBound())) { return new SelectorContext((Hashtable<String,Object>)environment); } return null; }
/** * Crete a new Context's instance. */ @SuppressWarnings("unchecked") @Override public Object getObjectInstance(Object obj, Name name, Context nameCtx, Hashtable<?,?> environment) throws NamingException { if ((ContextBindings.isThreadBound()) || (ContextBindings.isClassLoaderBound())) { return new SelectorContext((Hashtable<String,Object>)environment); } return null; }
/** * Crete a new Context's instance. */ @SuppressWarnings("unchecked") @Override public Object getObjectInstance(Object obj, Name name, Context nameCtx, Hashtable<?,?> environment) throws NamingException { if ((ContextBindings.isThreadBound()) || (ContextBindings.isClassLoaderBound())) { return new SelectorContext((Hashtable<String,Object>)environment); } return null; }
/** * Crete a new Context's instance. */ @SuppressWarnings("unchecked") @Override public Object getObjectInstance(Object obj, Name name, Context nameCtx, Hashtable<?,?> environment) throws NamingException { if ((ContextBindings.isThreadBound()) || (ContextBindings.isClassLoaderBound())) { return new SelectorContext((Hashtable<String,Object>)environment); } return null; }
/** * Crete a new Context's instance. */ @SuppressWarnings("unchecked") @Override public Object getObjectInstance(Object obj, Name name, Context nameCtx, Hashtable<?,?> environment) throws NamingException { if ((ContextBindings.isThreadBound()) || (ContextBindings.isClassLoaderBound())) { return new SelectorContext((Hashtable<String,Object>)environment); } return null; }
/** * Get a new (writable) initial context. */ public Context getInitialContext(Hashtable environment) throws NamingException { if (ContextBindings.isThreadBound() || (ContextBindings.isClassLoaderBound())) { // Redirect the request to the bound initial context return new SelectorContext(environment, true); } else { // If the thread is not bound, return a shared writable context if (initialContext == null) initialContext = new NamingContext(environment, MAIN); return initialContext; } }
/** * Get a new (writable) initial context. */ @SuppressWarnings("unchecked") @Override public Context getInitialContext(Hashtable<?,?> environment) throws NamingException { if (ContextBindings.isThreadBound() || (ContextBindings.isClassLoaderBound())) { // Redirect the request to the bound initial context return new SelectorContext( (Hashtable<String,Object>)environment, true); } // 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; }
/** * Get a new (writable) initial context. */ @SuppressWarnings("unchecked") @Override public Context getInitialContext(Hashtable<?,?> environment) throws NamingException { if (ContextBindings.isThreadBound() || (ContextBindings.isClassLoaderBound())) { // Redirect the request to the bound initial context return new SelectorContext( (Hashtable<String,Object>)environment, true); } // 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; }
/** * Get a new (writable) initial context. */ @SuppressWarnings("unchecked") @Override public Context getInitialContext(Hashtable<?,?> environment) throws NamingException { if (ContextBindings.isThreadBound() || (ContextBindings.isClassLoaderBound())) { // Redirect the request to the bound initial context return new SelectorContext( (Hashtable<String,Object>)environment, true); } // 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; }
/** * Get a new (writable) initial context. */ @SuppressWarnings("unchecked") @Override public Context getInitialContext(Hashtable<?,?> environment) throws NamingException { if (ContextBindings.isThreadBound() || (ContextBindings.isClassLoaderBound())) { // Redirect the request to the bound initial context return new SelectorContext( (Hashtable<String,Object>)environment, true); } // 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; }
/** * Get a new (writable) initial context. */ @SuppressWarnings("unchecked") @Override public Context getInitialContext(Hashtable<?,?> environment) throws NamingException { if (ContextBindings.isThreadBound() || (ContextBindings.isClassLoaderBound())) { // Redirect the request to the bound initial context return new SelectorContext( (Hashtable<String,Object>)environment, true); } // 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; }
/** * Get a new (writable) initial context. */ @SuppressWarnings("unchecked") @Override public Context getInitialContext(Hashtable<?,?> environment) throws NamingException { if (ContextBindings.isThreadBound() || (ContextBindings.isClassLoaderBound())) { // Redirect the request to the bound initial context return new SelectorContext( (Hashtable<String,Object>)environment, true); } // 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; }
/** * Get a new (writable) initial context. */ @SuppressWarnings("unchecked") @Override public Context getInitialContext(Hashtable<?,?> environment) throws NamingException { if (ContextBindings.isThreadBound() || (ContextBindings.isClassLoaderBound())) { // Redirect the request to the bound initial context return new SelectorContext( (Hashtable<String,Object>)environment, true); } // 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; }
/** * Get a new (writable) initial context. */ @SuppressWarnings("unchecked") @Override public Context getInitialContext(Hashtable<?,?> environment) throws NamingException { if (ContextBindings.isThreadBound() || (ContextBindings.isClassLoaderBound())) { // Redirect the request to the bound initial context return new SelectorContext( (Hashtable<String,Object>)environment, true); } // 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; }