Package org.apache.geronimo.kernel.config

Examples of org.apache.geronimo.kernel.config.ConfigurationManager.unload()


            } catch (Exception e) {
                throw new DeploymentException("Unable to copy domain and server from parent configuration", e);
            } finally {
                if (loaded) {
                    //we need to unload again so the loadedAncestors list will be in the correct order to start configs.
                    configurationManager.unload(parent);
                }
            }
        } catch (Exception e) {
            throw new DeploymentException("Unable to load first parent of configuration " + configurationData.getId(), e);
        } finally {
View Full Code Here


                                // the module is not running
                            } else {
                                throw e;
                            }
                        }
                        configurationManager.unload(moduleID);
                        updateStatus("Module "+moduleID+" unloaded.");
                    } catch (InternalKernelException e) {
                        // this is cause by the kernel being already shutdown
                    } catch (NoSuchConfigException e) {
                        // module was already undeployed - just continue
View Full Code Here

                        } else {
                            System.out.println("Unmatched name '"+clean(e.getGBeanName().getKeyProperty("name"))+"'");
                            throw e;
                        }
                    }
                    configurationManager.unload(moduleID);
                    addModule(module);
                }
            } finally {
                ConfigurationUtil.releaseConfigurationManager(kernel, configurationManager);
            }
View Full Code Here

                        if(e.getGBeanName().equals(configName)) {
                            // The module isn't running -- that's OK
                        } else throw e;
                    }
                    try {
                        configurationManager.unload(configID);
                        updateStatus("Unloaded "+configID);
                    } catch(InternalKernelException e) {
                        Exception cause = (Exception)e.getCause();
                        if(cause instanceof NoSuchConfigException) {
                            // The modules isn't loaded -- that's OK
View Full Code Here

                    // This is a hack that seems to work. Please fix this when
                    // you understand what is happening or where you can get the
                    // ObjectName from the configId without calling
                    // ConfigurationManager.load(URI).
                    if (configurationManager.isLoaded(config))
                        configurationManager.unload(config);

                    ObjectName configName = configurationManager.load(config);
                    kernel.startRecursiveGBean(configName);
                }
            }
View Full Code Here

        } catch (InstanceNotFoundException e) {
            throw new NoSuchConfigException(e);
        } catch (InvalidConfigException e) {
            throw (IllegalStateException) new IllegalStateException().initCause(e);
        }
        configurationManager.unload(configID);
    }

    public int getConfigurationState(URI configID) throws NoSuchConfigException {
         try {
             ObjectName configName = Configuration.getConfigurationObjectName(configID);
View Full Code Here

        kernel.setAttribute(gbeanName1, "value", "9900990099");
        assertEquals("9900990099", kernel.getAttribute(gbeanName1, "value"));

        // stop and unload the config
        kernel.stopGBean(configName);
        configurationManager.unload(configName);

        // assure it was unloaded
        assertFalse(kernel.isLoaded(configName));

        // now reload and restart the config
View Full Code Here

        // make sure the value was reloaded correctly
        assertEquals("9900990099", kernel.getAttribute(gbeanName1, "value"));

        // stop and unload the config
        kernel.stopGBean(configName);
        configurationManager.unload(configName);
    }

    protected void setUp() throws Exception {
        try {
            kernel = new Kernel("test.kernel", "geronimo");
View Full Code Here

            fail();
        } catch (InstanceNotFoundException e) {
            // ok
        }
        assertEquals(new Integer(State.STOPPED.toInt()), mbServer.getAttribute(configName, "state"));
        configurationManager.unload(configName);
        assertFalse(mbServer.isRegistered(configName));
    }

    protected void setUp() throws Exception {
        kernel = new Kernel("test.kernel", "geronimo");
View Full Code Here

            fail();
        } catch (InstanceNotFoundException e) {
            // ok
        }
        assertEquals(new Integer(State.STOPPED.toInt()), mbServer.getAttribute(configName, "state"));
        configurationManager.unload(configName);
        assertFalse(mbServer.isRegistered(configName));
    }

    protected void setUp() throws Exception {
        kernel = new Kernel("test.kernel", "geronimo");
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.