String host = actionRequest.getParameter("host");
int port = Integer.parseInt(actionRequest.getParameter("port"));
String name = actionRequest.getParameter("name");
AbstractName brokerAbstractName = new AbstractName(URI.create(brokerURI));
// Create and configure the connector
JMSConnector connector = PortletManager.createJMSConnector(actionRequest, manager, brokerAbstractName, name, protocol, host, port);
// Start the connector
try {
((GeronimoManagedBean)connector).startRecursive();
} catch (Exception e) {
log.error("Unable to start connector", e); //todo: get into rendered page somehow?
}
actionResponse.setRenderParameter("mode", "list");
} else if(mode.equals("save")) { // User just submitted the form to update a connector
// Get submitted values
//todo: lots of validation
String host = actionRequest.getParameter("host");
int port = Integer.parseInt(actionRequest.getParameter("port"));
// Identify and update the connector
AbstractName connectorAbstractName = new AbstractName(URI.create(connectorURI));
JMSConnector connector = (JMSConnector)PortletManager.getManagedBean(actionRequest, connectorAbstractName);
if(connector != null) {
connector.setHost(host);
connector.setPort(port);
}
actionResponse.setRenderParameter("mode", "list");
} else if(mode.equals("start")) {
AbstractName connectorAbstractName = new AbstractName(URI.create(connectorURI));
try {