📄 jndiutil.java
字号:
/**/package org.impact.stars.util;import javax.naming.InitialContext;import javax.naming.NamingException;/** * This class implements convenience methods to access JNDI * entries. It is typically used to access application * properties that were configured through deployment * descriptor and hence are accessible through JNDI namespace. */public final class JNDIUtil implements JNDINames { /** * a convenience method to get the boolean value corresponding * to the SEND_CONFIRMATION_MAIL property. */ public static boolean sendConfirmationMail() { boolean boolVal = false; try { InitialContext ic = new InitialContext(); Boolean bool = (Boolean) ic.lookup(JNDINames.SEND_CONFIRMATION_MAIL); if (bool != null) { boolVal = bool.booleanValue(); } } catch (NamingException ne) { // If property is not present in the deployment // descriptor, conservatively assume that we do not send // confirmation mail for each order. Debug.print(ne); } return boolVal; }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -