Package org.apache.geronimo.kernel

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


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


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


    public void buildPackage() throws Exception {
        getLog().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

    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

                setKeystoreProperties(actionRequest, connectorName);
               
                try {
                    Kernel kernel=PortletManager.getKernel();
                    ClassLoader oldCL=connector.getClass().getClassLoader();
                    kernel.stopGBean(connectorName);
                    kernel.unloadGBean(connectorName);
                   
                   
                    kernel.loadGBean(connectorGBeanData, oldCL);
                    kernel.startGBean(connectorName);
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 {
        getLog().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

            //TODO investigate how this is called and whether just stopping/unloading the configuration gbean will
            //leave the configuration model in a consistent state.  We might need a shutdown flag set elsewhere to avoid
            //overwriting the load attribute in config.xml. This code mimics the shutdown hook in KernelConfigurationManager
            //see https://issues.apache.org/jira/browse/GERONIMO-4909
            try {
                kernel.stopGBean(name);
            } catch (GBeanNotFoundException e) {
            } catch (InternalKernelException e) {
            } catch (IllegalStateException e) {
            }
            try {
View Full Code Here

                setKeystoreProperties(actionRequest, connectorName);

                try {
                    Kernel kernel = PortletManager.getKernel();
                    BundleContext bundleContext = kernel.getBundleFor(connectorName).getBundleContext();
                    kernel.stopGBean(connectorName);
                    kernel.unloadGBean(connectorName);
                    kernel.loadGBean(connectorGBeanData, bundleContext);
                    kernel.startGBean(connectorName);
                } catch (Exception e) {
                    log.error("Unable to reload updated connector:" + connectorName.toURI(), e);
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.