Examples of loadGBean()


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

            assertRunning(kernel, serverInfoObjectName);

            ObjectName j2eeServerObjectName = NameFactory.getServerName(null, null, j2eeContext);
            GBeanData j2eeServerGBean = new GBeanData(j2eeServerObjectName, J2EEServerImpl.GBEAN_INFO);
            j2eeServerGBean.setReferencePatterns("ServerInfo", Collections.singleton(serverInfoObjectName));
            kernel.loadGBean(j2eeServerGBean, cl);
            kernel.startGBean(j2eeServerObjectName);
            assertRunning(kernel, j2eeServerObjectName);

            // load the configuration
            config.setAttribute("baseURL", unpackedDir.toURL());
View Full Code Here

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

            kernel.startGBean(j2eeServerObjectName);
            assertRunning(kernel, j2eeServerObjectName);

            // load the configuration
            config.setAttribute("baseURL", unpackedDir.toURL());
            kernel.loadGBean(config, cl);

            // start the configuration
            kernel.startRecursiveGBean(objectName);
            Set gb = kernel.listGBeans(JMXUtil.getObjectName("test:*"));
            for (Iterator iterator = gb.iterator(); iterator.hasNext();) {
View Full Code Here

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

                System.exit(2);
                throw new AssertionError();
            }

            // load this configuration into the kernel
            kernel.loadGBean(configuration, classLoader);
            kernel.setAttribute(configName, "baseURL", classLoader.getResource("/"));

            // add our shutdown hook
            Runtime.getRuntime().addShutdownHook(new Thread("Shutdown Thread") {
                public void run() {
View Full Code Here

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

            // add the jmx bridge
            ObjectName mbeanServerKernelBridgeName = new ObjectName("geronimo.boot:role=MBeanServerKernelBridge");
            GBeanData mbeanServerKernelBridge = new GBeanData(mbeanServerKernelBridgeName, MBeanServerKernelBridge.GBEAN_INFO);
            mbeanServerKernelBridge.setAttribute("mbeanServerId", mbeanServerId);
            kernel.loadGBean(mbeanServerKernelBridge, classLoader);
            kernel.startGBean(mbeanServerKernelBridgeName);

            // start this configuration
            kernel.startRecursiveGBean(configuration.getName());
            monitor.systemStarted(kernel);
View Full Code Here

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

        kernel.boot();
        AbstractName abstractName = kernel.getNaming().createRootName(new Artifact("test", "foo", "1", "car"), "test", "test");
        GBeanData mockGBean = new GBeanData(abstractName, MockGBean.getGBeanInfo());
        mockGBean.setAttribute("Name", "bar");
        mockGBean.setAttribute("FinalInt", new Integer(57));
        kernel.loadGBean(mockGBean, Speed.class.getClassLoader());
        kernel.startGBean(abstractName);

        // reflect proxy
//        ProxyFactory vmProxyFactory = new VMProxyFactory(MyInterface.class);
//        ProxyMethodInterceptor vmMethodInterceptor = vmProxyFactory.getMethodInterceptor();
View Full Code Here

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

        kernel.boot();
        AbstractName abstractName = kernel.getNaming().createRootName(new Artifact("test", "foo", "1", "car"), "test", "test");
        GBeanData mockGBean = new GBeanData(abstractName, MockGBean.getGBeanInfo());
        mockGBean.setAttribute("Name", "bar");
        mockGBean.setAttribute("FinalInt", new Integer(57));
        kernel.loadGBean(mockGBean, Speed.class.getClassLoader());
        kernel.startGBean(mockGBean.getAbstractName());

        // reflect proxy
//        ProxyFactory vmProxyFactory = new VMProxyFactory(MyInterface.class);
//        ProxyMethodInterceptor vmMethodInterceptor = vmProxyFactory.getMethodInterceptor();
View Full Code Here

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

        kernel.boot();
        AbstractName abstractName = kernel.getNaming().createRootName(new Artifact("test", "foo", "1", "car"), "test", "test");
        GBeanData mockGBean = new GBeanData(abstractName, MockGBean.getGBeanInfo());
        mockGBean.setAttribute("Name", "bar");
        mockGBean.setAttribute("FinalInt", new Integer(57));
        kernel.loadGBean(mockGBean, Speed.class.getClassLoader());
        kernel.startGBean(abstractName);

        // reflect proxy
//        ProxyFactory vmProxyFactory = new VMProxyFactory(MyInterface.class);
//        ProxyMethodInterceptor vmMethodInterceptor = vmProxyFactory.getMethodInterceptor();
View Full Code Here

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

        kernel.boot();
        AbstractName abstractName = kernel.getNaming().createRootName(new Artifact("test", "foo", "1", "car"), "test", "test");
        GBeanData mockGBean = new GBeanData(abstractName, MockGBean.getGBeanInfo());
        mockGBean.setAttribute("Name", "bar");
        mockGBean.setAttribute("FinalInt", new Integer(57));
        kernel.loadGBean(mockGBean, Speed.class.getClassLoader());
        kernel.startGBean(mockGBean.getAbstractName());

        // reflect proxy
//        ProxyFactory vmProxyFactory = new VMProxyFactory(MyInterface.class);
//        ProxyMethodInterceptor vmMethodInterceptor = vmProxyFactory.getMethodInterceptor();
View Full Code Here

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

                    ClassLoader oldCL=connector.getClass().getClassLoader();
                    kernel.stopGBean(connectorName);
                    kernel.unloadGBean(connectorName);
                   
                   
                    kernel.loadGBean(connectorGBeanData, oldCL);
                    kernel.startGBean(connectorName);
                 
                } catch (Exception e) {
                    log.error("Unable to reload updated connector:"+connectorName.toURI(), e);
                }
View Full Code Here

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

        kernel.boot();
        AbstractName abstractName = new AbstractName(URI.create("foo/bar/1/car?name=ConnectionManager"));
        GBeanData data = new GBeanData(abstractName, GenericConnectionManagerGBean.class);
        data.setAttribute("transactionSupport", NoTransactions.INSTANCE);
        data.setAttribute("pooling", new SinglePool(10, 0, 5000, 5, false, false, true));
        kernel.loadGBean(data, this.getClass().getClassLoader());
        kernel.startGBean(abstractName);
        Object cm = kernel.getGBean(abstractName);
        assertTrue(cm instanceof GenericConnectionManagerGBean);
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        ObjectOutputStream out = new ObjectOutputStream(baos);
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.