public Transport doCompositeConnect(URI location) throws Exception {
URI brokerURI;
String host;
Map<String, String> options;
boolean create = true;
CompositeData data = URISupport.parseComposite(location);
if (data.getComponents().length == 1 && "broker".equals(data.getComponents()[0].getScheme())) {
brokerURI = data.getComponents()[0];
CompositeData brokerData = URISupport.parseComposite(brokerURI);
host = (String)brokerData.getParameters().get("brokerName");
if (host == null) {
host = "localhost";
}
if (brokerData.getPath() != null) {
host = data.getPath();
}
options = data.getParameters();
location = new URI("vm://" + host);
} else {