本文整理了Java中javax.naming.Context.getEnvironment()
方法的一些代码示例,展示了Context.getEnvironment()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Context.getEnvironment()
方法的具体详情如下:
包路径:javax.naming.Context
类名称:Context
方法名:getEnvironment
暂无
代码示例来源:origin: wildfly/wildfly
@Override
public Hashtable<?, ?> getEnvironment() throws NamingException {
return context.getEnvironment();
}
代码示例来源:origin: spring-projects/spring-framework
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);
代码示例来源:origin: org.jboss/jboss-common-core
public Hashtable getEnvironment()
throws NamingException
{
return delegate.getEnvironment();
}
代码示例来源:origin: org.sapia/sapia_archie
/**
* @see javax.naming.Context#getEnvironment()
*/
public Hashtable getEnvironment() throws NamingException {
return _ctx.getEnvironment();
}
代码示例来源:origin: org.ow2.carol/carol
/**
* 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())));
}
代码示例来源:origin: org.apache.james/james-server-util
@Override
public Object operation() throws NamingException {
return getDelegate().getEnvironment();
}
}.perform();
代码示例来源:origin: org.ow2.petals/petals-kernel
@Override
public Hashtable<?, ?> getEnvironment() throws NamingException {
Hashtable<?, ?> out;
if (this.initialContext == null) {
out = this.defaultInitCtx.getEnvironment();
} else {
out = this.initialContext.getEnvironment();
}
return out;
}
代码示例来源:origin: apache/james-project
@Override
public Object operation() throws NamingException {
return getDelegate().getEnvironment();
}
}.perform();
代码示例来源:origin: org.apache.openejb/tomee-catalina
/**
* {@inheritDoc}
*/
public Hashtable<?, ?> getEnvironment() throws NamingException {
return getThreadContext().getEnvironment();
}
代码示例来源:origin: org.objectweb.petals/petals-kernel
@Override
public Hashtable<?, ?> getEnvironment() throws NamingException {
Hashtable<?, ?> out;
if (this.initialContext == null) {
out = this.defaultInitCtx.getEnvironment();
} else {
out = this.initialContext.getEnvironment();
}
return out;
}
代码示例来源:origin: org.ow2.carol/carol
/**
* 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())));
}
}
代码示例来源:origin: org.ow2.carol/carol
/**
* 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();
}
代码示例来源:origin: org.ow2.cmi/cmi-jndi
public Hashtable<?, ?> getEnvironment() throws NamingException {
if(localContext != null) {
return localContext.getEnvironment();
} else {
LOGGER.warn("Cannot getEnvironement because server mode is not activated.");
return null;
}
}
代码示例来源:origin: espertechinc/esper
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);
}
}
}
代码示例来源:origin: org.springframework.ldap/spring-ldap-core
/**
* @see javax.naming.Context#getEnvironment()
*/
public Hashtable<?, ?> getEnvironment() throws NamingException {
this.assertOpen();
return this.getDelegateContext().getEnvironment();
}
代码示例来源:origin: org.springframework.ldap/spring-ldap-core
/**
* @see Context#getEnvironment()
*/
public Hashtable<?, ?> getEnvironment() throws NamingException {
this.assertOpen();
return this.getDelegateContext().getEnvironment();
}
代码示例来源:origin: spring-projects/spring-ldap
/**
* @see javax.naming.Context#getEnvironment()
*/
public Hashtable<?, ?> getEnvironment() throws NamingException {
this.assertOpen();
return this.getDelegateContext().getEnvironment();
}
代码示例来源:origin: apache/servicemix-bundles
/**
* @see Context#getEnvironment()
*/
public Hashtable<?, ?> getEnvironment() throws NamingException {
this.assertOpen();
return this.getDelegateContext().getEnvironment();
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-ldap
/**
* @see javax.naming.Context#getEnvironment()
*/
public Hashtable<?, ?> getEnvironment() throws NamingException {
this.assertOpen();
return this.getDelegateContext().getEnvironment();
}
代码示例来源:origin: com.googlecode.mycontainer/mycontainer-jta
private TransactionManager getTransactionManager() {
try {
Context ctx = getContext();
MyTransactionManager ret = new MyTransactionManager(ctx.getEnvironment());
return ret;
} catch (NamingException e) {
throw new KernelRuntimeException(e);
}
}
内容来源于网络,如有侵权,请联系作者删除!