Package org.mule.module.launcher.application

Examples of org.mule.module.launcher.application.Application


        });
    }

    private <T> T withAppClassLoader(String appName, Callable<T> closure) throws Exception
    {
        Application app = muleServer.findApplication(appName);
        ClassLoader currentClassLoader = Thread.currentThread().getContextClassLoader();
        ClassLoader classLoader = app.getMuleContext().getExecutionClassLoader();
        Thread.currentThread().setContextClassLoader(classLoader);
        try
        {
            return closure.call();
        }
View Full Code Here


    @Test
    public void disposesAppOnDeployFailure() throws Exception
    {
        DefaultArtifactDeployer deployer = new DefaultArtifactDeployer();
        Application app = mock(Application.class);
        doThrow(new IllegalStateException()).when(app).init();

        try
        {
            deployer.deploy(app);
View Full Code Here

        assertApplicationDeploymentSuccess(applicationDeploymentListener, dummyAppDescriptor.id);
        assertAppsDir(NONE, new String[] {dummyAppDescriptor.id}, true);
        assertApplicationAnchorFileExists(dummyAppDescriptor.id);

        // just assert no privileged entries were put in the registry
        final Application app = findApp(dummyAppDescriptor.id, 1);
        final MuleRegistry registry = getMuleRegistry(app);

        // 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

        assertApplicationDeploymentSuccess(applicationDeploymentListener, dummyAppDescriptor.id);
        assertAppsDir(NONE, new String[] {dummyAppDescriptor.id}, true);
        assertApplicationAnchorFileExists(dummyAppDescriptor.id);

        // just assert no privileged entries were put in the registry
        final Application app = findApp(dummyAppDescriptor.id, 1);
        final MuleRegistry registry = getMuleRegistry(app);

        // 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

        addPackedAppFromResource(dummyAppDescriptor.zipPath);

        deploymentService.start();

        assertApplicationDeploymentSuccess(applicationDeploymentListener, dummyAppDescriptor.id);
        final Application app = findApp(dummyAppDescriptor.id, 1);
        app.stop();
        assertStatus(app, ApplicationStatus.STOPPED);

        deploymentService.undeploy(app);
    }
View Full Code Here

        addPackedAppFromResource(dummyAppDescriptor.zipPath);

        deploymentService.start();

        assertApplicationDeploymentSuccess(applicationDeploymentListener, dummyAppDescriptor.id);
        Application app = findApp(dummyAppDescriptor.id, 1);

        assertTrue("Unable to remove anchor file", removeAppAnchorFile(dummyAppDescriptor.id));

        assertUndeploymentSuccess(applicationDeploymentListener, dummyAppDescriptor.id);
        assertStatus(app, ApplicationStatus.DESTROYED);
View Full Code Here

        deploymentService.setAppFactory(appFactory);
        deploymentService.start();

        assertApplicationDeploymentSuccess(applicationDeploymentListener, emptyAppDescriptor.id);
        Application app = findApp(emptyAppDescriptor.id, 1);

        assertTrue("Unable to remove anchor file", removeAppAnchorFile(emptyAppDescriptor.id));

        assertUndeploymentSuccess(applicationDeploymentListener, emptyAppDescriptor.id);
View Full Code Here

        appFactory.setFailOnDisposeApplication(true);
        deploymentService.setAppFactory(appFactory);
        deploymentService.start();

        assertApplicationDeploymentSuccess(applicationDeploymentListener, emptyAppDescriptor.id);
        Application app = findApp(emptyAppDescriptor.id, 1);

        assertTrue("Unable to remove anchor file", removeAppAnchorFile(emptyAppDescriptor.id));

        assertUndeploymentSuccess(applicationDeploymentListener, emptyAppDescriptor.id);
        assertStatus(app, ApplicationStatus.STOPPED);
View Full Code Here

        assertNull(domain.getMuleContext());

        assertApplicationDeploymentSuccess(applicationDeploymentListener, dummyAppDescriptor.id);
        assertAppsDir(NONE, new String[] {dummyAppDescriptor.id}, true);

        final Application app = findApp(dummyAppDescriptor.id, 1);
        assertNotNull(app);
    }
View Full Code Here

        assertStatus(appName, status, -1);
    }

    private void assertStatus(String appName, ApplicationStatus status, int expectedApps)
    {
        Application app = findApp(appName, expectedApps);
        assertThat(app, notNullValue());
        assertStatus(app, status);
    }
View Full Code Here

TOP

Related Classes of org.mule.module.launcher.application.Application

Copyright © 2018 www.massapicom. 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.