Package org.mule.api.registry

Examples of org.mule.api.registry.MuleRegistry.lookupObject()


    public static void registerManager(MuleContext muleContext)
    {
        try
        {
            MuleRegistry registry = muleContext.getRegistry();
            if (registry.lookupObject(MockedMessageProcessorManager.ID) == null)
            {
                registry.registerObject(MockedMessageProcessorManager.ID, new MockedMessageProcessorManager());
            }
        }
        catch (RegistrationException e)
View Full Code Here


            }

            // any existing jmx agent will be modified with remote connector settings
            agent = createJmxAgent();
            // there must be only one jmx agent, so lookup by type instead
            if (registry.lookupObject(JmxAgent.class) == null)
            {
                registry.registerAgent(agent);
            }
           
            if (loadLog4jAgent)
View Full Code Here

        assertAppsDir(NONE, new String[] {"dummy-app"}, true);

        // just assert no privileged entries were put in the registry
        final Application app = findApp("dummy-app", 1);
        final MuleRegistry registry = app.getMuleContext().getRegistry();
        final Object obj = registry.lookupObject(PriviledgedMuleApplication.REGISTRY_KEY_DEPLOYMENT_SERVICE);
        assertNull(obj);
        assertFalse(((ApplicationWrapper) app).getDelegate() instanceof PriviledgedMuleApplication);

        // mule-app.properties from the zip archive must have loaded properly
        assertEquals("mule-app.properties should have been loaded.", "someValue", registry.get("myCustomProp"));
View Full Code Here

    {
        MuleRegistry muleRegistry = mock(MuleRegistry.class);
        if (isPersistent)
        {
            PartitionableObjectStore<?> store = createPersistentPartitionableObjectStore(muleContext);
            when(muleRegistry.lookupObject(MuleProperties.OBJECT_STORE_DEFAULT_PERSISTENT_NAME))
                    .thenReturn(store);
        }
        else
        {
            PartitionableObjectStore<?> store = createTransientPartitionableObjectStore();
View Full Code Here

                    .thenReturn(store);
        }
        else
        {
            PartitionableObjectStore<?> store = createTransientPartitionableObjectStore();
            when(muleRegistry.lookupObject(MuleProperties.OBJECT_STORE_DEFAULT_IN_MEMORY_NAME))
                    .thenReturn(store);
        }

        when(muleContext.getRegistry()).thenReturn(muleRegistry);
    }
View Full Code Here

            }

            // any existing jmx agent will be modified with remote connector settings
            agent = createJmxAgent();
            // there must be only one jmx agent, so lookup by type instead
            if (registry.lookupObject(AbstractJmxAgent.class) == null)
            {
                registry.registerAgent(agent);
            }

            agent = createJmxNotificationAgent();
View Full Code Here

        final MuleContext muleContext = muleClient.getMuleContext();
        muleContext.start();

        final MuleRegistry registry = muleContext.getRegistry();

        final AbstractLifecycleTracker springLT = (AbstractLifecycleTracker) registry.lookupObject("SpringBeanLifecycleTracker");

        muleContext.dispose();
        muleClient.dispose();

        assertEquals("SpringBeanLifecycleTracker",
View Full Code Here

    @Test
    public void testPutInTransientRegistry() throws Exception
    {
        final MuleRegistry registry = muleContext.getRegistry();
        assertNull(registry.lookupObject("bar"));
        registry.registerObject("bar", 123L);
        assertEquals(123L, registry.lookupObject("bar"));
    }
}
View Full Code Here

    public void testPutInTransientRegistry() throws Exception
    {
        final MuleRegistry registry = muleContext.getRegistry();
        assertNull(registry.lookupObject("bar"));
        registry.registerObject("bar", 123L);
        assertEquals(123L, registry.lookupObject("bar"));
    }
}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.