Examples of listGBeans()


Examples of org.apache.geronimo.deployment.DeploymentContext.listGBeans()

        try {
            DeploymentContext context = new DeploymentContext(outFile, URI.create("foo/bar"), ConfigurationModuleType.SERVICE, parentId, "domain", "server", null);
            J2eeContext j2eeContext = new J2eeContextImpl("domain", "server", "null", "test", "configtest", "foo", NameFactory.J2EE_MODULE);
            GbeanType[] gbeans = plan.getGbeanArray();
            ServiceConfigBuilder.addGBeans(gbeans, cl, j2eeContext, context);
            Set beanDatas = context.listGBeans(new ObjectName("*:*"));
            assertEquals(1, beanDatas.size());
            ObjectName beanName = (ObjectName) beanDatas.iterator().next();
            GBeanData data = context.getGBeanInstance(beanName);
            FooBarBean fooBarBean = (FooBarBean) data.getAttribute("fooBarBean");
            assertNotNull(fooBarBean);
View Full Code Here

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

            config.setAttribute("baseURL", unpackedDir.toURL());
            kernel.loadGBean(config, cl);

            // start the configuration
            kernel.startRecursiveGBean(objectName);
            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

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

            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

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

    public List getDestinationList(RenderRequest request,
            RenderResponse response) {
        Kernel kernel = KernelRegistry.getSingleKernel();

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

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

            kernel.startRecursiveGBean(configuration.getName());
            monitor.systemStarted(kernel);

            if (configs.isEmpty()) {
                // nothing explicit, see what was running before
                Set configLists = kernel.listGBeans(PERSISTENT_CONFIGURATION_LIST_NAME_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

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

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

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

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

     */
    public static int getHttpsClientAuthPort() {
        Kernel kernel = KernelRegistry.getSingleKernel();
       
        AbstractNameQuery connectorQuery = new AbstractNameQuery(SecureConnector.class.getName());
        Set set = kernel.listGBeans(connectorQuery);
        for(Iterator itr = set.iterator(); itr.hasNext(); ){
            try {
                SecureConnector connector = (SecureConnector)kernel.getGBean((AbstractName)itr.next());
                if(connector.isClientAuthRequired())
                    return connector.getPort();
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
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.