You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by opks <pi...@firemon.com> on 2014/08/29 22:53:01 UTC

question related to "org/apache/activemq/transport/TransportFactory.java"

I got the following error message: "Invalid connect parameters:
{wireFormat.host=localhost}"

After tracing the source code, I find this function in
org/apache/activemq/transport/TransportFactory.java:

The options is always not empty and this always triggers exception for
"Invalid connect parameters: ". Am I reading the code correctly?


    public Transport doConnect(URI location) throws Exception {
        try {
            Map<String, String> options = new HashMap<String,
String>(URISupport.parseParameters(location));
            if( !options.containsKey("wireFormat.host") ) {
                options.put("wireFormat.host", location.getHost());
            }
            WireFormat wf = createWireFormat(options);
            Transport transport = createTransport(location, wf);
            Transport rc = configure(transport, wf, options);
            if (!options.isEmpty()) {
                throw new IllegalArgumentException("Invalid connect
parameters: " + options);
            }
            return rc;
        } catch (URISyntaxException e) {
            throw IOExceptionSupport.create(e);
        }
    }




--
View this message in context: http://activemq.2283324.n4.nabble.com/question-related-to-org-apache-activemq-transport-TransportFactory-java-tp4685161.html
Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.