Package org.apache.geronimo.kernel

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


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

            // load the configuration
            config.setAttribute("baseURL", unpackedDir.toURL());
            kernel.loadGBean(config, cl);
            kernel.startGBean(configName);
            kernel.invoke(configName, "loadGBeans", new Object[] {null}, new String[] {ManageableAttributeStore.class.getName()});
            kernel.invoke(configName, "startRecursiveGBeans");
            Set gb = kernel.listGBeans(JMXUtil.getObjectName("test:*"));
            for (Iterator iterator = gb.iterator(); iterator.hasNext();) {
View Full Code Here

        Kernel kernel = KernelFactory.newInstance().createKernel("foo");
        try {
            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());

            GBeanData configurationManagerData = new GBeanData(configurationManagerName, ConfigurationManagerImpl.GBEAN_INFO);
            configurationManagerData.setReferencePatterns("Stores", Collections.singleton(store.getName()));
            kernel.loadGBean(configurationManagerData, getClass().getClassLoader());
View Full Code Here

            kernel.loadGBean(store, this.getClass().getClassLoader());
            kernel.startGBean(store.getName());

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

            rarFile = DeploymentUtil.createJarFile(new File(basedir, "target/test-ear-noger.ear"));
            EARConfigBuilder configBuilder = new EARConfigBuilder(defaultParentId, null, connectionTrackerName, null, null, null, null, null, ejbReferenceBuilder, null, new ConnectorModuleBuilder(defaultParentId, defaultMaxSize, defaultMinSize, defaultBlockingTimeoutMilliseconds, defaultidleTimeoutMinutes, defaultXATransactionCaching, defaultXAThreadCaching, repository, kernel), resourceReferenceBuilder, null, serviceReferenceBuilder, kernel);
            File tempDir = null;
View Full Code Here

        Kernel kernel = KernelFactory.newInstance().createKernel("foo");
        try {
            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());

            GBeanData configurationManagerData = new GBeanData(configurationManagerName, ConfigurationManagerImpl.GBEAN_INFO);
            configurationManagerData.setReferencePatterns("Stores", Collections.singleton(store.getName()));
            kernel.loadGBean(configurationManagerData, getClass().getClassLoader());
View Full Code Here

            kernel.loadGBean(store, this.getClass().getClassLoader());
            kernel.startGBean(store.getName());

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

            ConnectorModuleBuilder moduleBuilder = new ConnectorModuleBuilder(defaultParentId, defaultMaxSize, defaultMinSize, defaultBlockingTimeoutMilliseconds, defaultidleTimeoutMinutes, defaultXATransactionCaching, defaultXAThreadCaching, repository, kernel);
            File rarFile = action.getRARFile();
View Full Code Here

            kernel = KernelFactory.newInstance().createKernel("bar");
            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());

            GBeanData configurationManagerData = new GBeanData(configurationManagerName, ConfigurationManagerImpl.GBEAN_INFO);
            configurationManagerData.setReferencePatterns("Stores", Collections.singleton(store.getName()));
            kernel.loadGBean(configurationManagerData, getClass().getClassLoader());
View Full Code Here

            kernel.loadGBean(store, this.getClass().getClassLoader());
            kernel.startGBean(store.getName());

            GBeanData configurationManagerData = new GBeanData(configurationManagerName, ConfigurationManagerImpl.GBEAN_INFO);
            configurationManagerData.setReferencePatterns("Stores", Collections.singleton(store.getName()));
            kernel.loadGBean(configurationManagerData, getClass().getClassLoader());
            kernel.startGBean(configurationManagerName);
            ConfigurationManager configurationManager = (ConfigurationManager) kernel.getProxyManager().createProxy(configurationManagerName, ConfigurationManager.class);

            configurationManager.load(defaultParentId[0]);
            configurationManager.loadGBeans(defaultParentId[0]);
View Full Code Here

        kernel.boot();
        AbstractName abstractName = new AbstractName(URI.create("foo/bar/1/car?name=ConnectionManager"));
        GBeanData data = new GBeanData(abstractName, GenericConnectionManagerGBean.GBEAN_INFO);
        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

        kernel.boot();
        GBeanMBean mockGBean = new GBeanMBean(MockGBean.getGBeanInfo(), Speed.class.getClassLoader());
        mockGBean.setAttribute("Name", "bar");
        mockGBean.setAttribute("FinalInt", new Integer(57));
        ObjectName objectName = new ObjectName("speed:type=MockGBean");
        kernel.loadGBean(objectName, mockGBean);
        kernel.startGBean(objectName);

        // 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.