Package org.apache.geronimo.kernel

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


    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

            GBeanInfo activationSpecGBeanInfo = activationSpecInfo.getActivationSpecGBeanInfo();
            List attributes = activationSpecGBeanInfo.getPersistentAttributes();
            assertEquals(2, 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

            assertRunning(kernel, thirdOutCF);

            ObjectName thirdOutMCF = NameFactory.getResourceComponentName(null, null, null, null, "ThirdTestOutboundConnectionFactory", NameFactory.JCA_MANAGED_CONNECTION_FACTORY, j2eeContext);
            assertRunning(kernel, thirdOutMCF);

            kernel.stopGBean(objectName);
        } finally {
            if (ds != null) {
                Connection connection = null;
                Statement statement = null;
                try {
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

                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

    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

            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

            Runtime.getRuntime().addShutdownHook(new Thread("Shutdown Thread") {
                public void run() {
                    if (kernel.isRunning()) {
                        try {
                            // stop this configuration first
                            kernel.stopGBean(configName);
                        } catch (Exception e) {
                            // ignore
                        }
                        // clean up the kernel before exiting
                        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.