Package org.apache.geronimo.kernel

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


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


                    JDBCUtil.close(connection);
                }
            }

            if (kernel != null) {
                kernel.shutdown();
            }
            Thread.currentThread().setContextClassLoader(cl);
        }
    }
View Full Code Here

                    JDBCUtil.close(connection);
                }
            }

            if (kernel != null) {
                kernel.shutdown();
            }
            Thread.currentThread().setContextClassLoader(cl);
        }
    }
View Full Code Here

                configBuilder.buildConfiguration(plan, rarFile, tempDir);
            } finally {
                DeploymentUtil.recursiveDelete(tempDir);
            }
        } finally {
            kernel.shutdown();
            DeploymentUtil.close(rarFile);
        }
    }

View Full Code Here

        return kernelName;
    }

    public void execute() throws Exception {
        Kernel kernel = Kernel.getKernel(getKernelName());
        kernel.shutdown();
    }

    public void setKernelName(String kernelName) {
        this.kernelName = kernelName;
    }
View Full Code Here

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

    public void testEmptyEnvironment() {
        ReadOnlyContext context = builder.getContext();
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

            ConfigurationManager configurationManager = kernel.getConfigurationManager();
            configurationManager.load(configuration, classLoader.getResource("/"), classLoader);
            Runtime.getRuntime().addShutdownHook(new Thread("Shutdown Thread") {
                public void run() {
                    log.info("Server shutdown begun");
                    kernel.shutdown();
                    log.info("Server shutdown completed");
                }
            });

            // start 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(3);
                        throw new AssertionError();
                    }
                }
            }
View Full Code Here

                        kernel.startRecursiveGBean(name);
                    }
                }
            } catch (Exception e) {
                try {
                    kernel.shutdown();
                } catch (Exception e1) {
                    e1.printStackTrace();
                }
                e.printStackTrace();
                System.exit(3);
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.