Examples of loadGBean()


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, getBundleContext());
        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, getBundleContext());
        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()

                try {
                    Kernel kernel = PortletManager.getKernel();
                    BundleContext bundleContext = kernel.getBundleFor(connectorName).getBundleContext();
                    kernel.stopGBean(connectorName);
                    kernel.unloadGBean(connectorName);
                    kernel.loadGBean(connectorGBeanData, bundleContext);
                    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();
        ObjectName objectName = new ObjectName("speed:type=MockGBean");
        GBeanData mockGBean = new GBeanData(objectName, MockGBean.getGBeanInfo());
        mockGBean.setAttribute("Name", "bar");
        mockGBean.setAttribute("FinalInt", new Integer(57));
        kernel.loadGBean(mockGBean, Speed.class.getClassLoader());
        kernel.startGBean(objectName);

        // 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();
        ObjectName objectName = new ObjectName("speed:type=MockGBean");
        GBeanData mockGBean = new GBeanData(objectName, MockGBean.getGBeanInfo());
        mockGBean.setAttribute("Name", "bar");
        mockGBean.setAttribute("FinalInt", new Integer(57));
        kernel.loadGBean(mockGBean, Speed.class.getClassLoader());
        kernel.startGBean(objectName);

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

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

        try {
            assertEquals(kernel, KernelRegistry.getKernel("test.kernel"));
            ObjectName proxyFactoryName = null;//referenceFactory.createAdminObjectObjectName("testAdminObject");
            GBeanData gbean = new GBeanData(proxyFactoryName, getGbeanInfo());
            gbean.setAttribute("Content", proxy);
            kernel.loadGBean(gbean, Class.forName(gbean.getGBeanInfo().getClassName()).getClassLoader());
            kernel.startGBean(proxyFactoryName);
            Object o = context.lookup("env/resourceenvref");
            assertEquals(proxy, o);
        } finally {
            kernel.shutdown();
View Full Code Here

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

    public void testBuildConfiguration() throws Exception {
        Kernel kernel = KernelFactory.newInstance().createKernel("foo");
        kernel.boot();

        GBeanData store = new GBeanData(JMXUtil.getObjectName("foo:j2eeType=ConfigurationStore,name=mock"), MockConfigStore.GBEAN_INFO);
        kernel.loadGBean(store, this.getClass().getClassLoader());
        kernel.startGBean(store.getName());

        ObjectName configurationManagerName = new ObjectName(":j2eeType=ConfigurationManager,name=Basic");
        GBeanData configurationManagerData = new GBeanData(configurationManagerName, ConfigurationManagerImpl.GBEAN_INFO);
        configurationManagerData.setReferencePatterns("Stores", Collections.singleton(store.getName()));
View Full Code Here

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

        kernel.startGBean(store.getName());

        ObjectName configurationManagerName = new ObjectName(":j2eeType=ConfigurationManager,name=Basic");
        GBeanData configurationManagerData = new GBeanData(configurationManagerName, ConfigurationManagerImpl.GBEAN_INFO);
        configurationManagerData.setReferencePatterns("Stores", Collections.singleton(store.getName()));
        kernel.loadGBean(configurationManagerData, getClass().getClassLoader());
        kernel.startGBean(configurationManagerName);

        EARConfigBuilder configBuilder = new EARConfigBuilder(defaultParentId, transactionManagerObjectName, connectionTrackerObjectName, transactionalTimerObjectName, nonTransactionalTimerObjectName, null, null, ejbConfigBuilder, ejbConfigBuilder, webConfigBuilder, connectorConfigBuilder, resourceReferenceBuilder, appClientConfigBuilder, serviceReferenceBuilder, kernel);

        File tempDir = null;
View Full Code Here

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

                    try {
                        Kernel kernel = PortletManager.getKernel();
                        BundleContext bundleContext = kernel.getBundleFor(connectorName).getBundleContext();
                        kernel.stopGBean(connectorName);
                        kernel.unloadGBean(connectorName);
                        kernel.loadGBean(connectorGBeanData, bundleContext);
                        kernel.startGBean(connectorName);
                    } catch (Exception e) {
                        log.error("Unable to reload updated connector:" + connectorName.toURI(), e);
                        actionResponse.setRenderParameter("toBeUpdatedConnectorName", toBeUpdatedConnectorName);
                        addErrorMessage(actionRequest, getLocalizedString(actionRequest, "consolebase.errorMsg25", toBeUpdatedConnectorName));
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
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.