qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rob...@apache.org
Subject qpid-proton git commit: NO-JIRA: give the example connections a container-id
Date Fri, 16 Oct 2015 14:39:42 GMT
Repository: qpid-proton
Updated Branches:
  refs/heads/master 6f977fa0b -> 2057d0397


NO-JIRA: give the example connections a container-id


Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/2057d039
Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/2057d039
Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/2057d039

Branch: refs/heads/master
Commit: 2057d0397618fb1d68dd973026a01b13e143cc9b
Parents: 6f977fa
Author: Robert Gemmell <robbie@apache.org>
Authored: Fri Oct 16 15:39:23 2015 +0100
Committer: Robert Gemmell <robbie@apache.org>
Committed: Fri Oct 16 15:39:23 2015 +0100

----------------------------------------------------------------------
 .../java/src/main/java/org/apache/qpid/proton/examples/Drain.java | 1 -
 .../src/main/java/org/apache/qpid/proton/examples/Driver.java     | 3 +++
 2 files changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/2057d039/examples/engine/java/src/main/java/org/apache/qpid/proton/examples/Drain.java
----------------------------------------------------------------------
diff --git a/examples/engine/java/src/main/java/org/apache/qpid/proton/examples/Drain.java
b/examples/engine/java/src/main/java/org/apache/qpid/proton/examples/Drain.java
index 0bdc76f..8b93886 100644
--- a/examples/engine/java/src/main/java/org/apache/qpid/proton/examples/Drain.java
+++ b/examples/engine/java/src/main/java/org/apache/qpid/proton/examples/Drain.java
@@ -25,7 +25,6 @@ import java.util.List;
 
 import org.apache.qpid.proton.engine.BaseHandler;
 import org.apache.qpid.proton.engine.Collector;
-import org.apache.qpid.proton.engine.Connection;
 import org.apache.qpid.proton.engine.Delivery;
 import org.apache.qpid.proton.engine.Event;
 import org.apache.qpid.proton.engine.Link;

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/2057d039/examples/engine/java/src/main/java/org/apache/qpid/proton/examples/Driver.java
----------------------------------------------------------------------
diff --git a/examples/engine/java/src/main/java/org/apache/qpid/proton/examples/Driver.java
b/examples/engine/java/src/main/java/org/apache/qpid/proton/examples/Driver.java
index 8b4bcf0..7412dc6 100644
--- a/examples/engine/java/src/main/java/org/apache/qpid/proton/examples/Driver.java
+++ b/examples/engine/java/src/main/java/org/apache/qpid/proton/examples/Driver.java
@@ -38,6 +38,7 @@ import java.nio.channels.Selector;
 import java.nio.channels.SelectionKey;
 import java.nio.channels.ServerSocketChannel;
 import java.nio.channels.SocketChannel;
+import java.util.UUID;
 
 
 /**
@@ -111,6 +112,8 @@ public class Driver extends BaseHandler
     public void onConnectionLocalOpen(Event evt) {
         Connection conn = evt.getConnection();
         if (conn.getRemoteState() == EndpointState.UNINITIALIZED) {
+            // Give the connection a [random] container-id
+            conn.setContainer(UUID.randomUUID().toString());
             try {
                 new Connector(conn);
             } catch (IOException e) {


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


Mime
View raw message