Package org.apache.geronimo.kernel

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


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

            // Tell every persistent configuration list that the kernel is now fully started
            Set configLists = kernel.listGBeans(JMXUtil.getObjectName("*:role=PersistentConfigurationList,*"));
            for (Iterator i = configLists.iterator(); i.hasNext();) {
                ObjectName configListName = (ObjectName) i.next();
                kernel.setAttribute(configListName, "kernelFullyStarted", Boolean.TRUE);
            }

View Full Code Here


        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

        Map map = Collections.singletonMap("j2eeType", "GBean");
        AbstractNameQuery query = new AbstractNameQuery(null, map,
                Collections.EMPTY_SET);
        for (int i = 0; i < kernels.size(); i++) {
          Kernel kernel = (Kernel)kernels.get(i);
            Set beans = kernel.listGBeans(query);
            for (Iterator it = beans.iterator(); it.hasNext();) {
                AbstractName abstractName = (AbstractName) it.next();
                try {
                    GBeanInfo info = kernel.getGBeanInfo(abstractName);
                    GAttributeInfo attribInfo = info
View Full Code Here

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

            GBeanQuery query = new GBeanQuery(null, 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();) {
                    ObjectName configListName = (ObjectName) i.next();
                    try {
                        configs.addAll((List) kernel.invoke(configListName, "restore"));
                    } catch (IOException e) {
View Full Code Here

                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();) {
                ObjectName configListName = (ObjectName) i.next();
                kernel.setAttribute(configListName, "kernelFullyStarted", Boolean.TRUE);
            }
View Full Code Here

            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();) {
                ObjectName name = (ObjectName) iterator.next();
                if (State.RUNNING_INDEX != kernel.getGBeanState(name)) {
                    System.out.println("Not running: " + name);
                }
View Full Code Here

            ObjectName applicationObjectName = NameFactory.getApplicationName(null, null, null, j2eeContext);
            if (!j2eeContext.getJ2eeApplicationName().equals("null")) {
                assertRunning(kernel, applicationObjectName);
            } else {
                Set applications = kernel.listGBeans(applicationObjectName);
                assertTrue("No application object should be registered for a standalone module", applications.isEmpty());
            }

            ObjectName moduleName = NameFactory.getModuleName(null, null, null, NameFactory.RESOURCE_ADAPTER_MODULE, null, j2eeContext);
            assertRunning(kernel, moduleName);
View Full Code Here

    public static TransactionManager getTransactionManager() {
        if (transactionManager == null) {
            try {
                Kernel kernel = KernelRegistry.getSingleKernel();
                AbstractNameQuery query = new AbstractNameQuery(TransactionManager.class.getName());
                Set gbeans = kernel.listGBeans(query);
                if (gbeans != null && !gbeans.isEmpty()) {
                    AbstractName name = (AbstractName)gbeans.iterator().next();
                    transactionManager = (TransactionManager)kernel.getGBean(name);
                    LOG.debug("TransactionManager: " + transactionManager);
                } else {
View Full Code Here

            } 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

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.