Package org.apache.geronimo.kernel

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


                    kernel,
                    bundleContext);

            installer.install(pluginList, localSourceRepository, true, null, null, downloadPoller);
        } finally {
            kernel.shutdown();
        }
        return downloadPoller;
    }

    public void mergeOverrides(String server, AttributesType overrides) throws InvalidGBeanException, IOException {
View Full Code Here


                }
            }
        } catch (Exception e) {
            throw new MojoExecutionException("Could not use plugin installer bean", e);
        } finally {
            kernel.shutdown();           
            try {
                bundleContext.getBundle().stop();
            } catch (BundleException e) {
                // ignore
            }
View Full Code Here

                GeronimoSourceRepository localSourceRepository = new GeronimoSourceRepository(configManager.getRepositories(), configManager.getArtifactResolver());

                DownloadResults downloadPoller = new DownloadResults();
                pluginInstallerGBean.install(pluginList, localSourceRepository, true, null, null, downloadPoller);
            } finally {
                kernel.shutdown();
            }
        } catch (Throwable t) {
            t.printStackTrace();
        }
    }
View Full Code Here

    }

    public void stop(BundleContext bundleContext) throws Exception {
        Kernel kernel = (Kernel) bundleContext.getService(kernelRegistration.getReference());
        kernel.shutdown();
        kernelRegistration.unregister();
        kernelRegistration = null;
    }
}
View Full Code Here

    }

    public void stop(BundleContext bundleContext) throws Exception {
        if (configurationActivator == null) {
            Kernel kernel = (Kernel) bundleContext.getService(kernelRegistration.getReference());
            kernel.shutdown();
            kernelRegistration.unregister();
            kernelRegistration = null;
        } else {
            configurationActivator.stop(bundleContext);
        }
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;
        bundleContext.getBundle().stop();
        bundleContext = null;
    }
View Full Code Here

                System.out.println("\nCould not communicate with the server.  The server may not be running or the port number may be incorrect.");
            }
            if (kernel != null) {
                System.out.println("Server found.");
                System.out.println("Server shutdown begun");
                kernel.shutdown();
                System.out.println("Server shutdown completed");
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
View Full Code Here

            // add our shutdown hook
            Runtime.getRuntime().addShutdownHook(new Thread("Geronimo shutdown thread") {
                public void run() {
                    System.out.println("\rServer shutdown begun              ");
                    kernel.shutdown();
                    System.out.println("Server shutdown completed");
                }
            });

            // load this configuration
View Full Code Here

                    try {
                        configs.addAll((List) kernel.invoke(configListName, "restore"));
                    } catch (IOException e) {
                        System.err.println("Unable to restore last known configurations");
                        e.printStackTrace();
                        kernel.shutdown();
                        System.exit(1);
                        throw new AssertionError();
                    }
                }
            }
View Full Code Here

                }
            } catch (Exception e) {
                //Exception caught when starting configurations, starting kernel shutdown
                monitor.serverStartFailed(e);
                try {
                    kernel.shutdown();
                } catch (Exception e1) {
                    System.err.println("Exception caught during kernel shutdown");
                    e1.printStackTrace();
                }
                System.exit(1);
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.