/** * Check if the user has disabled affinity learning */ private boolean shouldLearnAffinity() { Object val = null; try { val = getEnvironment().get(EJBClient.DISABLE_AFFINITY_LEARNING); } catch(NamingException ne) { Logs.MAIN.warn("Problem reading cluster affinity specification from env; skipping affinity assignment"); } return val == null || "false".equalsIgnoreCase(val.toString()); }
/** * Check if the user has specified strong affinity to a cluster for this context and return the cluster name. * @return String the name of the cluster */ private String getClusterAffinityValueFromEnvironment() { Object val; try { val = getEnvironment().get(EJBClient.CLUSTER_AFFINITY); if (val != null && val instanceof String) { return (String) val; } return getLegacyClusterAffinity(); } catch(NamingException ne) { Logs.MAIN.warn("Problem reading cluster affinity specification from env; skipping affinity assignment"); return null; } }
/** * Check if the user has disabled affinity learning */ private boolean shouldLearnAffinity() { Object val = null; try { val = getEnvironment().get(EJBClient.DISABLE_AFFINITY_LEARNING); } catch(NamingException ne) { Logs.MAIN.warn("Problem reading cluster affinity specification from env; skipping affinity assignment"); } return val == null || "false".equalsIgnoreCase(val.toString()); }
/** * Check if the user has disabled affinity learning */ private boolean shouldLearnAffinity() { Object val = null; try { val = getEnvironment().get(EJBClient.DISABLE_AFFINITY_LEARNING); } catch(NamingException ne) { Logs.MAIN.warn("Problem reading cluster affinity specification from env; skipping affinity assignment"); } return val == null || "false".equalsIgnoreCase(val.toString()); }
/** * Check if the user has specified strong affinity to a cluster for this context and return the cluster name. * @return String the name of the cluster */ private String getClusterAffinityValueFromEnvironment() { Object val; try { val = getEnvironment().get(EJBClient.CLUSTER_AFFINITY); if (val != null && val instanceof String) { return (String) val; } return getLegacyClusterAffinity(); } catch(NamingException ne) { Logs.MAIN.warn("Problem reading cluster affinity specification from env; skipping affinity assignment"); return null; } }
/** * Check if the user has specified strong affinity to a cluster for this context and return the cluster name. * @return String the name of the cluster */ private String getClusterAffinityValueFromEnvironment() { Object val; try { val = getEnvironment().get(EJBClient.CLUSTER_AFFINITY); if (val != null && val instanceof String) { return (String) val; } return getLegacyClusterAffinity(); } catch(NamingException ne) { Logs.MAIN.warn("Problem reading cluster affinity specification from env; skipping affinity assignment"); return null; } }