Package org.apache.geronimo.kernel

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


            } 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

                attribute.getValue();
                fail("This attribute is not readable; exception expected");
            } catch (/* IllegalArgument */Exception expected) {
            } finally {
                kernel.shutdown();
            }
        }

        {
            final DynamicGAttributeInfo dynamicAttributeInfo = new DynamicGAttributeInfo(MockDynamicGBean.MUTABLE_INT_ATTRIBUTE_NAME, true, true, true);
View Full Code Here

                final Integer one = new Integer(1);
                attribute.setValue(one);
                assertEquals(one, attribute.getValue());
            } finally {
                kernel.shutdown();
            }

        }
    }
View Full Code Here

                immutableAttribute.setValue(null);
                fail("This attribute is not writable; exception expected");
            } catch (/* IllegalArgument */Exception expected) {
            } finally {
                kernel.shutdown();
            }
        }

        // 4. (online) attribute that is mutable and of primitive type
        {
View Full Code Here

                mutablePersistentAttribute.setValue(null);
                fail("Cannot assign null to a primitive attribute; exception expected");
            } catch (/* IllegalArgument */Exception expected) {
            } finally {
                kernel.shutdown();
            }
        }

        // 4a. @todo BUG: It's possible to set a value to a persistent
        // attribute while online; IllegalStateException expected
View Full Code Here

                mutablePersistentAttribute.setValue(new Integer(4));
                //fail("Cannot assign a value to a persistent attribute while
                // online; exception expected");
            } catch (/* IllegalState */Exception expected) {
            } finally {
                kernel.shutdown();
            }
        }

        // 5. Invoke setValue so that exception is thrown
        {
View Full Code Here

                attribute.setValue(new Integer(4));
                fail("Exception expected upon setValue's call");
            } catch (/* IllegalState */Exception expected) {
            } finally {
                kernel.shutdown();
            }
        }
    }

    protected void setUp() throws Exception {
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

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.