@Override public Hashtable<?, ?> getEnvironment() throws NamingException { return context.getEnvironment(); }
assertTrue("Correct DataSource registered", context2.lookup("java:comp/env/jdbc/myds") == ds); assertTrue("Correct Object registered", context2.lookup("myobject") == obj); assertTrue("Correct environment", context2.getEnvironment() != env2); assertTrue("Correct key1", "value1".equals(context2.getEnvironment().get("key1"))); context3.unbind("myobject"); assertTrue("Correct environment", context3.getEnvironment() != context2.getEnvironment()); context3.addToEnvironment("key2", "value2"); assertTrue("key2 added", "value2".equals(context3.getEnvironment().get("key2"))); context3.removeFromEnvironment("key1"); assertTrue("key1 removed", context3.getEnvironment().get("key1") == null);
public Hashtable getEnvironment() throws NamingException { return delegate.getEnvironment(); }
/** * @see javax.naming.Context#getEnvironment() */ public Hashtable getEnvironment() throws NamingException { return _ctx.getEnvironment(); }
/** * Constructs an JRMP local Wrapper context * @param jrmpLocalContext the inital Local JRMP context * @throws NamingException if the registry wrapper cannot be build */ public JRMPLocalContext(final Context jrmpLocalContext) throws NamingException { super(new JRMPRegistryWrapperContext(new Hashtable<Object, Object>(jrmpLocalContext.getEnvironment()))); }
@Override public Object operation() throws NamingException { return getDelegate().getEnvironment(); } }.perform();
@Override public Hashtable<?, ?> getEnvironment() throws NamingException { Hashtable<?, ?> out; if (this.initialContext == null) { out = this.defaultInitCtx.getEnvironment(); } else { out = this.initialContext.getEnvironment(); } return out; }
@Override public Object operation() throws NamingException { return getDelegate().getEnvironment(); } }.perform();
/** * {@inheritDoc} */ public Hashtable<?, ?> getEnvironment() throws NamingException { return getThreadContext().getEnvironment(); }
@Override public Hashtable<?, ?> getEnvironment() throws NamingException { Hashtable<?, ?> out; if (this.initialContext == null) { out = this.defaultInitCtx.getEnvironment(); } else { out = this.initialContext.getEnvironment(); } return out; }
/** * Constructs an IRMI local Wrapper context * @param irmiLocalContext the inital Local IRMI context * @throws NamingException if the registry wrapper cannot be build */ public IRMILocalContext(Context irmiLocalContext) throws NamingException { super(new IRMIRegistryWrapperContext(new Hashtable<Object, Object>(irmiLocalContext.getEnvironment()))); } }
/** * Retrieves the environment in effect for this context. See class * description for more details on environment properties. The caller should * not make any changes to the object returned: their effect on the context * is undefined. The environment of this context may be changed using * addToEnvironment() and removeFromEnvironment(). * @return the environment of this context; never null * @throws NamingException if a naming exception is encountered */ public Hashtable<?, ?> getEnvironment() throws NamingException { return findContext().getEnvironment(); }
public Hashtable<?, ?> getEnvironment() throws NamingException { if(localContext != null) { return localContext.getEnvironment(); } else { LOGGER.warn("Cannot getEnvironement because server mode is not activated."); return null; } }
private Object getFromEnv(RegressionEnvironment env, String name) { try { return env.runtime().getContext().getEnvironment().get(name); } catch (Throwable t) { fail(t.getMessage()); throw new RuntimeException(t); } } }
/** * @see javax.naming.Context#getEnvironment() */ public Hashtable<?, ?> getEnvironment() throws NamingException { this.assertOpen(); return this.getDelegateContext().getEnvironment(); }
/** * @see Context#getEnvironment() */ public Hashtable<?, ?> getEnvironment() throws NamingException { this.assertOpen(); return this.getDelegateContext().getEnvironment(); }
/** * @see javax.naming.Context#getEnvironment() */ public Hashtable<?, ?> getEnvironment() throws NamingException { this.assertOpen(); return this.getDelegateContext().getEnvironment(); }
/** * @see Context#getEnvironment() */ public Hashtable<?, ?> getEnvironment() throws NamingException { this.assertOpen(); return this.getDelegateContext().getEnvironment(); }
/** * @see javax.naming.Context#getEnvironment() */ public Hashtable<?, ?> getEnvironment() throws NamingException { this.assertOpen(); return this.getDelegateContext().getEnvironment(); }
private TransactionManager getTransactionManager() { try { Context ctx = getContext(); MyTransactionManager ret = new MyTransactionManager(ctx.getEnvironment()); return ret; } catch (NamingException e) { throw new KernelRuntimeException(e); } }