Examples of listGBeans()


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

    {
        try
        {
            Kernel kernel = KernelRegistry.getSingleKernel();
            AbstractNameQuery query = new AbstractNameQuery(TransactionManager.class.getName ());
            Set<AbstractName> names = kernel.listGBeans(query);

            if (names.size() != 1)
            {
                throw new IllegalStateException("Expected one transaction manager, not " + names.size());
            }
View Full Code Here

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

        Kernel kernel = null;
        if (dm instanceof RemoteDeploymentManager) {
            kernel = ((RemoteDeploymentManager) dm).getKernel();
        }
        AbstractNameQuery anq= new AbstractNameQuery("org.apache.geronimo.management.geronimo.KeystoreManager");
        Set<AbstractName> it=kernel.listGBeans(anq);
        AbstractName an = (AbstractName) it.iterator().next();
        try {
            kernel.invoke(an, "initializeKeystores");
        } catch (GBeanNotFoundException e1) {
            throw new DeploymentException("Unable to find the gbean associated with initializeKeystores");
View Full Code Here

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

    public synchronized PluginInstaller getPluginInstaller() throws IOException {
        if (pluginInstaller != null) {
            return pluginInstaller;
        }
        Kernel kernel = newKernel();
        Set<AbstractName> set = kernel.listGBeans(new AbstractNameQuery(PluginInstaller.class.getName()));
        for (AbstractName name : set) {
            pluginInstaller = kernel.getProxyManager().createProxy(name, PluginInstaller.class);
            return pluginInstaller;
        }
        throw new IllegalStateException("No plugin installer found");
View Full Code Here

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

    public synchronized ConfigurationManager getConfigurationManager() throws IOException {
        if (configurationManager != null) {
            return configurationManager;
        }
        Kernel kernel = newKernel();
        Set<AbstractName> set = kernel.listGBeans(new AbstractNameQuery(ConfigurationManager.class.getName()));
        for (AbstractName name : set) {
            configurationManager = kernel.getProxyManager().createProxy(name, ConfigurationManager.class);
            return configurationManager;
        }
        throw new IllegalStateException("No plugin installer found");
View Full Code Here

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

        Kernel kernel = null;
        if (dm instanceof RemoteDeploymentManager) {
            kernel = ((RemoteDeploymentManager) dm).getKernel();
        }
        AbstractNameQuery anq = new AbstractNameQuery("org.apache.geronimo.management.geronimo.KeystoreManager");
        Set<AbstractName> it = kernel.listGBeans(anq);
        AbstractName an = (AbstractName) it.iterator().next();
        try {
            kernel.invoke(an, "initializeKeystores");
        } catch (GBeanNotFoundException e1) {
            throw new DeploymentException("Unable to find the gbean associated with initializeKeystores");
View Full Code Here

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

            Kernel kernel = KernelRegistry.getKernel(kernelName);
            Map<String, String> nameMap = new HashMap<String, String>();
            nameMap.put("name", dataSourceName);
            nameMap.put("J2EEApplication", dataSourceAppName);
            nameMap.put("j2eeType", "JCAConnectionManager");
            Set<AbstractName> set = kernel.listGBeans(new AbstractNameQuery(null, nameMap));
            for (AbstractName name : set) {
                try {
                    dataSource = (DataSource) kernel.invoke(name, "createConnectionFactory");
                    break;
                } catch (GBeanNotFoundException e) {
View Full Code Here

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

            } else {
                dataSourceAppName = dataSourceAppName.trim();
            }
            String kernelName = (String) options.get(JaasLoginModuleUse.KERNEL_NAME_LM_OPTION);
            Kernel kernel = KernelRegistry.getKernel(kernelName);
            Set<AbstractName> set = kernel.listGBeans(new AbstractNameQuery(JCAManagedConnectionFactory.class.getName()));
            JCAManagedConnectionFactory factory;
            for (AbstractName name : set) {
                if (name.getName().get(NameFactory.J2EE_APPLICATION).equals(dataSourceAppName) &&
                        name.getName().get(NameFactory.J2EE_NAME).equals(dataSourceName)) {
                    try {
View Full Code Here

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

            } else {
                dataSourceAppName = dataSourceAppName.trim();
            }
            String kernelName = (String) options.get(JaasLoginModuleUse.KERNEL_NAME_LM_OPTION);
            Kernel kernel = KernelRegistry.getKernel(kernelName);
            Set set = kernel.listGBeans(new AbstractNameQuery(JCAManagedConnectionFactory.class.getName()));
            JCAManagedConnectionFactory factory;
            for (Iterator it = set.iterator(); it.hasNext();) {
                AbstractName name = (AbstractName) it.next();
                if(name.getName().get(NameFactory.J2EE_APPLICATION).equals(dataSourceAppName) &&
                    name.getName().get(NameFactory.J2EE_NAME).equals(dataSourceName)) {
View Full Code Here

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

            AbstractNameQuery query = new AbstractNameQuery(PersistentConfigurationList.class.getName());

            if (configs.isEmpty()) {
                // --override wasn't used (nothing explicit), see what was running before
                Set configLists = kernel.listGBeans(query);
                for (Iterator i = configLists.iterator(); i.hasNext();) {
                    AbstractName configListName = (AbstractName) i.next();
                    try {
                        configs.addAll((List) kernel.invoke(configListName, "restore"));
                    } catch (IOException e) {
View Full Code Here

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

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

            // Tell every persistent configuration list that the kernel is now fully started
            Set configLists = kernel.listGBeans(query);
            for (Iterator i = configLists.iterator(); i.hasNext();) {
                AbstractName configListName = (AbstractName) i.next();
                kernel.setAttribute(configListName, "kernelFullyStarted", Boolean.TRUE);
            }
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.