You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by or...@apache.org on 2020/05/28 09:56:33 UTC

[qpid-jms-amqp-0-x] branch master updated (a290dc0 -> 2cf68d8)

This is an automated email from the ASF dual-hosted git repository.

orudyy pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/qpid-jms-amqp-0-x.git.


    from a290dc0  QPID-8446: [JMS AMQP 0-x] Add ability to notify mesaging application about the result of every connectivity attempt
     new 82ad31c  QPID-8440: [JMS AMQP 0-x] Improve dcouementation
     new d0b682c  QPID-8446: [JMS AMQP 0-x] Improve documentation
     new 2cf68d8  QPID-8440: [JMS AMQP 0-x] Restore username field

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../java/org/apache/qpid/client/AMQConnection.java  |  7 +++++--
 .../src/docbkx/JMS-Client-JMS-Extensions.xml        | 21 ++++++++++++++-------
 2 files changed, 19 insertions(+), 9 deletions(-)


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


[qpid-jms-amqp-0-x] 03/03: QPID-8440: [JMS AMQP 0-x] Restore username field

Posted by or...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

orudyy pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/qpid-jms-amqp-0-x.git

commit 2cf68d8453397bc13a4ac2d7ec98e690dd5b8055
Author: Alex Rudyy <or...@apache.org>
AuthorDate: Thu May 28 10:30:04 2020 +0100

    QPID-8440: [JMS AMQP 0-x] Restore username field
---
 client/src/main/java/org/apache/qpid/client/AMQConnection.java | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/client/src/main/java/org/apache/qpid/client/AMQConnection.java b/client/src/main/java/org/apache/qpid/client/AMQConnection.java
index 4794a10..ff12db2 100644
--- a/client/src/main/java/org/apache/qpid/client/AMQConnection.java
+++ b/client/src/main/java/org/apache/qpid/client/AMQConnection.java
@@ -152,6 +152,8 @@ public class AMQConnection extends Closeable implements CommonConnection, Refere
 
     private String _clientName;
 
+    private volatile String _username;
+
     /** The virtual path to connect to on the AMQ server */
     private String _virtualHost;
 
@@ -1417,12 +1419,13 @@ public class AMQConnection extends Closeable implements CommonConnection, Refere
 
     public String getUsername()
     {
-        return _connectionURL.getUsername();
+        final String username = _username;
+        return username == null ? _connectionURL.getUsername() : username;
     }
 
     public void setUsername(String id)
     {
-        _connectionURL.setUsername(id);
+        _username = id;
     }
 
     public String getPassword()


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


[qpid-jms-amqp-0-x] 01/03: QPID-8440: [JMS AMQP 0-x] Improve dcouementation

Posted by or...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

orudyy pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/qpid-jms-amqp-0-x.git

commit 82ad31cdf1cb47d44a4f912242a4e83287c49bad
Author: Alex Rudyy <or...@apache.org>
AuthorDate: Thu May 28 10:09:58 2020 +0100

    QPID-8440: [JMS AMQP 0-x] Improve dcouementation
---
 doc/jms-client-0-8/src/docbkx/JMS-Client-JMS-Extensions.xml | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/doc/jms-client-0-8/src/docbkx/JMS-Client-JMS-Extensions.xml b/doc/jms-client-0-8/src/docbkx/JMS-Client-JMS-Extensions.xml
index b71fa26..8e8a5c0 100644
--- a/doc/jms-client-0-8/src/docbkx/JMS-Client-JMS-Extensions.xml
+++ b/doc/jms-client-0-8/src/docbkx/JMS-Client-JMS-Extensions.xml
@@ -36,7 +36,8 @@
           in response to some environment changes like account rotation or authentication token expiration.</para>
       <para>
           The extensions take the form of a BiFunction&lt;Connection, URI, Object&gt; passed into the
-          ConnectionFactory using the AMQConnectionFactory#setExtension(String, BiFunction).
+          ConnectionFactory using the AMQConnectionFactory#setExtension(String, BiFunction) or
+          PooledConnectionFactory#setExtension(String, BiFunction).
       </para>
       <para>A table below lists supported extensions.</para>
       <table pgwide="1">
