public interface InitialContextFactory
JNDI框架允许不同的初始上下文的实现是在运行时指定。初始上下文是使用初始上下文工厂创建的。初始上下文工厂必须实现initialcontextfactory接口,它提供了一个用于创建实例的初始上下文,执行上下文的接口方法。此外,工厂类必须是公共的,必须有一个不接受参数的公共构造函数。
Modifier and Type | Method and Description |
---|---|
Context |
getInitialContext(Hashtable<?,?> environment)
创建开始名称解析的初始上下文。
|
Context getInitialContext(Hashtable<?,?> environment) throws NamingException
environment
。
环境参数是由调用方拥有的。该实现将不会修改对象或保持引用它,虽然它可能会保留一个复制或复制的参考。
environment
-指定将用于创建初始上下文信息可能的空环境。
NamingException
如果无法创建一个初始上下文。
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.