Package org.apache.geronimo.kernel

Examples of org.apache.geronimo.kernel.Kernel.stopGBean()


                    manifest.getMainMethod(),
                    new Object[]{args},
                    new String[]{String[].class.getName()});

            // stop this configuration
            kernel.stopGBean(configName);

            // shutdown the kernel
            kernel.shutdown();
        } catch (Exception e) {
            e.printStackTrace();
View Full Code Here


            GBeanInfo activationSpecGBeanInfo = activationSpecInfo.getActivationSpecGBeanInfo();
            List attributes = activationSpecGBeanInfo.getPersistentAttributes();
            assertEquals(3, attributes.size());

            //startRecursive can only be invoked if GBean is stopped.
            kernel.stopGBean(objectName);

            // start the configuration to also start gbeans.
            kernel.startRecursiveGBean(objectName);
            assertRunning(kernel, objectName);
View Full Code Here

                    ",J2EEServer=" + j2eeServerName +
                    ",name=tweedledum");
            assertRunning(kernel, tweedledumAdminObject);


            kernel.stopGBean(objectName);
        } finally {
            if (ds != null) {
                Connection connection = null;
                Statement statement = null;
                try {
View Full Code Here

                    ":j2eeType=JCAManagedConnectionFactory" +
                    ",J2EEServer=" + j2eeServerName +
                    ",name=ThirdTestOutboundConnectionFactory");
            assertRunning(kernel, thirdOutMCF);

            kernel.stopGBean(objectName);
        } finally {
            if (ds != null) {
                Connection connection = null;
                Statement statement = null;
                try {
View Full Code Here

    public void buildPackage() throws Exception {
        log.info("Packaging module configuration: " + planFile);

        Kernel kernel = createKernel();
        if (!targetSet) {
            kernel.stopGBean(targetRepositoryAName);
            kernel.setAttribute(targetRepositoryAName, "root", targetRepository.toURI());
            kernel.startGBean(targetRepositoryAName);

            if (kernel.getGBeanState(targetConfigStoreAName) != State.RUNNING_INDEX) {
                throw new IllegalStateException("After restarted repository then config store is not running");
View Full Code Here

                ObjectName tweedledumAdminObject = NameFactory.getComponentName(null, null, null, null, null, "tweedledum", NameFactory.JCA_ADMIN_OBJECT, j2eeContext);
                assertRunning(kernel, tweedledumAdminObject);
            }


            kernel.stopGBean(configName);
        } finally {
            if (ds != null) {
                Connection connection = null;
                Statement statement = null;
                try {
View Full Code Here

        try {
            AbstractName abstractName = new AbstractName(URI.create(sBrokerURI));
            Kernel kernel = PortletManager.getKernel();
            if (!kernel.isRunning(abstractName))
                return;
            kernel.stopGBean(abstractName);
            if (kernel.isRunning(abstractName)) {
                throw new PortletException(getLocalizedString(actionRequest,
                        "jmsmanager.broker.failStopBrokerNoReason", sBrokerName));
            }
            addInfoMessage(actionRequest, getLocalizedString(actionRequest, "jmsmanager.broker.successStopBroker",
View Full Code Here

    public void buildPackage() throws Exception {
        log.info("Packaging module configuration: " + planFile);

        Kernel kernel = createKernel();
        if (!targetSet) {
            kernel.stopGBean(targetRepositoryAName);
            kernel.setAttribute(targetRepositoryAName, "root", targetRepository.toURI());
            kernel.startGBean(targetRepositoryAName);

            if (kernel.getGBeanState(targetConfigStoreAName) != State.RUNNING_INDEX) {
                throw new IllegalStateException("After restarted repository then config store is not running");
View Full Code Here

    public void buildPackage() throws Exception {
        log.info("Packaging module configuration: " + planFile);

        Kernel kernel = createKernel();
        if (!targetSet) {
            kernel.stopGBean(targetRepositoryAName);
            kernel.setAttribute(targetRepositoryAName, "root", targetRepository.toURI());
            kernel.startGBean(targetRepositoryAName);

            if (kernel.getGBeanState(targetConfigStoreAName) != State.RUNNING_INDEX) {
                throw new IllegalStateException("After restarted repository then config store is not running");
View Full Code Here

            final ObjectName configName = kernel.getConfigurationManager().load(config, cl.getResource("/"));

            Runtime.getRuntime().addShutdownHook(new Thread("Shutdown Thread") {
                public void run() {
                    try {
                        kernel.stopGBean(configName);
                    } catch (Exception e) {
                        // ignore
                    }
                    kernel.shutdown();
                }
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.