Examples of GBeanQuery


Examples of org.apache.geronimo.gbean.GBeanQuery

     * Gets the ObjectNames of any existing connectors for this network technology for the specified protocol.
     *
     * @param protocol A protocol as returned by getSupportedProtocols
     */
    public String[] getConnectors(String protocol) {
        GBeanQuery query = new GBeanQuery(null, TomcatWebConnector.class.getName());
        Set names = kernel.listGBeans(query);
        List result = new ArrayList();
        for (Iterator it = names.iterator(); it.hasNext();) {
            ObjectName name = (ObjectName) it.next();
            try {
View Full Code Here

Examples of org.apache.geronimo.gbean.GBeanQuery

        }
        return (String[]) result.toArray(new String[result.size()]);
    }

    public String getAccessLog(String containerObjectName) {
        GBeanQuery query = new GBeanQuery(null, TomcatLogManager.class.getName());
        Set names = kernel.listGBeans(query);
        if(names.size() == 0) {
            return null;
        } else if(names.size() > 1) {
            throw new IllegalStateException("Should not be more than one Tomcat access log manager");
View Full Code Here

Examples of org.apache.geronimo.gbean.GBeanQuery

    /**
     * Gets the ObjectNames of any existing connectors associated with this network technology.
     */
    public String[] getConnectors() {
        GBeanQuery query = new GBeanQuery(null, TomcatWebConnector.class.getName());
        Set names = kernel.listGBeans(query);
        String[] result = new String[names.size()];
        int i=0;
        for (Iterator it = names.iterator(); it.hasNext();) {
            ObjectName name = (ObjectName) it.next();
View Full Code Here

Examples of org.apache.geronimo.gbean.GBeanQuery

            return getConnectorsForContainer(containerObjectName);
        }
        try {
            ObjectName containerName = ObjectName.getInstance(containerObjectName);
            List results = new ArrayList();
            GBeanQuery query = new GBeanQuery(null, TomcatWebConnector.class.getName());
            Set set = kernel.listGBeans(query); // all Jetty connectors
            for (Iterator it = set.iterator(); it.hasNext();) {
                ObjectName name = (ObjectName) it.next(); // a single Jetty connector
                GBeanData data = kernel.getGBeanData(name);
                Set refs = data.getReferencePatterns(ConnectorGBean.CONNECTOR_CONTAINER_REFERENCE);
View Full Code Here

Examples of org.apache.geronimo.gbean.GBeanQuery

     */
    public String[] getConnectorsForContainer(String containerObjectName) {
        try {
            ObjectName containerName = ObjectName.getInstance(containerObjectName);
            List results = new ArrayList();
            GBeanQuery query = new GBeanQuery(null, TomcatWebConnector.class.getName());
            Set set = kernel.listGBeans(query); // all Jetty connectors
            for (Iterator it = set.iterator(); it.hasNext();) {
                ObjectName name = (ObjectName) it.next(); // a single Jetty connector
                GBeanData data = kernel.getGBeanData(name);
                Set refs = data.getReferencePatterns(ConnectorGBean.CONNECTOR_CONTAINER_REFERENCE);
View Full Code Here

Examples of org.apache.geronimo.gbean.GBeanQuery

            } 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

Examples of org.apache.geronimo.gbean.GBeanQuery

     *       module should obviously be dependent on the other and it's not
     *       clear that this belongs in geronimo-common
     */
    public static Map mapContainersToURLs(Kernel kernel) throws Exception {
        Map containers = new HashMap();
        Set set = kernel.listGBeans(new GBeanQuery(null, "org.apache.geronimo.management.geronimo.WebManager"));
        for (Iterator it = set.iterator(); it.hasNext();) {
            ObjectName mgrName = (ObjectName) it.next();
            String[] cntNames = (String[]) kernel.getAttribute(mgrName, "containers");
            for (int i = 0; i < cntNames.length; i++) {
                String cntName = cntNames[i];
View Full Code Here

Examples of org.apache.geronimo.gbean.GBeanQuery

            // start this configuration
            kernel.invoke(configName, "loadGBeans", new Object[]{null}, new String[]{ManageableAttributeStore.class.getName()});
            kernel.invoke(configName, "startRecursiveGBeans");
            monitor.systemStarted(kernel);

            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();) {
View Full Code Here

Examples of org.apache.geronimo.gbean.GBeanQuery

    public String[] getJavaVMs() {
        return Util.getObjectNames(kernel, baseName, new String[]{"JVM"});
    }

    public String[] getWebManagers() {
        GBeanQuery query = new GBeanQuery(null, WebManager.class.getName());
        Set set = kernel.listGBeans(query);
        if(set.size() == 0) {
            return null;
        }
        String[] results = new String[set.size()];
View Full Code Here

Examples of org.apache.geronimo.gbean.GBeanQuery

        }
        return results;
    }

    public String[] getEJBManagers() {
        GBeanQuery query = new GBeanQuery(null, EJBManager.class.getName());
        Set set = kernel.listGBeans(query);
        if(set.size() == 0) {
            return null;
        }
        String[] results = new String[set.size()];
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.