Package org.apache.geronimo.kernel

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


                }
            }
        } catch (Exception e) {
            throw new MojoExecutionException("Could not use plugin installer bean", e);
        } finally {
            kernel.shutdown();
        }
        getLog().info("Installed plugins: ");
        for (Artifact artifact: downloadPoller.getInstalledConfigIDs()) {
            getLog().info("    " + artifact);
        }
View Full Code Here


        getLog().debug("Deploying...");

        AbstractName deployer = locateDeployer(kernel);
        invokeDeployer(kernel, deployer, targetConfigStoreAName.toString());
        //use a fresh kernel for each module
        kernel.shutdown();
        kernel = null;
    }

    /**
     * Create a Geronimo Kernel to contain the deployment configurations.
View Full Code Here

            for (Iterator iterator = gbeans.keySet().iterator(); iterator.hasNext();) {
                ObjectName name = (ObjectName) iterator.next();
                assertEquals("non started gbean: " + name, new Integer(State.RUNNING.toInt()), kernel.getAttribute(name, "state"));
            }
        } finally {
            kernel.shutdown();
        }
        assertEquals(15, gbeans.size());
        //we could check what the gbeans are...
    }
View Full Code Here

        kernel.boot();
        try {
            RAR_1_5ConfigBuilder configBuilder = new RAR_1_5ConfigBuilder(kernel, null, new ObjectName("geronimo.connector:service=ConnectionTracker"));
            configBuilder.buildConfiguration(outfile, null, getRARInputStream(), geronimoConnectorDocument);
        } finally {
            kernel.shutdown();
            outfile.delete();
        }
    }

    private InputStream getRARInputStream() throws IOException {
View Full Code Here

                    try {
                        kernel.stopGBean(configName);
                    } catch (Exception e) {
                        // ignore
                    }
                    kernel.shutdown();
                }
            });

            kernel.startGBean(configName);
            kernel.getMBeanServer().invoke(gbeanName, "main", new Object[]{args}, MAIN_ARGS);
View Full Code Here

            kernel.loadGBean(proxyFactoryName, gbean);
            kernel.startGBean(proxyFactoryName);
            Object o = roc.lookup("env/resourceenvref");
            assertEquals(proxy, o);
        } finally {
            kernel.shutdown();
        }
    }

    protected void setUp() throws Exception {
        super.setUp();
View Full Code Here

            } finally {
                // @todo possible BUG: gmbean holds information on being online
                // although kernel is shutdown
                // explicit unloading GBean
                kernel.unloadGBean(name);
                kernel.shutdown();
            }
        }

        // 2. setValue throws Error
        {
View Full Code Here

                fail("Setter upon call with " + valueThatCausesError + " should have thrown error");
            } catch (Error expected) {
            } finally {
                // @todo possible BUG: see the above finally block
                kernel.unloadGBean(name);
                kernel.shutdown();
            }
        }

        // 3. setValue throws Throwable
        {
View Full Code Here

                kernel.loadGBean(name, gmbean);
                attribute.online();
                fail("Setter upon call with " + valueThatCausesThrowable + " should have thrown throwable");
            } catch (Throwable expected) {
            } finally {
                kernel.shutdown();
            }
        }

        {
            try {
View Full Code Here

                            kernel.stopGBean(configName);
                        } catch (Exception e) {
                            // ignore
                        }
                        // clean up the kernel before exiting
                        kernel.shutdown();
                    }
                }
            });

            // start this configuration
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.