Package org.jboss.gravia.provision

Examples of org.jboss.gravia.provision.ResourceHandle.uninstall()


        ResourceHandle handleA = provisioner.installResource(builderA.getResource());
        try {
            Assert.assertSame(handleA.getModule(), runtime.getModule(identityA));
            Assert.assertEquals("ACTIVE " + identityA, State.ACTIVE, handleA.getModule().getState());
        } finally {
            handleA.uninstall();
        }
    }

    /**
     * Provision a resource from maven coordinates.
View Full Code Here


            try {
                // Make a call to the HttpService endpoint that goes through a Camel route
                String reqspec = "/gravia/service?test=Kermit";
                Assert.assertEquals("Hello Kermit", performCall(reqspec));
            } finally {
                handleC.uninstall();
            }
        } finally {
            handleA.uninstall();
        }
    }
View Full Code Here

            // Verify that the module activator was called
            MBeanServer server = ServiceLocator.getRequiredService(MBeanServer.class);
            Assert.assertTrue("MBean registered", server.isRegistered(getObjectName(module)));
            Assert.assertEquals("ACTIVE", server.getAttribute(getObjectName(module), "ModuleState"));
        } finally {
            handle.uninstall();
        }
    }

    @Test
    public void testProvisionSharedStreamResource() throws Exception {
View Full Code Here

        ResourceHandle handleA = provisioner.installResource(builderA.getResource());
        try {
            Assert.assertSame(handleA.getModule(), runtime.getModule(identityA));
            Assert.assertEquals("ACTIVE " + identityA, State.ACTIVE, handleA.getModule().getState());
        } finally {
            handleA.uninstall();
        }
    }

    @Test
    public void testProvisionSharedMavenResource() throws Exception {
View Full Code Here

                // Make a call to the HttpService endpoint that goes through a Camel route
                String reqspec = "/service?test=Kermit";
                String context = RuntimeType.getRuntimeType() == RuntimeType.KARAF ? "" : "/" + RESOURCE_C;
                Assert.assertEquals("Hello Kermit", performCall(context, reqspec));
            } finally {
                handleC.uninstall();
            }
        } finally {
            handleA.uninstall();
        }
    }
View Full Code Here

            if (resourceHandle == null) {
                // TODO should not really happen when we can ask about the installed Resources
                LOGGER.warn("TODO: Cannot uninstall " + installedResource + " as we have no handle!");
            } else {
                LOGGER.info("Uninstalling " + installedResource);
                resourceHandle.uninstall();
                resourcehandleMap.remove(identity);
                LOGGER.info("Uninstalled " + installedResource);
            }
        }
        if (resourcesToInstall.size() > 0) {
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.