Search in sources :

Example 1 with DeploymentSpi

use of org.apache.ignite.spi.deployment.DeploymentSpi in project ignite by apache.

the class GridManagerStopSelfTest method testStopDeploymentManager.

/**
 * @throws Exception If failed.
 */
public void testStopDeploymentManager() throws Exception {
    DeploymentSpi spi = new LocalDeploymentSpi();
    injectLogger(spi);
    ctx.config().setDeploymentSpi(spi);
    GridDeploymentManager mgr = new GridDeploymentManager(ctx);
    mgr.stop(true);
}
Also used : LocalDeploymentSpi(org.apache.ignite.spi.deployment.local.LocalDeploymentSpi) DeploymentSpi(org.apache.ignite.spi.deployment.DeploymentSpi) GridDeploymentManager(org.apache.ignite.internal.managers.deployment.GridDeploymentManager) LocalDeploymentSpi(org.apache.ignite.spi.deployment.local.LocalDeploymentSpi)

Example 2 with DeploymentSpi

use of org.apache.ignite.spi.deployment.DeploymentSpi in project ignite by apache.

the class GridDeploymentManagerStopSelfTest method testOnKernalStop.

/**
 * @throws Exception If failed.
 */
public void testOnKernalStop() throws Exception {
    DeploymentSpi spi = new GridTestDeploymentSpi();
    GridTestKernalContext ctx = newContext();
    ctx.config().setMarshaller(new JdkMarshaller());
    ctx.config().setDeploymentSpi(spi);
    GridResourceProcessor resProc = new GridResourceProcessor(ctx);
    resProc.setSpringContext(null);
    ctx.add(resProc);
    GridComponent mgr = new GridDeploymentManager(ctx);
    try {
        mgr.onKernalStop(true);
    } catch (Exception e) {
        error("Error during onKernalStop() callback.", e);
        assert false : "Unexpected exception " + e;
    }
}
Also used : GridComponent(org.apache.ignite.internal.GridComponent) GridTestKernalContext(org.apache.ignite.testframework.junits.GridTestKernalContext) JdkMarshaller(org.apache.ignite.marshaller.jdk.JdkMarshaller) GridResourceProcessor(org.apache.ignite.internal.processors.resource.GridResourceProcessor) DeploymentSpi(org.apache.ignite.spi.deployment.DeploymentSpi) IgniteSpiException(org.apache.ignite.spi.IgniteSpiException)

Aggregations

DeploymentSpi (org.apache.ignite.spi.deployment.DeploymentSpi)2 GridComponent (org.apache.ignite.internal.GridComponent)1 GridDeploymentManager (org.apache.ignite.internal.managers.deployment.GridDeploymentManager)1 GridResourceProcessor (org.apache.ignite.internal.processors.resource.GridResourceProcessor)1 JdkMarshaller (org.apache.ignite.marshaller.jdk.JdkMarshaller)1 IgniteSpiException (org.apache.ignite.spi.IgniteSpiException)1 LocalDeploymentSpi (org.apache.ignite.spi.deployment.local.LocalDeploymentSpi)1 GridTestKernalContext (org.apache.ignite.testframework.junits.GridTestKernalContext)1