You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "Dmitry (JIRA)" <ji...@apache.org> on 2011/02/27 19:31:37 UTC

[jira] Created: (AMQCPP-352) FailoverTransportFactory doesn't work correct with more than 2 composite uris

FailoverTransportFactory doesn't work correct with more than 2 composite uris 
------------------------------------------------------------------------------

                 Key: AMQCPP-352
                 URL: https://issues.apache.org/jira/browse/AMQCPP-352
             Project: ActiveMQ C++ Client
          Issue Type: Bug
          Components: Transports
    Affects Versions: 3.0
         Environment: All platforms
            Reporter: Dmitry
            Assignee: Timothy Bish


Only first and last composite uris are recognized by FailoverTransportFactory.

For example - given 
   failover(tcp://10.10.10.1:61616,tcp://10.10.10.2:61616,tcp://10.10.10.3:61616,tcp://10.10.10.4:61616)
only "tcp://10.10.10.1:61616" and "tcp://10.10.10.4:61616" will work.

The bug in URISupport::splitComponents() in line 350. Line:
   std::string s = str.substr( last, i );
should be replaced by:
   std::string s = str.substr( last, i - last );  // 2nd argument of substr() is length of substring


-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (AMQCPP-352) FailoverTransportFactory doesn't work correctly with more than two composite uris

Posted by "Dmitry Babich (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AMQCPP-352?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dmitry Babich updated AMQCPP-352:
---------------------------------

    Description: 
Only first and last composite uris are recognized by FailoverTransportFactory.

For example - given uri: 
   failover://(tcp://10.10.10.1:61616,tcp://10.10.10.2:61616,tcp://10.10.10.3:61616,tcp://10.10.10.4:61616)
only "tcp://10.10.10.1:61616" and "tcp://10.10.10.4:61616" will work.

The bug in URISupport::splitComponents(). 
Line 350:
      std::string s = str.substr( last, i );
should be replaced by:
      std::string s = str.substr( last, i - last );  // 2nd argument of substr() is length of substring


  was:
Only first and last composite uris are recognized by FailoverTransportFactory.

For example - given uri: 
   failover://(tcp://10.10.10.1:61616,tcp://10.10.10.2:61616,tcp://10.10.10.3:61616,tcp://10.10.10.4:61616)
only "tcp://10.10.10.1:61616" and "tcp://10.10.10.4:61616" will work.

The bug in URISupport::splitComponents() in line 350. 
Line:
   std::string s = str.substr( last, i );
should be replaced by:
   std::string s = str.substr( last, i - last );  // 2nd argument of substr() is length of substring



> FailoverTransportFactory doesn't work correctly with more than two composite uris 
> ----------------------------------------------------------------------------------
>
>                 Key: AMQCPP-352
>                 URL: https://issues.apache.org/jira/browse/AMQCPP-352
>             Project: ActiveMQ C++ Client
>          Issue Type: Bug
>          Components: Transports
>    Affects Versions: 3.0, 3.2.4
>         Environment: All platforms
>            Reporter: Dmitry Babich
>            Assignee: Timothy Bish
>
> Only first and last composite uris are recognized by FailoverTransportFactory.
> For example - given uri: 
>    failover://(tcp://10.10.10.1:61616,tcp://10.10.10.2:61616,tcp://10.10.10.3:61616,tcp://10.10.10.4:61616)
> only "tcp://10.10.10.1:61616" and "tcp://10.10.10.4:61616" will work.
> The bug in URISupport::splitComponents(). 
> Line 350:
>       std::string s = str.substr( last, i );
> should be replaced by:
>       std::string s = str.substr( last, i - last );  // 2nd argument of substr() is length of substring

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (AMQCPP-352) FailoverTransportFactory doesn't work correct with more than 2 composite uris

Posted by "Dmitry Babich (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AMQCPP-352?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dmitry Babich updated AMQCPP-352:
---------------------------------

    Affects Version/s: 3.2.4

> FailoverTransportFactory doesn't work correct with more than 2 composite uris 
> ------------------------------------------------------------------------------
>
>                 Key: AMQCPP-352
>                 URL: https://issues.apache.org/jira/browse/AMQCPP-352
>             Project: ActiveMQ C++ Client
>          Issue Type: Bug
>          Components: Transports
>    Affects Versions: 3.0, 3.2.4
>         Environment: All platforms
>            Reporter: Dmitry Babich
>            Assignee: Timothy Bish
>
> Only first and last composite uris are recognized by FailoverTransportFactory.
> For example - given uri: 
>    failover(tcp://10.10.10.1:61616,tcp://10.10.10.2:61616,tcp://10.10.10.3:61616,tcp://10.10.10.4:61616)
> only "tcp://10.10.10.1:61616" and "tcp://10.10.10.4:61616" will work.
> The bug in URISupport::splitComponents() in line 350. 
> Line:
>    std::string s = str.substr( last, i );
> should be replaced by:
>    std::string s = str.substr( last, i - last );  // 2nd argument of substr() is length of substring

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (AMQCPP-352) FailoverTransportFactory doesn't work correctly with more than two composite uris

Posted by "Dmitry Babich (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AMQCPP-352?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13000158#comment-13000158 ] 

Dmitry Babich commented on AMQCPP-352:
--------------------------------------

 data = URISupport::parseComposite(
        URI( "test:(part1://host,part2://host,part3://host,part4://host" ) );
 CPPUNIT_ASSERT( 4 == data.getComponents().size() );


> FailoverTransportFactory doesn't work correctly with more than two composite uris 
> ----------------------------------------------------------------------------------
>
>                 Key: AMQCPP-352
>                 URL: https://issues.apache.org/jira/browse/AMQCPP-352
>             Project: ActiveMQ C++ Client
>          Issue Type: Bug
>          Components: Transports
>    Affects Versions: 3.0, 3.2.4
>         Environment: All platforms
>            Reporter: Dmitry Babich
>            Assignee: Timothy Bish
>
> Only first and last composite uris are recognized by FailoverTransportFactory.
> For example - given uri: 
>    failover://(tcp://10.10.10.1:61616,tcp://10.10.10.2:61616,tcp://10.10.10.3:61616,tcp://10.10.10.4:61616)
> only "tcp://10.10.10.1:61616" and "tcp://10.10.10.4:61616" will work.
> The bug in URISupport::splitComponents(). 
> Line 350:
>       std::string s = str.substr( last, i );
> should be replaced by:
>       std::string s = str.substr( last, i - last );  // 2nd argument of substr() is length of substring

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (AMQCPP-352) FailoverTransportFactory doesn't work correctly with more than two composite uris

Posted by "Timothy Bish (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AMQCPP-352?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13000028#comment-13000028 ] 

Timothy Bish commented on AMQCPP-352:
-------------------------------------

Would be helpful if you could include a test case in URISupportTest to demonstrate your issue, this will ensure that the issue gets fixed and remains fixed.

> FailoverTransportFactory doesn't work correctly with more than two composite uris 
> ----------------------------------------------------------------------------------
>
>                 Key: AMQCPP-352
>                 URL: https://issues.apache.org/jira/browse/AMQCPP-352
>             Project: ActiveMQ C++ Client
>          Issue Type: Bug
>          Components: Transports
>    Affects Versions: 3.0, 3.2.4
>         Environment: All platforms
>            Reporter: Dmitry Babich
>            Assignee: Timothy Bish
>
> Only first and last composite uris are recognized by FailoverTransportFactory.
> For example - given uri: 
>    failover://(tcp://10.10.10.1:61616,tcp://10.10.10.2:61616,tcp://10.10.10.3:61616,tcp://10.10.10.4:61616)
> only "tcp://10.10.10.1:61616" and "tcp://10.10.10.4:61616" will work.
> The bug in URISupport::splitComponents(). 
> Line 350:
>       std::string s = str.substr( last, i );
> should be replaced by:
>       std::string s = str.substr( last, i - last );  // 2nd argument of substr() is length of substring

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Resolved: (AMQCPP-352) FailoverTransportFactory doesn't work correctly with more than two composite uris

Posted by "Timothy Bish (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AMQCPP-352?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Timothy Bish resolved AMQCPP-352.
---------------------------------

       Resolution: Fixed
    Fix Version/s: 3.3.0
                   3.2.5

Apply fix for parse of composite URI, add a couple more test cases to verify the fix.

> FailoverTransportFactory doesn't work correctly with more than two composite uris 
> ----------------------------------------------------------------------------------
>
>                 Key: AMQCPP-352
>                 URL: https://issues.apache.org/jira/browse/AMQCPP-352
>             Project: ActiveMQ C++ Client
>          Issue Type: Bug
>          Components: Transports
>    Affects Versions: 3.0, 3.2.4
>         Environment: All platforms
>            Reporter: Dmitry Babich
>            Assignee: Timothy Bish
>             Fix For: 3.2.5, 3.3.0
>
>
> Only first and last composite uris are recognized by FailoverTransportFactory.
> For example - given uri: 
>    failover://(tcp://10.10.10.1:61616,tcp://10.10.10.2:61616,tcp://10.10.10.3:61616,tcp://10.10.10.4:61616)
> only "tcp://10.10.10.1:61616" and "tcp://10.10.10.4:61616" will work.
> The bug in URISupport::splitComponents(). 
> Line 350:
>       std::string s = str.substr( last, i );
> should be replaced by:
>       std::string s = str.substr( last, i - last );  // 2nd argument of substr() is length of substring

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (AMQCPP-352) FailoverTransportFactory doesn't work correctly with more than two composite uris

Posted by "Dmitry Babich (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AMQCPP-352?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dmitry Babich updated AMQCPP-352:
---------------------------------

    Summary: FailoverTransportFactory doesn't work correctly with more than two composite uris   (was: FailoverTransportFactory doesn't work correct with more than 2 composite uris )

> FailoverTransportFactory doesn't work correctly with more than two composite uris 
> ----------------------------------------------------------------------------------
>
>                 Key: AMQCPP-352
>                 URL: https://issues.apache.org/jira/browse/AMQCPP-352
>             Project: ActiveMQ C++ Client
>          Issue Type: Bug
>          Components: Transports
>    Affects Versions: 3.0, 3.2.4
>         Environment: All platforms
>            Reporter: Dmitry Babich
>            Assignee: Timothy Bish
>
> Only first and last composite uris are recognized by FailoverTransportFactory.
> For example - given uri: 
>    failover(tcp://10.10.10.1:61616,tcp://10.10.10.2:61616,tcp://10.10.10.3:61616,tcp://10.10.10.4:61616)
> only "tcp://10.10.10.1:61616" and "tcp://10.10.10.4:61616" will work.
> The bug in URISupport::splitComponents() in line 350. 
> Line:
>    std::string s = str.substr( last, i );
> should be replaced by:
>    std::string s = str.substr( last, i - last );  // 2nd argument of substr() is length of substring

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (AMQCPP-352) FailoverTransportFactory doesn't work correctly with more than two composite uris

Posted by "Dmitry Babich (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AMQCPP-352?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dmitry Babich updated AMQCPP-352:
---------------------------------

    Description: 
Only first and last composite uris are recognized by FailoverTransportFactory.

For example - given uri: 
   failover://(tcp://10.10.10.1:61616,tcp://10.10.10.2:61616,tcp://10.10.10.3:61616,tcp://10.10.10.4:61616)
only "tcp://10.10.10.1:61616" and "tcp://10.10.10.4:61616" will work.

The bug in URISupport::splitComponents() in line 350. 
Line:
   std::string s = str.substr( last, i );
should be replaced by:
   std::string s = str.substr( last, i - last );  // 2nd argument of substr() is length of substring


  was:
Only first and last composite uris are recognized by FailoverTransportFactory.

For example - given uri: 
   failover(tcp://10.10.10.1:61616,tcp://10.10.10.2:61616,tcp://10.10.10.3:61616,tcp://10.10.10.4:61616)
only "tcp://10.10.10.1:61616" and "tcp://10.10.10.4:61616" will work.

The bug in URISupport::splitComponents() in line 350. 
Line:
   std::string s = str.substr( last, i );
should be replaced by:
   std::string s = str.substr( last, i - last );  // 2nd argument of substr() is length of substring



> FailoverTransportFactory doesn't work correctly with more than two composite uris 
> ----------------------------------------------------------------------------------
>
>                 Key: AMQCPP-352
>                 URL: https://issues.apache.org/jira/browse/AMQCPP-352
>             Project: ActiveMQ C++ Client
>          Issue Type: Bug
>          Components: Transports
>    Affects Versions: 3.0, 3.2.4
>         Environment: All platforms
>            Reporter: Dmitry Babich
>            Assignee: Timothy Bish
>
> Only first and last composite uris are recognized by FailoverTransportFactory.
> For example - given uri: 
>    failover://(tcp://10.10.10.1:61616,tcp://10.10.10.2:61616,tcp://10.10.10.3:61616,tcp://10.10.10.4:61616)
> only "tcp://10.10.10.1:61616" and "tcp://10.10.10.4:61616" will work.
> The bug in URISupport::splitComponents() in line 350. 
> Line:
>    std::string s = str.substr( last, i );
> should be replaced by:
>    std::string s = str.substr( last, i - last );  // 2nd argument of substr() is length of substring

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (AMQCPP-352) FailoverTransportFactory doesn't work correct with more than 2 composite uris

Posted by "Dmitry Babich (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AMQCPP-352?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dmitry Babich updated AMQCPP-352:
---------------------------------

    Description: 
Only first and last composite uris are recognized by FailoverTransportFactory.

For example - given uri: 
   failover(tcp://10.10.10.1:61616,tcp://10.10.10.2:61616,tcp://10.10.10.3:61616,tcp://10.10.10.4:61616)
only "tcp://10.10.10.1:61616" and "tcp://10.10.10.4:61616" will work.

The bug in URISupport::splitComponents() in line 350. 
Line:
   std::string s = str.substr( last, i );
should be replaced by:
   std::string s = str.substr( last, i - last );  // 2nd argument of substr() is length of substring


  was:
Only first and last composite uris are recognized by FailoverTransportFactory.

For example - given 
   failover(tcp://10.10.10.1:61616,tcp://10.10.10.2:61616,tcp://10.10.10.3:61616,tcp://10.10.10.4:61616)
only "tcp://10.10.10.1:61616" and "tcp://10.10.10.4:61616" will work.

The bug in URISupport::splitComponents() in line 350. Line:
   std::string s = str.substr( last, i );
should be replaced by:
   std::string s = str.substr( last, i - last );  // 2nd argument of substr() is length of substring



> FailoverTransportFactory doesn't work correct with more than 2 composite uris 
> ------------------------------------------------------------------------------
>
>                 Key: AMQCPP-352
>                 URL: https://issues.apache.org/jira/browse/AMQCPP-352
>             Project: ActiveMQ C++ Client
>          Issue Type: Bug
>          Components: Transports
>    Affects Versions: 3.0
>         Environment: All platforms
>            Reporter: Dmitry Babich
>            Assignee: Timothy Bish
>
> Only first and last composite uris are recognized by FailoverTransportFactory.
> For example - given uri: 
>    failover(tcp://10.10.10.1:61616,tcp://10.10.10.2:61616,tcp://10.10.10.3:61616,tcp://10.10.10.4:61616)
> only "tcp://10.10.10.1:61616" and "tcp://10.10.10.4:61616" will work.
> The bug in URISupport::splitComponents() in line 350. 
> Line:
>    std::string s = str.substr( last, i );
> should be replaced by:
>    std::string s = str.substr( last, i - last );  // 2nd argument of substr() is length of substring

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira