/** * invoked when an entry has been changed during a persistent search */ @Override public void objectChanged(NamingEvent event) { LOG.debug("entry changed"); try { SearchResult result = (SearchResult) event.getNewBinding(); removeConnector(result); addConnector(result); } catch (Exception err) { LOG.error("ERR: caught unexpected exception", err); } }
String uuid = toUUID(result); if (uuidMap.containsKey(uuid)) { LOG.warn("connector already regsitered for UUID [{}]", uuid); URI connectorURI = toURI(result); if (connectorMap.containsKey(connectorURI)) { int referenceCount = referenceMap.get(connectorURI) + 1; NetworkConnector connector = getBrokerService().addNetworkConnector(connectorURI); connector.setDynamicOnly(isDynamicOnly()); connector.setDecreaseNetworkConsumerPriority(isDecreaseNetworkConsumerPriority()); connector.setNetworkTTL(getNetworkTTL()); connector.setConsumerTTL(getConsumerTTL()); connector.setMessageTTL(getMessageTTL()); connector.setConduitSubscriptions(isConduitSubscriptions()); connector.setExcludedDestinations(getExcludedDestinations()); connector.setDynamicallyIncludedDestinations(getDynamicallyIncludedDestinations()); connector.setDuplex(isDuplex()); connector.setLocalUri(getBrokerService().getVmConnectorURI()); connector.setBrokerName(getBrokerService().getBrokerName()); connector.setDurableDestinations(getBrokerService().getBroker().getDurableDestinations());
@Override public String toString() { return this.getClass().getName() + getName() + "[" + ldapURI.toString() + "]"; }
Hashtable<String, String> env = new Hashtable<String, String>(); env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory"); this.ldapURI = getUri(); LOG.debug(" URI [{}]", this.ldapURI); env.put(Context.PROVIDER_URL, this.ldapURI.toString()); } catch (CommunicationException err) { if (failover) { this.ldapURI = getUri(); LOG.error("connection error [{}], failover connection to [{}]", env.get(Context.PROVIDER_URL), this.ldapURI.toString()); env.put(Context.PROVIDER_URL, this.ldapURI.toString()); NamingEnumeration<SearchResult> results = context.search(base, searchFilter, searchControls); while (results.hasMore()) { addConnector(results.next());
/** * invoked when an entry has been added during a persistent search */ @Override public void objectAdded(NamingEvent event) { LOG.debug("entry added"); try { addConnector((SearchResult) event.getNewBinding()); } catch (Exception err) { LOG.error("ERR: caught unexpected exception", err); } }
Hashtable<String, String> env = new Hashtable<String, String>(); env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory"); this.ldapURI = getUri(); LOG.debug(" URI [{}]", this.ldapURI); env.put(Context.PROVIDER_URL, this.ldapURI.toString()); } catch (CommunicationException err) { if (failover) { this.ldapURI = getUri(); LOG.error("connection error [{}], failover connection to [{}]", env.get(Context.PROVIDER_URL), this.ldapURI.toString()); env.put(Context.PROVIDER_URL, this.ldapURI.toString()); NamingEnumeration<SearchResult> results = context.search(base, searchFilter, searchControls); while (results.hasMore()) { addConnector(results.next());
/** * invoked when an entry has been added during a persistent search */ @Override public void objectAdded(NamingEvent event) { LOG.debug("entry added"); try { addConnector((SearchResult) event.getNewBinding()); } catch (Exception err) { LOG.error("ERR: caught unexpected exception", err); } }
throws Exception String uuid = toUUID(result); if(uuidMap.containsKey(uuid)) URI connectorURI = toURI(result); if(connectorMap.containsKey(connectorURI)) NetworkConnector connector = getBrokerService().addNetworkConnector(connectorURI); connector.setDynamicOnly(isDynamicOnly()); connector.setDecreaseNetworkConsumerPriority(isDecreaseNetworkConsumerPriority()); connector.setNetworkTTL(getNetworkTTL()); connector.setConduitSubscriptions(isConduitSubscriptions()); connector.setExcludedDestinations(getExcludedDestinations()); connector.setDynamicallyIncludedDestinations(getDynamicallyIncludedDestinations()); connector.setDuplex(isDuplex()); connector.setLocalUri(getBrokerService().getVmConnectorURI()); connector.setBrokerName(getBrokerService().getBrokerName()); connector.setDurableDestinations(getBrokerService().getBroker().getDurableDestinations());
/** * invoked when an entry has been changed during a persistent search */ public void objectChanged(NamingEvent event) { LOG.debug("entry changed"); try { SearchResult result = (SearchResult)event.getNewBinding(); removeConnector(result); addConnector(result); } catch(Exception err) { LOG.error("ERR: caught unexpected exception", err); } }
Hashtable<String, String> env = new Hashtable<String, String>(); env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory"); this.ldapURI = getUri(); LOG.debug(" URI [{}]", this.ldapURI); env.put(Context.PROVIDER_URL, this.ldapURI.toString()); } catch (CommunicationException err) { if (failover) { this.ldapURI = getUri(); LOG.error("connection error [{}], failover connection to [{}]", env.get(Context.PROVIDER_URL), this.ldapURI.toString()); env.put(Context.PROVIDER_URL, this.ldapURI.toString()); NamingEnumeration<SearchResult> results = context.search(base, searchFilter, searchControls); while (results.hasMore()) { addConnector(results.next());
/** * invoked when an entry has been added during a persistent search */ public void objectAdded(NamingEvent event) { LOG.debug("entry added"); try { addConnector((SearchResult)event.getNewBinding()); } catch(Exception err) { LOG.error("ERR: caught unexpected exception", err); } }
@Override public String toString() { return this.getClass().getName() + getName() + "[" + ldapURI.toString() + "]"; }
String uuid = toUUID(result); if (uuidMap.containsKey(uuid)) { LOG.warn("connector already regsitered for UUID [{}]", uuid); URI connectorURI = toURI(result); if (connectorMap.containsKey(connectorURI)) { int referenceCount = referenceMap.get(connectorURI) + 1; NetworkConnector connector = getBrokerService().addNetworkConnector(connectorURI); connector.setDynamicOnly(isDynamicOnly()); connector.setDecreaseNetworkConsumerPriority(isDecreaseNetworkConsumerPriority()); connector.setNetworkTTL(getNetworkTTL()); connector.setConsumerTTL(getConsumerTTL()); connector.setMessageTTL(getMessageTTL()); connector.setConduitSubscriptions(isConduitSubscriptions()); connector.setExcludedDestinations(getExcludedDestinations()); connector.setDynamicallyIncludedDestinations(getDynamicallyIncludedDestinations()); connector.setDuplex(isDuplex()); connector.setLocalUri(getBrokerService().getVmConnectorURI()); connector.setBrokerName(getBrokerService().getBrokerName()); connector.setDurableDestinations(getBrokerService().getBroker().getDurableDestinations());
/** * invoked when an entry has been changed during a persistent search */ @Override public void objectChanged(NamingEvent event) { LOG.debug("entry changed"); try { SearchResult result = (SearchResult) event.getNewBinding(); removeConnector(result); addConnector(result); } catch (Exception err) { LOG.error("ERR: caught unexpected exception", err); } }
Hashtable<String, String> env = new Hashtable(); env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory"); this.ldapURI = getUri(); LOG.debug(" URI [" + this.ldapURI + "]"); env.put(Context.PROVIDER_URL, this.ldapURI.toString()); this.ldapURI = getUri(); LOG.error("connection error [" + env.get(Context.PROVIDER_URL) + "], failover connection to [" + this.ldapURI.toString() + "]"); env.put(Context.PROVIDER_URL, this.ldapURI.toString()); NamingEnumeration<SearchResult> results = context.search(base, searchFilter, searchControls); while(results.hasMore()) { addConnector(results.next()); }
/** * invoked when an entry has been added during a persistent search */ @Override public void objectAdded(NamingEvent event) { LOG.debug("entry added"); try { addConnector((SearchResult) event.getNewBinding()); } catch (Exception err) { LOG.error("ERR: caught unexpected exception", err); } }
public String toString() { return this.getClass().getName() + getName() + "[" + ldapURI.toString() + "]"; }
String uuid = toUUID(result); if (uuidMap.containsKey(uuid)) { LOG.warn("connector already regsitered for UUID [{}]", uuid); URI connectorURI = toURI(result); if (connectorMap.containsKey(connectorURI)) { int referenceCount = referenceMap.get(connectorURI) + 1; NetworkConnector connector = getBrokerService().addNetworkConnector(connectorURI); connector.setDynamicOnly(isDynamicOnly()); connector.setDecreaseNetworkConsumerPriority(isDecreaseNetworkConsumerPriority()); connector.setNetworkTTL(getNetworkTTL()); connector.setConsumerTTL(getConsumerTTL()); connector.setMessageTTL(getMessageTTL()); connector.setConduitSubscriptions(isConduitSubscriptions()); connector.setExcludedDestinations(getExcludedDestinations()); connector.setDynamicallyIncludedDestinations(getDynamicallyIncludedDestinations()); connector.setDuplex(isDuplex()); connector.setLocalUri(getBrokerService().getVmConnectorURI()); connector.setBrokerName(getBrokerService().getBrokerName()); connector.setDurableDestinations(getBrokerService().getBroker().getDurableDestinations());
/** * invoked when an entry has been changed during a persistent search */ @Override public void objectChanged(NamingEvent event) { LOG.debug("entry changed"); try { SearchResult result = (SearchResult) event.getNewBinding(); removeConnector(result); addConnector(result); } catch (Exception err) { LOG.error("ERR: caught unexpected exception", err); } }
Hashtable<String, String> env = new Hashtable<String, String>(); env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory"); this.ldapURI = getUri(); LOG.debug(" URI [{}]", this.ldapURI); env.put(Context.PROVIDER_URL, this.ldapURI.toString()); } catch (CommunicationException err) { if (failover) { this.ldapURI = getUri(); LOG.error("connection error [{}], failover connection to [{}]", env.get(Context.PROVIDER_URL), this.ldapURI.toString()); env.put(Context.PROVIDER_URL, this.ldapURI.toString()); NamingEnumeration<SearchResult> results = context.search(base, searchFilter, searchControls); while (results.hasMore()) { addConnector(results.next());