activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject git commit: https://issues.apache.org/jira/browse/AMQ-5346
Date Mon, 08 Sep 2014 17:33:38 GMT
Repository: activemq
Updated Branches:
  refs/heads/trunk 0b5231ada -> 644b96a68


https://issues.apache.org/jira/browse/AMQ-5346

Prepare for the move to Proton 0.8.  Use the 1.0-SNAPSHOT builds to
start testing against the changes coming in Proton 0.8

Project: http://git-wip-us.apache.org/repos/asf/activemq/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq/commit/644b96a6
Tree: http://git-wip-us.apache.org/repos/asf/activemq/tree/644b96a6
Diff: http://git-wip-us.apache.org/repos/asf/activemq/diff/644b96a6

Branch: refs/heads/trunk
Commit: 644b96a68a8631f5c65ff4709fc61355d2d5c107
Parents: 0b5231a
Author: Timothy Bish <tabish121@gmail.com>
Authored: Mon Sep 8 13:29:10 2014 -0400
Committer: Timothy Bish <tabish121@gmail.com>
Committed: Mon Sep 8 13:29:10 2014 -0400

----------------------------------------------------------------------
 .../transport/amqp/AmqpProtocolConverter.java   | 25 +++++++++-----------
 .../amqp/JmsClientRequestResponseTest.java      |  1 -
 pom.xml                                         |  2 +-
 3 files changed, 12 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq/blob/644b96a6/activemq-amqp/src/main/java/org/apache/activemq/transport/amqp/AmqpProtocolConverter.java
----------------------------------------------------------------------
diff --git a/activemq-amqp/src/main/java/org/apache/activemq/transport/amqp/AmqpProtocolConverter.java
b/activemq-amqp/src/main/java/org/apache/activemq/transport/amqp/AmqpProtocolConverter.java
index df8509d..186d790 100644
--- a/activemq-amqp/src/main/java/org/apache/activemq/transport/amqp/AmqpProtocolConverter.java
+++ b/activemq-amqp/src/main/java/org/apache/activemq/transport/amqp/AmqpProtocolConverter.java
@@ -58,7 +58,7 @@ import org.apache.activemq.selector.SelectorParser;
 import org.apache.activemq.util.IOExceptionSupport;
 import org.apache.activemq.util.IdGenerator;
 import org.apache.activemq.util.LongSequenceGenerator;
-import org.apache.qpid.proton.ProtonFactoryLoader;
+import org.apache.qpid.proton.Proton;
 import org.apache.qpid.proton.amqp.Binary;
 import org.apache.qpid.proton.amqp.DescribedType;
 import org.apache.qpid.proton.amqp.Symbol;
@@ -82,8 +82,8 @@ 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.EndpointState;
-import org.apache.qpid.proton.engine.EngineFactory;
 import org.apache.qpid.proton.engine.Event;
+import org.apache.qpid.proton.engine.Event.Type.*;
 import org.apache.qpid.proton.engine.Link;
 import org.apache.qpid.proton.engine.Receiver;
 import org.apache.qpid.proton.engine.Sasl;
@@ -91,7 +91,6 @@ import org.apache.qpid.proton.engine.Sender;
 import org.apache.qpid.proton.engine.Session;
 import org.apache.qpid.proton.engine.Transport;
 import org.apache.qpid.proton.engine.impl.CollectorImpl;
-import org.apache.qpid.proton.engine.impl.EngineFactoryImpl;
 import org.apache.qpid.proton.engine.impl.ProtocolTracer;
 import org.apache.qpid.proton.engine.impl.TransportImpl;
 import org.apache.qpid.proton.framing.TransportFrame;
@@ -103,7 +102,6 @@ import org.apache.qpid.proton.jms.InboundTransformer;
 import org.apache.qpid.proton.jms.JMSMappingInboundTransformer;
 import org.apache.qpid.proton.jms.OutboundTransformer;
 import org.apache.qpid.proton.message.Message;
-import org.apache.qpid.proton.message.MessageFactory;
 import org.fusesource.hawtbuf.Buffer;
 import org.fusesource.hawtbuf.ByteArrayOutputStream;
 import org.slf4j.Logger;
