Package org.apache.geronimo.gbean

Examples of org.apache.geronimo.gbean.AbstractNameQuery


     * This method returns the CertificateStore.
     */
    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) {
View Full Code Here


     * @return -1 if no HTTPS Client Authentication Connector is configured.
     */
    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())
View Full Code Here

        kernel.loadGBean(gbean, ServerInfo.class.getClassLoader());
        kernel.startGBean(serverInfo);

        gbean = buildGBeanData("new", "LoginConfiguration", GeronimoLoginConfiguration.getGBeanInfo());
        loginConfiguration = gbean.getAbstractName();
        gbean.setReferencePattern("Configurations", new AbstractNameQuery(ConfigurationEntryFactory.class.getName()));
        kernel.loadGBean(gbean, GeronimoLoginConfiguration.class.getClassLoader());

        gbean = buildGBeanData("name", "PropertiesLoginModule", LoginModuleGBean.getGBeanInfo());
        testProperties = gbean.getAbstractName();
        gbean.setAttribute("loginModuleClass", "org.apache.geronimo.security.realm.providers.PropertiesFileLoginModule");
View Full Code Here

    private final LifecycleBridge lifecycleBridge;

    public MBeanGBeanBridge(Kernel kernel, AbstractName abstractName, ObjectName objectName, MBeanInfo mbeanInfo) {
        this.kernel = kernel;
        this.abstractName = abstractName;
        this.pattern = new AbstractNameQuery(abstractName);
        this.mbeanInfo = mbeanInfo;
        this.objectName = objectName;
        lifecycleBridge = new LifecycleBridge(abstractName, objectName, notificationBroadcaster);
    }
View Full Code Here

    public boolean isFullyStarted() {
        boolean fullyStarted = true;

        try {
            AbstractNameQuery query = new AbstractNameQuery(PersistentConfigurationList.class.getName());
            Set result = listGBeans(query);
            Iterator iter = result.iterator();
            while (iter.hasNext()) {
                AbstractName name = (AbstractName)iter.next();
                boolean started = getBooleanAttribute(name, "kernelFullyStarted");
View Full Code Here

            GBeanResourceEnvironmentBuilder rebuilder = new GBeanResourceEnvironmentBuilder(webModuleData);
            //N.B. use earContext not moduleContext
            resourceEnvironmentSetter.setResourceEnvironment(rebuilder, webApp.getResourceRefArray(), tomcatWebApp.getResourceRefArray());

            if (tomcatWebApp.isSetWebContainer()) {
                AbstractNameQuery webContainerName = ENCConfigBuilder.getGBeanQuery(NameFactory.GERONIMO_SERVICE, tomcatWebApp.getWebContainer());
                webModuleData.setReferencePattern("Container", webContainerName);
            } else {
                webModuleData.setReferencePattern("Container", tomcatContainerName);
            }
            // Process the Tomcat container-config elements
View Full Code Here

            kernel.getProxyManager().destroyProxy(installer);
        }
    }

    private PluginInstaller getPluginInstaller() {
        Set<AbstractName> set = kernel.listGBeans(new AbstractNameQuery(PluginInstaller.class.getName()));
        for (AbstractName name : set) {
            return (PluginInstaller) kernel.getProxyManager().createProxy(name, PluginInstaller.class);
        }
        throw new IllegalStateException("No plugin installer found");
    }
View Full Code Here

            return (PluginInstaller) kernel.getProxyManager().createProxy(name, PluginInstaller.class);
        }
        throw new IllegalStateException("No plugin installer found");
    }
    private ServerArchiver getServerArchiver() {
        Set<AbstractName> set = kernel.listGBeans(new AbstractNameQuery(ServerArchiver.class.getName()));
        for (AbstractName name : set) {
            return (ServerArchiver) kernel.getProxyManager().createProxy(name, ServerArchiver.class);
        }
        throw new IllegalStateException("No plugin installer found");
    }
View Full Code Here

        }
    }

    public URL[] getRepositories() {
        List<URL> list = new ArrayList<URL>();
        Set<AbstractName> set = kernel.listGBeans(new AbstractNameQuery(PluginRepositoryList.class.getName()));
        for (AbstractName name : set) {
            PluginRepositoryList repo = (PluginRepositoryList) kernel.getProxyManager().createProxy(name,
                    PluginRepositoryList.class);
            list.addAll(repo.getRepositories());
            kernel.getProxyManager().destroyProxy(repo);
View Full Code Here

                }
            });
            progress.setCommandContext(commandContext);
            RemoteDeployUtil.uploadFilesToServer(args, progress);
        }
        Set<AbstractName> set = kernel.listGBeans(new AbstractNameQuery(PluginInstaller.class.getName()));
        for (AbstractName name : set) {
            PluginInstaller installer = (PluginInstaller) kernel.getProxyManager().createProxy(name, PluginInstaller.class);
            // make sure to pass args[0] as RemoteDeployUtil.uploadFilesToServer will update
            // the args argument with the filenames returned from the server
            Artifact artifact = installer.installLibrary(args[0], groupId);
View Full Code Here

TOP

Related Classes of org.apache.geronimo.gbean.AbstractNameQuery

Copyright © 2018 www.massapicom. 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.