diff --git a/activemq-core/src/main/java/org/apache/activemq/jndi/ReadOnlyContext.java b/activemq-core/src/main/java/org/apache/activemq/jndi/ReadOnlyContext.java index 12d4ba12e4..6d5a9b7538 100755 --- a/activemq-core/src/main/java/org/apache/activemq/jndi/ReadOnlyContext.java +++ b/activemq-core/src/main/java/org/apache/activemq/jndi/ReadOnlyContext.java @@ -97,17 +97,16 @@ public class ReadOnlyContext implements Context, Serializable { this.environment = new Hashtable(environment); } this.bindings = new HashMap(); + treeBindings = new HashMap(); if (bindings != null) { for (Map.Entry binding : bindings.entrySet()) { try { internalBind(binding.getKey(), binding.getValue()); - } catch (NamingException e) { + } catch (Throwable e) { LOG.error("Failed to bind " + binding.getKey() + "=" + binding.getValue(), e); } } } - - treeBindings = new HashMap(); frozen = true; }