Examples of EditableConfigurationManager


Examples of org.apache.geronimo.kernel.config.EditableConfigurationManager

        } catch (URISyntaxException e) {
            throw new IllegalStateException("Can't resolve keystore path: "+e.getMessage());
        }
        data.setReferencePattern("ServerInfo", kernel.getAbstractNameFor(serverInfo));
        data.setAttribute("keystoreName", name);
        EditableConfigurationManager mgr = ConfigurationUtil.getEditableConfigurationManager(kernel);
        if(mgr != null) {
            try {
                mgr.addGBeanToConfiguration(myName.getArtifact(), data, true);
                return (KeystoreInstance) kernel.getProxyManager().createProxy(aName, KeystoreInstance.class);
            } catch (InvalidConfigException e) {
                log.error("Should never happen", e);
                throw new IllegalStateException("Unable to add Keystore GBean ("+e.getMessage()+")");
            } finally {
View Full Code Here

Examples of org.apache.geronimo.kernel.config.EditableConfigurationManager

        throw new RuntimeException("not implemented");
   }
   
    public JMSBroker addBroker(String brokerName, GBeanData brokerGBeanData) throws KernelException,
            InvalidConfigException {
        EditableConfigurationManager mgr = ConfigurationUtil.getEditableConfigurationManager(kernel);
        if (mgr != null) {
            AbstractName brokerAbstractName = null;
            try {
                mgr.addGBeanToConfiguration(kernel.getAbstractNameFor(this).getArtifact(), brokerGBeanData, false);
                brokerAbstractName = brokerGBeanData.getAbstractName();
                return (JMSBroker) kernel.getProxyManager().createProxy(brokerAbstractName,
                        ActiveMQBroker.class.getClassLoader());
            } catch (InvalidConfigException e) {
                log.error("Unable to add ActiveMQ broker [" + brokerName + "]", e);
View Full Code Here

Examples of org.apache.geronimo.kernel.config.EditableConfigurationManager

            return null;
        }
    }

    public void removeBroker(AbstractName brokerAbstractName) throws KernelException, InvalidConfigException {
        EditableConfigurationManager mgr = ConfigurationUtil.getEditableConfigurationManager(kernel);
        if (mgr != null) {
            try {
                mgr.removeGBeanFromConfiguration(brokerAbstractName.getArtifact(), brokerAbstractName);
            } catch (InvalidConfigException e) {
                log.error("Unable to remove ActiveMQ broker [" + brokerAbstractName + "]", e);
                throw e;
            } catch (GBeanNotFoundException e) {
                log.error("Fail to get ActiveMQ broker from kernel [" + brokerAbstractName + "]");
View Full Code Here

Examples of org.apache.geronimo.kernel.config.EditableConfigurationManager

                type = name.substring(name.lastIndexOf(".")+1);
                log.warn("keystoreType for new keystore \""+name+"\" set to \""+type+"\" based on file extension.");
            }
        }
        data.setAttribute("keystoreType", type);
        EditableConfigurationManager mgr = ConfigurationUtil.getEditableConfigurationManager(kernel);
        if(mgr != null) {
            try {
                mgr.addGBeanToConfiguration(myName.getArtifact(), data, true);
                return (KeystoreInstance) kernel.getProxyManager().createProxy(aName, KeystoreInstance.class);
            } catch (InvalidConfigException e) {
                log.error("Should never happen", e);
                throw new IllegalStateException("Unable to add Keystore GBean ("+e.getMessage()+")", e);
            } finally {
View Full Code Here

Examples of org.apache.geronimo.kernel.config.EditableConfigurationManager

                }
            }
            if (!found) {
                throw new GBeanNotFoundException(connectorName);
            }
            EditableConfigurationManager mgr = ConfigurationUtil.getEditableConfigurationManager(kernel);
            if (mgr != null) {
                try {
                    mgr.removeGBeanFromConfiguration(connectorName.getArtifact(), connectorName);
                } catch (InvalidConfigException e) {
                    log.error("Unable to add GBean", e);
                } finally {
                    ConfigurationUtil.releaseConfigurationManager(kernel, mgr);
                }
View Full Code Here

Examples of org.apache.geronimo.kernel.config.EditableConfigurationManager

        if (connectorType.equals(HTTPS_NIO) || connectorType.equals(HTTPS_BIO)) {
            AbstractNameQuery query = new AbstractNameQuery(KeystoreManager.class.getName());
            gbeanData.setReferencePattern("KeystoreManager", query);
        }
       
        EditableConfigurationManager mgr = ConfigurationUtil.getEditableConfigurationManager(kernel);
        if (mgr != null) {
            try {
                mgr.addGBeanToConfiguration(containerName.getArtifact(), gbeanData, false);
            } catch (InvalidConfigException e) {
                log.error("Unable to add GBean", e);
                return null;
            } finally {
                ConfigurationUtil.releaseConfigurationManager(kernel, mgr);
View Full Code Here

Examples of org.apache.geronimo.kernel.config.EditableConfigurationManager

        throw new RuntimeException("not implemented");
   }
   
    public JMSBroker addBroker(String brokerName, GBeanData brokerGBeanData) throws KernelException,
            InvalidConfigException {
        EditableConfigurationManager mgr = ConfigurationUtil.getEditableConfigurationManager(kernel);
        if (mgr != null) {
            AbstractName brokerAbstractName = null;
            try {
                mgr.addGBeanToConfiguration(kernel.getAbstractNameFor(this).getArtifact(), brokerGBeanData, false);
                brokerAbstractName = brokerGBeanData.getAbstractName();
                return (JMSBroker) kernel.getProxyManager().createProxy(brokerAbstractName,
                        ActiveMQBroker.class.getClassLoader());
            } catch (InvalidConfigException e) {
                log.error("Unable to add ActiveMQ broker [" + brokerName + "]", e);
View Full Code Here

Examples of org.apache.geronimo.kernel.config.EditableConfigurationManager

            return null;
        }
    }

    public void removeBroker(AbstractName brokerAbstractName) throws KernelException, InvalidConfigException {
        EditableConfigurationManager mgr = ConfigurationUtil.getEditableConfigurationManager(kernel);
        if (mgr != null) {
            try {
                mgr.removeGBeanFromConfiguration(brokerAbstractName.getArtifact(), brokerAbstractName);
            } catch (InvalidConfigException e) {
                log.error("Unable to remove ActiveMQ broker [" + brokerAbstractName + "]", e);
                throw e;
            } catch (GBeanNotFoundException e) {
                log.error("Fail to get ActiveMQ broker from kernel [" + brokerAbstractName + "]");
View Full Code Here

Examples of org.apache.geronimo.kernel.config.EditableConfigurationManager

                type = name.substring(name.lastIndexOf(".")+1);
                log.warn("keystoreType for new keystore \""+name+"\" set to \""+type+"\" based on file extension.");
            }
        }
        data.setAttribute("keystoreType", type);
        EditableConfigurationManager mgr = ConfigurationUtil.getEditableConfigurationManager(kernel);
        if(mgr != null) {
            try {
                mgr.addGBeanToConfiguration(myName.getArtifact(), data, true);
                return (KeystoreInstance) kernel.getProxyManager().createProxy(aName, KeystoreInstance.class);
            } catch (InvalidConfigException e) {
                log.error("Should never happen", e);
                throw new IllegalStateException("Unable to add Keystore GBean ("+e.getMessage()+")", e);
            } finally {
View Full Code Here

Examples of org.apache.geronimo.kernel.config.EditableConfigurationManager

                }
            }
            if (!found) {
                throw new GBeanNotFoundException(connectorName);
            }
            EditableConfigurationManager mgr = ConfigurationUtil.getEditableConfigurationManager(kernel);
            if(mgr != null) {
                try {
                    mgr.removeGBeanFromConfiguration(connectorName.getArtifact(), connectorName);
                } catch (InvalidConfigException e) {
                    log.error("Unable to add GBean", e);
                } finally {
                    ConfigurationUtil.releaseConfigurationManager(kernel, mgr);
                }
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.