Exemplo n.º 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());
 }
Exemplo n.º 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());
      }
    }
  }