Uploaded image for project: 'ActiveMQ C++ Client'
  1. ActiveMQ C++ Client
  2. AMQCPP-387

Credentials are not propagated correctly when passed through the ActiveMQConnectionFactory constructor in the CPP client API (However, it works correctly when passed through the createConnection method)

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 3.4.1
    • 3.4.2, 3.5.0
    • CMS Impl
    • None
    • RHEL4 on both client and server

      I am using CMS v3.4.1

    Description

      I tried to connect to the an ActiveMQ server using the C++ client API. However, when I pass the credentials (username and password) only through the ActiveMQConnectionFactory constructor and not through the createConnection method, the password is not shows up as null in the server logs.
      So,

      auto_ptr<ActiveMQConnectionFactory> connectionFactory(
      new ActiveMQConnectionFactory( brokerURI, "username", "password" ) );
      try

      { connection = connectionFactory->createConnection(); connection->start(); }

      catch( CMSException& e )

      { e.printStackTrace(); throw e; }
      results in the server receiving the password as null. However, when the credentials are passed through the createConnection method as well, like -
      auto_ptr<ActiveMQConnectionFactory> connectionFactory(
      new ActiveMQConnectionFactory( brokerURI, "username", "password" ) );
      try{ connection = connectionFactory->createConnection("username", "password"); connection->start(); } catch( CMSException& e ) { e.printStackTrace(); throw e; }

      the server receives the password correctly.

      Attachments

        Activity

          People

            tabish Timothy A. Bish
            bdmogal Bhooshan Mogal
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: