diff --git a/.gitignore b/.gitignore index d67debf..d40b34f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ /hornetq-2.2.13-CLEAN.tar.xz /HornetQ_2_3_1_FINAL.tar.gz /HornetQ_2_4_0_Beta1.tar.gz +/HornetQ_2_4_0_Beta2.tar.gz diff --git a/0001-Proton-0.5-support.patch b/0001-Proton-0.5-support.patch new file mode 100644 index 0000000..5107809 --- /dev/null +++ b/0001-Proton-0.5-support.patch @@ -0,0 +1,158 @@ +From 269d1eb7c71d1b71e5a730b504a8f50593cab18a Mon Sep 17 00:00:00 2001 +From: Marek Goldmann +Date: Thu, 24 Oct 2013 15:21:15 +0200 +Subject: [PATCH] Proton 0.5 support + +--- + .../core/protocol/proton/ProtonProtocolManager.java | 7 ++++--- + .../protocol/proton/ProtonRemotingConnection.java | 19 +++++++++---------- + .../hornetq/core/protocol/proton/ProtonSession.java | 7 ++++--- + 3 files changed, 17 insertions(+), 16 deletions(-) + +diff --git a/hornetq-protocols/hornetq-amqp-protocol/src/main/java/org/hornetq/core/protocol/proton/ProtonProtocolManager.java b/hornetq-protocols/hornetq-amqp-protocol/src/main/java/org/hornetq/core/protocol/proton/ProtonProtocolManager.java +index d246c08..de04c9f 100644 +--- a/hornetq-protocols/hornetq-amqp-protocol/src/main/java/org/hornetq/core/protocol/proton/ProtonProtocolManager.java ++++ b/hornetq-protocols/hornetq-amqp-protocol/src/main/java/org/hornetq/core/protocol/proton/ProtonProtocolManager.java +@@ -27,8 +27,9 @@ import org.apache.qpid.proton.amqp.transaction.Coordinator; + import org.apache.qpid.proton.amqp.transaction.Declare; + import org.apache.qpid.proton.amqp.transaction.Declared; + import org.apache.qpid.proton.amqp.transaction.Discharge; ++import org.apache.qpid.proton.amqp.transport.ErrorCondition; ++import org.apache.qpid.proton.amqp.Symbol; + import org.apache.qpid.proton.engine.Delivery; +-import org.apache.qpid.proton.engine.EndpointError; + import org.apache.qpid.proton.engine.EndpointState; + import org.apache.qpid.proton.engine.Link; + import org.apache.qpid.proton.engine.Receiver; +@@ -188,7 +189,7 @@ public class ProtonProtocolManager implements ProtocolManager, NotificationListe + @Override + public void onError(int errorCode, String errorMessage) + { +- ((LinkImpl) receiver).setLocalError(new EndpointError("" + errorCode, errorMessage)); ++ ((LinkImpl) receiver).setCondition(new ErrorCondition(Symbol.getSymbol("" + errorCode), errorMessage)); + } + }); + } +@@ -220,7 +221,7 @@ public class ProtonProtocolManager implements ProtocolManager, NotificationListe + @Override + public void onError(int errorCode, String errorMessage) + { +- ((LinkImpl) sender).setLocalError(new EndpointError("" + errorCode, errorMessage)); ++ ((LinkImpl) sender).setCondition(new ErrorCondition(Symbol.getSymbol("" + errorCode), errorMessage)); + } + }); + } +diff --git a/hornetq-protocols/hornetq-amqp-protocol/src/main/java/org/hornetq/core/protocol/proton/ProtonRemotingConnection.java b/hornetq-protocols/hornetq-amqp-protocol/src/main/java/org/hornetq/core/protocol/proton/ProtonRemotingConnection.java +index d547775..664350a 100644 +--- a/hornetq-protocols/hornetq-amqp-protocol/src/main/java/org/hornetq/core/protocol/proton/ProtonRemotingConnection.java ++++ b/hornetq-protocols/hornetq-amqp-protocol/src/main/java/org/hornetq/core/protocol/proton/ProtonRemotingConnection.java +@@ -22,7 +22,8 @@ + package org.hornetq.core.protocol.proton; + + import org.apache.qpid.proton.amqp.transport.AmqpError; +-import org.apache.qpid.proton.engine.EndpointError; ++import org.apache.qpid.proton.amqp.transport.ErrorCondition; ++import org.apache.qpid.proton.amqp.Symbol; + import org.apache.qpid.proton.engine.EndpointState; + import org.apache.qpid.proton.engine.Sasl; + import org.apache.qpid.proton.engine.Session; +@@ -363,8 +364,7 @@ public class ProtonRemotingConnection implements RemotingConnection + boolean ok = "AMQP".equals(headerProt); + if(!ok) + { +- protonConnection.setLocalError(new EndpointError(HornetQAMQPException.AmqpError.ILLEGAL_STATE.getError(), +- "Unknown Protocol " + headerProt)); ++ protonConnection.setCondition(new ErrorCondition(AmqpError.ILLEGAL_STATE, "Unknown Protocol " + headerProt)); + } + return ok; + } +@@ -373,8 +373,7 @@ public class ProtonRemotingConnection implements RemotingConnection + { + if(major < 1) + { +- protonConnection.setLocalError(new EndpointError(HornetQAMQPException.AmqpError.ILLEGAL_STATE.getError(), +- "Version not supported " + major + "." + minor + "." + revision)); ++ protonConnection.setCondition(new ErrorCondition(AmqpError.ILLEGAL_STATE, "Version not supported " + major + "." + minor + "." + revision)); + return false; + } + return true; +@@ -472,7 +471,7 @@ public class ProtonRemotingConnection implements RemotingConnection + } + catch (HornetQAMQPException e) + { +- protonConnection.setLocalError(new EndpointError(e.getClass().getName(), e.getMessage())); ++ protonConnection.setCondition(new ErrorCondition(Symbol.getSymbol(e.getClass().getName()), e.getMessage())); + session.close(); + } + write(); +@@ -489,7 +488,7 @@ public class ProtonRemotingConnection implements RemotingConnection + } + catch (HornetQAMQPException e) + { +- link.setLocalError(new EndpointError(e.getAmqpError(), e.getMessage())); ++ link.setCondition(new ErrorCondition(Symbol.getSymbol(e.getAmqpError()), e.getMessage())); + link.close(); + } + link = (LinkImpl) protonConnection.linkHead(ProtonProtocolManager.UNINITIALIZED, ProtonProtocolManager.INITIALIZED); +@@ -510,7 +509,7 @@ public class ProtonRemotingConnection implements RemotingConnection + } + catch (HornetQAMQPException e) + { +- delivery.getLink().setLocalError(new EndpointError(e.getAmqpError(), e.getMessage())); ++ delivery.getLink().setCondition(new ErrorCondition(Symbol.getSymbol(e.getAmqpError()), e.getMessage())); + } + } + +@@ -523,7 +522,7 @@ public class ProtonRemotingConnection implements RemotingConnection + } + catch (HornetQAMQPException e) + { +- link.setLocalError(new EndpointError(e.getAmqpError(), e.getMessage())); ++ link.setCondition(new ErrorCondition(Symbol.getSymbol(e.getAmqpError()), e.getMessage())); + } + link = (LinkImpl) link.next(ProtonProtocolManager.ACTIVE, ProtonProtocolManager.ANY_ENDPOINT_STATE); + } +@@ -537,7 +536,7 @@ public class ProtonRemotingConnection implements RemotingConnection + } + catch (HornetQAMQPException e) + { +- link.setLocalError(new EndpointError(e.getAmqpError(), e.getMessage())); ++ link.setCondition(new ErrorCondition(Symbol.getSymbol(e.getAmqpError()), e.getMessage())); + } + link.close(); + +diff --git a/hornetq-protocols/hornetq-amqp-protocol/src/main/java/org/hornetq/core/protocol/proton/ProtonSession.java b/hornetq-protocols/hornetq-amqp-protocol/src/main/java/org/hornetq/core/protocol/proton/ProtonSession.java +index 0fb8c63..c3ddfe5 100644 +--- a/hornetq-protocols/hornetq-amqp-protocol/src/main/java/org/hornetq/core/protocol/proton/ProtonSession.java ++++ b/hornetq-protocols/hornetq-amqp-protocol/src/main/java/org/hornetq/core/protocol/proton/ProtonSession.java +@@ -22,7 +22,8 @@ + package org.hornetq.core.protocol.proton; + + import org.apache.qpid.proton.amqp.transaction.Coordinator; +-import org.apache.qpid.proton.engine.EndpointError; ++import org.apache.qpid.proton.amqp.transport.ErrorCondition; ++import org.apache.qpid.proton.amqp.Symbol; + import org.apache.qpid.proton.engine.Receiver; + import org.apache.qpid.proton.engine.Sender; + import org.apache.qpid.proton.engine.impl.LinkImpl; +@@ -192,7 +193,7 @@ public class ProtonSession implements SessionCallback + { + producers.remove(receiver); + receiver.setTarget(null); +- ((LinkImpl) receiver).setLocalError(new EndpointError(e.getAmqpError(), e.getMessage())); ++ ((LinkImpl) receiver).setCondition(new ErrorCondition(Symbol.getSymbol(e.getAmqpError()), e.getMessage())); + receiver.close(); + } + } +@@ -222,7 +223,7 @@ public class ProtonSession implements SessionCallback + { + consumers.remove(protonConsumer.getConsumerID()); + sender.setSource(null); +- ((LinkImpl) sender).setLocalError(new EndpointError(e.getAmqpError(), e.getMessage())); ++ ((LinkImpl) sender).setCondition(new ErrorCondition(Symbol.getSymbol(e.getAmqpError()), e.getMessage())); + sender.close(); + } + } +-- +1.8.3.1 + diff --git a/0001-Qpid-Proton-0.5-support.patch b/0001-Qpid-Proton-0.5-support.patch deleted file mode 100644 index cd664a2..0000000 --- a/0001-Qpid-Proton-0.5-support.patch +++ /dev/null @@ -1,158 +0,0 @@ -From 175696bdc990347099d8c65f76a79a3c07627028 Mon Sep 17 00:00:00 2001 -From: Marek Goldmann -Date: Fri, 13 Sep 2013 12:04:09 +0200 -Subject: [PATCH] Qpid Proton 0.5 support - ---- - .../core/protocol/proton/ProtonProtocolManager.java | 7 ++++--- - .../protocol/proton/ProtonRemotingConnection.java | 19 +++++++++---------- - .../hornetq/core/protocol/proton/ProtonSession.java | 7 ++++--- - 3 files changed, 17 insertions(+), 16 deletions(-) - -diff --git a/hornetq-server/src/main/java/org/hornetq/core/protocol/proton/ProtonProtocolManager.java b/hornetq-server/src/main/java/org/hornetq/core/protocol/proton/ProtonProtocolManager.java -index 1711f8e..5d14abf 100644 ---- a/hornetq-server/src/main/java/org/hornetq/core/protocol/proton/ProtonProtocolManager.java -+++ b/hornetq-server/src/main/java/org/hornetq/core/protocol/proton/ProtonProtocolManager.java -@@ -27,8 +27,9 @@ import org.apache.qpid.proton.amqp.transaction.Coordinator; - import org.apache.qpid.proton.amqp.transaction.Declare; - import org.apache.qpid.proton.amqp.transaction.Declared; - import org.apache.qpid.proton.amqp.transaction.Discharge; -+import org.apache.qpid.proton.amqp.transport.ErrorCondition; -+import org.apache.qpid.proton.amqp.Symbol; - import org.apache.qpid.proton.engine.Delivery; --import org.apache.qpid.proton.engine.EndpointError; - import org.apache.qpid.proton.engine.EndpointState; - import org.apache.qpid.proton.engine.Link; - import org.apache.qpid.proton.engine.Receiver; -@@ -173,7 +174,7 @@ public class ProtonProtocolManager implements ProtocolManager, NotificationListe - @Override - public void onError(int errorCode, String errorMessage) - { -- ((LinkImpl) receiver).setLocalError(new EndpointError("" + errorCode, errorMessage)); -+ ((LinkImpl) receiver).setCondition(new ErrorCondition(Symbol.getSymbol("" + errorCode), errorMessage)); - } - }); - } -@@ -205,7 +206,7 @@ public class ProtonProtocolManager implements ProtocolManager, NotificationListe - @Override - public void onError(int errorCode, String errorMessage) - { -- ((LinkImpl) sender).setLocalError(new EndpointError("" + errorCode, errorMessage)); -+ ((LinkImpl) sender).setCondition(new ErrorCondition(Symbol.getSymbol("" + errorCode), errorMessage)); - } - }); - } -diff --git a/hornetq-server/src/main/java/org/hornetq/core/protocol/proton/ProtonRemotingConnection.java b/hornetq-server/src/main/java/org/hornetq/core/protocol/proton/ProtonRemotingConnection.java -index d547775..664350a 100644 ---- a/hornetq-server/src/main/java/org/hornetq/core/protocol/proton/ProtonRemotingConnection.java -+++ b/hornetq-server/src/main/java/org/hornetq/core/protocol/proton/ProtonRemotingConnection.java -@@ -22,7 +22,8 @@ - package org.hornetq.core.protocol.proton; - - import org.apache.qpid.proton.amqp.transport.AmqpError; --import org.apache.qpid.proton.engine.EndpointError; -+import org.apache.qpid.proton.amqp.transport.ErrorCondition; -+import org.apache.qpid.proton.amqp.Symbol; - import org.apache.qpid.proton.engine.EndpointState; - import org.apache.qpid.proton.engine.Sasl; - import org.apache.qpid.proton.engine.Session; -@@ -363,8 +364,7 @@ public class ProtonRemotingConnection implements RemotingConnection - boolean ok = "AMQP".equals(headerProt); - if(!ok) - { -- protonConnection.setLocalError(new EndpointError(HornetQAMQPException.AmqpError.ILLEGAL_STATE.getError(), -- "Unknown Protocol " + headerProt)); -+ protonConnection.setCondition(new ErrorCondition(AmqpError.ILLEGAL_STATE, "Unknown Protocol " + headerProt)); - } - return ok; - } -@@ -373,8 +373,7 @@ public class ProtonRemotingConnection implements RemotingConnection - { - if(major < 1) - { -- protonConnection.setLocalError(new EndpointError(HornetQAMQPException.AmqpError.ILLEGAL_STATE.getError(), -- "Version not supported " + major + "." + minor + "." + revision)); -+ protonConnection.setCondition(new ErrorCondition(AmqpError.ILLEGAL_STATE, "Version not supported " + major + "." + minor + "." + revision)); - return false; - } - return true; -@@ -472,7 +471,7 @@ public class ProtonRemotingConnection implements RemotingConnection - } - catch (HornetQAMQPException e) - { -- protonConnection.setLocalError(new EndpointError(e.getClass().getName(), e.getMessage())); -+ protonConnection.setCondition(new ErrorCondition(Symbol.getSymbol(e.getClass().getName()), e.getMessage())); - session.close(); - } - write(); -@@ -489,7 +488,7 @@ public class ProtonRemotingConnection implements RemotingConnection - } - catch (HornetQAMQPException e) - { -- link.setLocalError(new EndpointError(e.getAmqpError(), e.getMessage())); -+ link.setCondition(new ErrorCondition(Symbol.getSymbol(e.getAmqpError()), e.getMessage())); - link.close(); - } - link = (LinkImpl) protonConnection.linkHead(ProtonProtocolManager.UNINITIALIZED, ProtonProtocolManager.INITIALIZED); -@@ -510,7 +509,7 @@ public class ProtonRemotingConnection implements RemotingConnection - } - catch (HornetQAMQPException e) - { -- delivery.getLink().setLocalError(new EndpointError(e.getAmqpError(), e.getMessage())); -+ delivery.getLink().setCondition(new ErrorCondition(Symbol.getSymbol(e.getAmqpError()), e.getMessage())); - } - } - -@@ -523,7 +522,7 @@ public class ProtonRemotingConnection implements RemotingConnection - } - catch (HornetQAMQPException e) - { -- link.setLocalError(new EndpointError(e.getAmqpError(), e.getMessage())); -+ link.setCondition(new ErrorCondition(Symbol.getSymbol(e.getAmqpError()), e.getMessage())); - } - link = (LinkImpl) link.next(ProtonProtocolManager.ACTIVE, ProtonProtocolManager.ANY_ENDPOINT_STATE); - } -@@ -537,7 +536,7 @@ public class ProtonRemotingConnection implements RemotingConnection - } - catch (HornetQAMQPException e) - { -- link.setLocalError(new EndpointError(e.getAmqpError(), e.getMessage())); -+ link.setCondition(new ErrorCondition(Symbol.getSymbol(e.getAmqpError()), e.getMessage())); - } - link.close(); - -diff --git a/hornetq-server/src/main/java/org/hornetq/core/protocol/proton/ProtonSession.java b/hornetq-server/src/main/java/org/hornetq/core/protocol/proton/ProtonSession.java -index 637bdaa..a092fa6 100644 ---- a/hornetq-server/src/main/java/org/hornetq/core/protocol/proton/ProtonSession.java -+++ b/hornetq-server/src/main/java/org/hornetq/core/protocol/proton/ProtonSession.java -@@ -22,7 +22,8 @@ - package org.hornetq.core.protocol.proton; - - import org.apache.qpid.proton.amqp.transaction.Coordinator; --import org.apache.qpid.proton.engine.EndpointError; -+import org.apache.qpid.proton.amqp.transport.ErrorCondition; -+import org.apache.qpid.proton.amqp.Symbol; - import org.apache.qpid.proton.engine.Receiver; - import org.apache.qpid.proton.engine.Sender; - import org.apache.qpid.proton.engine.impl.LinkImpl; -@@ -192,7 +193,7 @@ public class ProtonSession implements SessionCallback - { - producers.remove(receiver); - receiver.setTarget(null); -- ((LinkImpl) receiver).setLocalError(new EndpointError(e.getAmqpError(), e.getMessage())); -+ ((LinkImpl) receiver).setCondition(new ErrorCondition(Symbol.getSymbol(e.getAmqpError()), e.getMessage())); - receiver.close(); - } - } -@@ -222,7 +223,7 @@ public class ProtonSession implements SessionCallback - { - consumers.remove(protonConsumer.getConsumerID()); - sender.setSource(null); -- ((LinkImpl) sender).setLocalError(new EndpointError(e.getAmqpError(), e.getMessage())); -+ ((LinkImpl) sender).setCondition(new ErrorCondition(Symbol.getSymbol(e.getAmqpError()), e.getMessage())); - sender.close(); - } - } --- -1.8.3.1 - diff --git a/hornetq.spec b/hornetq.spec index b02c6fd..79b5643 100644 --- a/hornetq.spec +++ b/hornetq.spec @@ -1,16 +1,16 @@ -%global namedreltag .Beta1 +%global namedreltag .Beta2 %global namedversion %{version}%{?namedreltag} -%global customnamedversion 2_4_0_Beta1 +%global customnamedversion 2_4_0_Beta2 Name: hornetq Version: 2.4.0 -Release: 0.1%{namedreltag}%{?dist} +Release: 0.2%{namedreltag}%{?dist} Summary: High performance messaging system License: ASL 2.0 URL: http://www.jboss.org/hornetq Source0: https://github.com/hornetq/hornetq/archive/HornetQ_%{customnamedversion}.tar.gz -Patch0: 0001-Qpid-Proton-0.5-support.patch +Patch0: 0001-Proton-0.5-support.patch BuildRequires: automake libtool autoconf BuildRequires: apiviz @@ -143,6 +143,9 @@ cp -L hornetq-native/src/.libs/libHornetQAIO.so %{buildroot}/%{_libdir}/libHorne %doc NOTICE %changelog +* Thu Oct 24 2013 Marek Goldmann - 2.4.0-0.2.Beta1 +- Upstream release 2.4.0.Beta2 + * Wed Sep 11 2013 Marek Goldmann - 2.4.0-0.1.Beta1 - Upstream release 2.4.0.Beta1 diff --git a/sources b/sources index 144b635..c4c3878 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -71fdd7c24ce5053cb5a9e9ac037d86dc HornetQ_2_4_0_Beta1.tar.gz +0526f240bbc4960f874e073462634da6 HornetQ_2_4_0_Beta2.tar.gz