From 2da9031ccbe857aa7e2b0c6eb39a0e457b6945ba Mon Sep 17 00:00:00 2001 From: Marek Goldmann Date: Jan 09 2014 14:34:29 +0000 Subject: Upstream release 2.4.0.Final --- diff --git a/.gitignore b/.gitignore index d40b34f..1398f86 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ /HornetQ_2_3_1_FINAL.tar.gz /HornetQ_2_4_0_Beta1.tar.gz /HornetQ_2_4_0_Beta2.tar.gz +/HornetQ_2_4_0_Final.tar.gz diff --git a/0001-Proton-0.5-support.patch b/0001-Proton-0.5-support.patch deleted file mode 100644 index 5107809..0000000 --- a/0001-Proton-0.5-support.patch +++ /dev/null @@ -1,158 +0,0 @@ -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/hornetq.spec b/hornetq.spec index 79b5643..e795e25 100644 --- a/hornetq.spec +++ b/hornetq.spec @@ -1,17 +1,15 @@ -%global namedreltag .Beta2 +%global namedreltag .Final %global namedversion %{version}%{?namedreltag} -%global customnamedversion 2_4_0_Beta2 +%global customnamedversion 2_4_0_Final Name: hornetq Version: 2.4.0 -Release: 0.2%{namedreltag}%{?dist} +Release: 1%{?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-Proton-0.5-support.patch - BuildRequires: automake libtool autoconf BuildRequires: apiviz BuildRequires: aether @@ -33,7 +31,7 @@ BuildRequires: jboss-naming BuildRequires: jbossws-parent BuildRequires: jdepend BuildRequires: libaio-devel -BuildRequires: netty +BuildRequires: netty4 BuildRequires: maven-local BuildRequires: javacc-maven-plugin BuildRequires: java-service-wrapper @@ -47,6 +45,7 @@ BuildRequires: saxon BuildRequires: qpid-proton-java BuildRequires: mvn(org.jboss.spec.javax.resource:jboss-connector-api_1.6_spec) BuildRequires: mvn(org.jboss.spec.javax.jms:jboss-jms-api_2.0_spec) +BuildRequires: nar-maven-plugin %description HornetQ is an open source project to build a multi-protocol, embeddable, @@ -61,12 +60,10 @@ This package contains the API documentation for %{name}. %prep %setup -q -n hornetq-HornetQ_%{customnamedversion} -%patch0 -p1 - # Remove bundled .so files find -name "*.so" -delete -%pom_remove_dep "org.jboss.jbossts:jbossjts" hornetq-jms-server/pom.xml +%pom_remove_dep "org.jboss.jbossts.jts:jbossjts-jacorb" hornetq-jms-server/pom.xml %pom_add_dep "org.jboss.narayana.jta:jta" hornetq-jms-server/pom.xml %pom_disable_module hornetq-service-sar @@ -78,9 +75,22 @@ find -name "*.so" -delete %pom_disable_module integration/hornetq-jboss-as-integration %pom_disable_module integration/hornetq-spring-integration %pom_disable_module integration/hornetq-twitter-integration +%pom_disable_module integration/hornetq-aerogear-integration %pom_remove_dep "org.jboss.microcontainer:jboss-kernel" +%pom_remove_dep "io.netty:netty-all" +%pom_remove_dep "io.netty:netty-all" hornetq-commons/pom.xml +%pom_remove_dep "io.netty:netty-all" hornetq-server/pom.xml +%pom_remove_dep "io.netty:netty-all" hornetq-core-client/pom.xml + +%pom_add_dep "io.netty:netty-buffer:4" pom.xml +%pom_add_dep "io.netty:netty-common:4" pom.xml +%pom_add_dep "io.netty:netty-transport:4" pom.xml +%pom_add_dep "io.netty:netty-codec:4" pom.xml +%pom_add_dep "io.netty:netty-codec-http:4" pom.xml +%pom_add_dep "io.netty:netty-handler:4" pom.xml + # Replace old jca %pom_remove_dep "org.jboss.javaee:jboss-jca-api" hornetq-ra/pom.xml %pom_add_dep "org.jboss.spec.javax.resource:jboss-connector-api_1.6_spec" hornetq-ra/pom.xml @@ -89,44 +99,30 @@ find -name "*.so" -delete %pom_xpath_inject "pom:build/pom:plugins/pom:plugin[pom:artifactId = 'xml-maven-plugin']/pom:configuration" "net.sf.saxon.TransformerFactoryImpl" hornetq-core-client/pom.xml %build -# Prebuild the classes, so we can create new native bits later -xmvn -B -o compile - -# Build native bits -export JAVA_HOME=/usr/lib/jvm/java - +# Workaround for building native bits +# Currently the build script uses the .so in the hornetq-nativebin/ directory +# but we need to rebuild them. The issue is that the mvn build process does not +# use the new .so files we've built. Here is a simple workaround. pushd hornetq-native -autoreconf --install -%configure -make clean - -# Generate C headers -pushd src -javah -classpath $(build-classpath jboss-logging/jboss-logging):../../hornetq-journal/target/classes org.hornetq.core.asyncio.impl.AsynchronousFileImpl +# Let's build the .so files +%mvn_build -i -f -- -Pnative-build +# Copy them to hornetq-native/bin/ dir +find -name "*.so" -exec cp {} bin/libHornetQAIO.so \; +find -name "*.so" -exec cp {} bin/libHornetQAIO%{__isa_bits}.so \; popd -make %{?_smp_mflags} - -%ifarch x86_64 -cp -L src/.libs/libHornetQAIO.so bin/libHornetQAIO64.so -%else -cp -L src/.libs/libHornetQAIO.so bin/libHornetQAIO32.so -%endif -popd +# This will rebuild one more time the hornet-native stuff, +# but this time will include the correct native libraries -# Skipping test because junit 3 is not available and 4 breaks the test suite -# DEBUG: [ERROR] /builddir/build/BUILD/hornetq-HornetQ_2_3_1_FINAL/hornetq-server/src/test/java/org/hornetq/tests/util/UnitTestCase.java:[466,15] method addTestSuite in class junit.framework.TestSuite cannot be applied to given types; -# DEBUG: [ERROR] required: java.lang.Class -# DEBUG: [ERROR] found: java.lang.Class -# DEBUG: [ERROR] reason: actual argument java.lang.Class cannot be converted to java.lang.Class by method invocation conversion -%mvn_build -f -- -P maven-release +# Tests are skipped because required modules are disabled +%mvn_build -f -- -Pmaven-release %install %mvn_install # Install native stuff install -d -m 755 %{buildroot}/%{_libdir} -cp -L hornetq-native/src/.libs/libHornetQAIO.so %{buildroot}/%{_libdir}/libHornetQAIO.so +cp -L hornetq-native/bin/libHornetQAIO.so %{buildroot}/%{_libdir}/libHornetQAIO.so %post -p /sbin/ldconfig %postun -p /sbin/ldconfig @@ -143,6 +139,12 @@ cp -L hornetq-native/src/.libs/libHornetQAIO.so %{buildroot}/%{_libdir}/libHorne %doc NOTICE %changelog +* Thu Jan 09 2014 Marek Goldmann - 2.4.0-1 +- Upstream release 2.4.0.Final + +* Mon Dec 16 2013 Marek Goldmann - 2.4.0-0.3.Beta3 +- Upstream release 2.4.0.Beta3 + * Thu Oct 24 2013 Marek Goldmann - 2.4.0-0.2.Beta1 - Upstream release 2.4.0.Beta2 diff --git a/sources b/sources index c4c3878..b911593 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -0526f240bbc4960f874e073462634da6 HornetQ_2_4_0_Beta2.tar.gz +0ec2b2128e1d9fc9bb04d7a235dad232 HornetQ_2_4_0_Final.tar.gz