@@ -120,13 +118,9 @@ class AmqpProtocolConverter implements IAmqpProtocolConverter {
     private static final Symbol NO_LOCAL = Symbol.valueOf("no-local");
     private static final Symbol DURABLE_SUBSCRIPTION_ENDED = Symbol.getSymbol("DURABLE_SUBSCRIPTION_ENDED");
 
-    private static final ProtonFactoryLoader<MessageFactory> messageFactoryLoader =
new ProtonFactoryLoader<MessageFactory>(MessageFactory.class);
-
     protected int prefetch = 100;
-    protected EngineFactory engineFactory = new EngineFactoryImpl();
-    protected Transport protonTransport = engineFactory.createTransport();
-    protected Connection protonConnection = engineFactory.createConnection();
-    protected MessageFactory messageFactory = messageFactoryLoader.loadFactory();
+    protected Transport protonTransport = Proton.transport();
+    protected Connection protonConnection = Proton.connection();
     protected Collector eventCollector = new CollectorImpl();
 
     public AmqpProtocolConverter(AmqpTransport transport) {
@@ -266,13 +260,16 @@ class AmqpProtocolConverter implements IAmqpProtocolConverter {
                 Event event = null;
                 while ((event = eventCollector.peek()) != null) {
                     switch (event.getType()) {
-                        case CONNECTION_REMOTE_STATE:
+                        case CONNECTION_REMOTE_OPEN:
+                        case CONNECTION_REMOTE_CLOSE:
                             processConnectionEvent(event.getConnection());
                             break;
-                        case SESSION_REMOTE_STATE:
+                        case SESSION_REMOTE_OPEN:
+                        case SESSION_REMOTE_CLOSE:
                             processSessionEvent(event.getSession());
                             break;
-                        case LINK_REMOTE_STATE:
+                        case LINK_REMOTE_OPEN:
+                        case LINK_REMOTE_CLOSE:
                             processLinkEvent(event.getLink());
                             break;
                         case LINK_FLOW:
@@ -697,7 +694,7 @@ class AmqpProtocolConverter implements IAmqpProtocolConverter {
         @Override
         protected void onMessage(Receiver receiver, final Delivery delivery, Buffer buffer)
throws Exception {
 
-            Message msg = messageFactory.createMessage();
+            Message msg = Proton.message();
             int offset = buffer.offset;
             int len = buffer.length;
             while (len > 0) {

http://git-wip-us.apache.org/repos/asf/activemq/blob/644b96a6/activemq-amqp/src/test/java/org/apache/activemq/transport/amqp/JmsClientRequestResponseTest.java
----------------------------------------------------------------------
diff --git a/activemq-amqp/src/test/java/org/apache/activemq/transport/amqp/JmsClientRequestResponseTest.java
b/activemq-amqp/src/test/java/org/apache/activemq/transport/amqp/JmsClientRequestResponseTest.java
index 191ae07..2f68fa3 100644
--- a/activemq-amqp/src/test/java/org/apache/activemq/transport/amqp/JmsClientRequestResponseTest.java
+++ b/activemq-amqp/src/test/java/org/apache/activemq/transport/amqp/JmsClientRequestResponseTest.java
@@ -46,7 +46,6 @@ import org.junit.rules.TestName;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-@Ignore("Until https://issues.apache.org/jira/browse/PROTON-588 and https://issues.apache.org/jira/browse/QPID-5792
are fixed")
 public class JmsClientRequestResponseTest extends AmqpTestSupport implements MessageListener
{
 
     private static final Logger LOG = LoggerFactory.getLogger(JmsClientRequestResponseTest.class);

http://git-wip-us.apache.org/repos/asf/activemq/blob/644b96a6/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index e685aee..203d568 100755
--- a/pom.xml
+++ b/pom.xml
@@ -100,7 +100,7 @@
     <paho-version>0.4.0</paho-version>
     <linkedin-zookeeper-version>1.4.0</linkedin-zookeeper-version>
     <zookeeper-version>3.4.5</zookeeper-version>
-    <qpid-proton-version>0.7</qpid-proton-version>
+    <qpid-proton-version>1.0-SNAPSHOT</qpid-proton-version>
     <qpid-jms-version>0.26</qpid-jms-version>
     <regexp-version>1.3</regexp-version>
     <rome-version>1.0</rome-version>


Mime
View raw message