//todo: if SSL is supported, need to add more properties or use a different GBean?
connector.setAttribute("protocol", protocol);
connector.setAttribute("host", host);
connector.setAttribute("port", new Integer(port));
connector.setReferencePattern("brokerService", brokerAbstractName);
EditableConfigurationManager mgr = ConfigurationUtil.getEditableConfigurationManager(kernel);
if(mgr != null) {
try {
mgr.addGBeanToConfiguration(brokerAbstractName.getArtifact(), connector, false);
return (JMSConnector) kernel.getProxyManager().createProxy(name, ActiveMQConnector.class.getClassLoader());
} catch (InvalidConfigException e) {
log.error("Unable to add GBean", e);
return null;
} finally {