Examples of listGBeans()


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

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()

            } 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("J2EEApplication").equals(dataSourceAppName) &&
                        name.getName().get("name").equals(dataSourceName)) {
                    try {
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()

            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()

        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 List getDestinationList(RenderRequest request,
            RenderResponse response) {
        Kernel kernel = KernelRegistry.getSingleKernel();

        Set destinations = kernel.listGBeans(new AbstractNameQuery(Destination.class.getName()));
        List destinationInfos = new ArrayList(destinations.size());
        DependencyManager dm = kernel.getDependencyManager();
        for (Iterator iterator = destinations.iterator(); iterator.hasNext();) {
            AbstractName destinationName = (AbstractName) iterator.next();
View Full Code Here

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

     */
    public static CertificateStore getCertificateStore() {
        Kernel kernel = KernelRegistry.getSingleKernel();
       
        AbstractNameQuery certStoreQuery = new AbstractNameQuery(org.apache.geronimo.management.geronimo.CertificateStore.class.getName());
        Set set = kernel.listGBeans(certStoreQuery);
        try {
            CertificateStore certStore = (CertificateStore)kernel.getGBean((AbstractName)set.iterator().next());
            return certStore;
        } catch(Exception e) {
            e.printStackTrace();
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.