类 JndiLocatorDelegate
JndiLocatorSupport subclass with public lookup methods,
for convenient use as a delegate.- 从以下版本开始:
- 4.0
- 作者:
- Juergen Hoeller
-
字段概要
字段修饰符和类型字段说明static final StringSystem property that instructs to ignore a default JNDI environment, i.e.从类继承的字段 cn.taketoday.jndi.JndiLocatorSupport
CONTAINER_PREFIX从类继承的字段 cn.taketoday.jndi.JndiAccessor
logger -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明static JndiLocatorDelegateConfigure aJndiLocatorDelegatewith its "resourceRef" property set totrue, meaning that all names will be prefixed with "java:comp/env/".static booleanCheck whether a default JNDI environment, as in a Jakarta EE environment, is available on this JVM.Perform an actual JNDI lookup for the given name via the JndiTemplate.<T> TPerform an actual JNDI lookup for the given name via the JndiTemplate.从类继承的方法 cn.taketoday.jndi.JndiLocatorSupport
convertJndiName, isResourceRef, setResourceRef从类继承的方法 cn.taketoday.jndi.JndiAccessor
getJndiEnvironment, getJndiTemplate, setJndiEnvironment, setJndiTemplate
-
字段详细资料
-
IGNORE_JNDI_PROPERTY_NAME
System property that instructs to ignore a default JNDI environment, i.e. to always returnfalsefromisDefaultJndiEnvironmentAvailable().The default is "false", allowing for regular default JNDI access e.g. in
JndiPropertySource. Switching this flag totrueis an optimization for scenarios where nothing is ever to be found for such JNDI fallback searches to begin with, avoiding the repeated JNDI lookup overhead.Note that this flag just affects JNDI fallback searches, not explicitly configured JNDI lookups such as for a
DataSourceor some other environment resource. The flag literally just affects code which attempts JNDI searches based on theJndiLocatorDelegate.isDefaultJndiEnvironmentAvailable()check: in particular,StandardServletEnvironmentandStandardPortletEnvironment.- 从以下版本开始:
- 4.0
- 另请参阅:
-
-
构造器详细资料
-
JndiLocatorDelegate
public JndiLocatorDelegate()
-
-
方法详细资料
-
lookup
从类复制的说明:JndiLocatorSupportPerform an actual JNDI lookup for the given name via the JndiTemplate.If the name doesn't begin with "java:comp/env/", this prefix is added if "resourceRef" is set to "true".
- 覆盖:
lookup在类中JndiLocatorSupport- 参数:
jndiName- the JNDI name to look up- 返回:
- the obtained object
- 抛出:
NamingException- if the JNDI lookup failed- 另请参阅:
-
lookup
从类复制的说明:JndiLocatorSupportPerform an actual JNDI lookup for the given name via the JndiTemplate.If the name doesn't begin with "java:comp/env/", this prefix is added if "resourceRef" is set to "true".
- 覆盖:
lookup在类中JndiLocatorSupport- 参数:
jndiName- the JNDI name to look uprequiredType- the required type of the object- 返回:
- the obtained object
- 抛出:
NamingException- if the JNDI lookup failed- 另请参阅:
-
createDefaultResourceRefLocator
Configure aJndiLocatorDelegatewith its "resourceRef" property set totrue, meaning that all names will be prefixed with "java:comp/env/". -
isDefaultJndiEnvironmentAvailable
public static boolean isDefaultJndiEnvironmentAvailable()Check whether a default JNDI environment, as in a Jakarta EE environment, is available on this JVM.- 返回:
trueif a default InitialContext can be used,falseif not
-