Пример #1
0
 public void testGlobalNamespaces() throws Exception {
   NamespaceManager manager =
       (NamespaceManager) muleContext.getRegistry().lookupObject(NamespaceManager.class);
   assertNotNull(manager);
   assertTrue(manager.isIncludeConfigNamespaces());
   assertEquals(4, manager.getNamespaces().size());
 }
Пример #2
0
  public void initialise() throws InitialisationException {
    try {
      namespaceManager = muleContext.getRegistry().lookupObject(NamespaceManager.class);
    } catch (RegistrationException e) {
      throw new ExpressionRuntimeException(CoreMessages.failedToLoad("NamespaceManager"), e);
    }

    if (namespaceManager != null) {
      if (namespaces == null) {
        namespaces = new HashMap(namespaceManager.getNamespaces());
      } else {
        namespaces.putAll(namespaceManager.getNamespaces());
      }
    }
  }