@@ -62,7 +63,7 @@
       </tbody>
       </tgroup>
       </table>
-      <para>The following example illustrates how expirate OAUTH2 authentication token can be recreated</para>
+      <para>The following example illustrates how expired OAUTH2 authentication token can be recreated.</para>
       <example>
           <title>Inject password extension</title>
           <programlisting>


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


[qpid-jms-amqp-0-x] 02/03: QPID-8446: [JMS AMQP 0-x] Improve documentation

Posted by or...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

orudyy pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/qpid-jms-amqp-0-x.git

commit d0b682cdc65c4566a6b5864f991beb9e22e9c6c9
Author: Alex Rudyy <or...@apache.org>
AuthorDate: Thu May 28 10:27:52 2020 +0100

    QPID-8446: [JMS AMQP 0-x] Improve documentation
---
 .../src/docbkx/JMS-Client-JMS-Extensions.xml             | 16 +++++++++++-----
 1 file changed, 11 insertions(+), 5 deletions(-)

diff --git a/doc/jms-client-0-8/src/docbkx/JMS-Client-JMS-Extensions.xml b/doc/jms-client-0-8/src/docbkx/JMS-Client-JMS-Extensions.xml
index 8e8a5c0..d6a7ed2 100644
--- a/doc/jms-client-0-8/src/docbkx/JMS-Client-JMS-Extensions.xml
+++ b/doc/jms-client-0-8/src/docbkx/JMS-Client-JMS-Extensions.xml
@@ -128,24 +128,30 @@ final Connection connection = factory.createConnection();
           An instance of AMQConnectionFactory is created  at (7) for a given connection URL (1).
           A password extension is registered at (8). JMS connection is open at (9). The example uses a hypothetical
           class TokenGenerator invoking underlying  OAUTH2 API to generate/renew access token and get token expiration time.</para>
+      <para><emphasis>Connection Extensions</emphasis> can be used together with
+          <link linkend="JMS-Client-0-8-Appendix-JMS-Extensions-Connection">ConnectAttemptListener</link> to
+          change credentials on connectivity failures. Please check
+          <xref linkend="JMS-Client-0-8-Appendix-JMS-Extensions-ConnectAttemptListener"/> for more details.
+      </para>
   </section>
   <section xml:id="JMS-Client-0-8-Appendix-JMS-Extensions-ConnectAttemptListener">
     <title>ConnectAttemptListener</title>
     <para>An implementation of <emphasis>ConnectAttemptListener</emphasis> can be set on <emphasis>AMQConnectionFactory</emphasis>
-        or <emphasis>PooledConnectionFactory</emphasis> in order to notify messaging application about every successful
+        or <emphasis>PooledConnectionFactory</emphasis> via <emphasis>#setConnectAttemptListener(ConnectAttemptListener)</emphasis>
+        in order to notify messaging application about every successful
         and unsuccessful connectivity attempt.
     </para>
     <para>
-        The failed attempt notification can be used as a mechanism to rotate expired credentials,
-        if those are set as connection extensions.
+        The failed attempt notification can be used as a trigger to rotate expired credentials,
+        if those are set using <link linkend="JMS-Client-0-8-Appendix-JMS-Extensions-Connection">connection extensions</link>.
         The  implementation can examine the error code reported as part of JMSException, and, if the error code corresponds
         to authentication failure codes ("530" is reported by AMQP 0-8..0-91, "320" is reported by AMQP 0-10), the
         credentials could be swapped with new ones using the connection extension mechanism.
         See <xref linkend="JMS-Client-0-8-Appendix-JMS-Extensions-Connection"/> for details.
     </para>
-    <para>The following <emphasis>ConnectAttemptListener</emphasis> illustrate the idea</para>
+    <para>The following implementation of <emphasis>ConnectAttemptListener</emphasis> illustrate the idea.</para>
     <example>
-      <title>Inject password extension</title>
+      <title>Rotate credentials on authentication failure</title>
       <programlisting>
 class CredentialsRotatingListener implements ConnectAttemptListener
 {


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org