fix for: https://issues.apache.org/jira/browse/AMQNET-427
diff --git a/pom.xml b/pom.xml
index 97d668d..180bba8 100644
--- a/pom.xml
+++ b/pom.xml
@@ -33,7 +33,7 @@
<description>Tool used to create the NMS.ActiveMQ OpenWire Commands and Marshallers.</description>
<inceptionYear>2009</inceptionYear>
<prerequisites>
- <maven>2.0.9</maven>
+ <maven>3.0.4</maven>
</prerequisites>
<organization>
@@ -61,12 +61,12 @@
</mailingLists>
<properties>
- <activemq-version>5.5-SNAPSHOT</activemq-version>
+ <activemq-version>5.9-SNAPSHOT</activemq-version>
<projectName>Apache NMS.ActiveMQ</projectName>
<annogen-version>0.1.0</annogen-version>
<ant-version>1.6.2</ant-version>
- <xstream-version>1.3.1</xstream-version>
- <activemq-core-dir>${ACTIVEMQ_SRC_HOME}/activemq-core/</activemq-core-dir>
+ <xstream-version>1.4.2</xstream-version>
+ <activemq-core-dir>${ACTIVEMQ_SRC_HOME}/activemq-client/</activemq-core-dir>
<nms-activemq-dir>${NMS_ACTIVEMQ_HOME}</nms-activemq-dir>
</properties>
@@ -78,7 +78,7 @@
</dependency>
<dependency>
<groupId>org.apache.activemq</groupId>
- <artifactId>activemq-core</artifactId>
+ <artifactId>activemq-client</artifactId>
<version>${activemq-version}</version>
</dependency>
</dependencies>
@@ -86,12 +86,12 @@
<distributionManagement>
<repository>
<id>release.apache.org</id>
- <name>ActiveMQ-CPP Release Repository</name>
+ <name>ActiveMQ NMS Release Repository</name>
<url>file:///home/tabish/dev/maven2/repo/release</url>
</repository>
<snapshotRepository>
<id>snapshots.apache.org</id>
- <name>ActiveMQ-CPP Snapshots Repository</name>
+ <name>ActiveMQ NMS Snapshots Repository</name>
<url>file:///home/tabish/dev/maven2/repo/snapshots</url>
</snapshotRepository>
</distributionManagement>
@@ -139,7 +139,7 @@
<tasks>
<echo>Running OpenWire Generator</echo>
<taskdef name="generate" classname="org.apache.activemq.nms.openwire.tool.AmqCSharpGeneratorTask" classpathref="maven.compile.classpath" />
- <generate maxVersion="6" source="${activemq-core-dir}" target="${nms-activemq-dir}" />
+ <generate maxVersion="9" source="${activemq-core-dir}" target="${nms-activemq-dir}" />
</tasks>
</configuration>
</plugin>
diff --git a/src/main/java/org/apache/activemq/nms/openwire/tool/AmqCSharpGeneratorTask.java b/src/main/java/org/apache/activemq/nms/openwire/tool/AmqCSharpGeneratorTask.java
index a8d9027..b340436 100644
--- a/src/main/java/org/apache/activemq/nms/openwire/tool/AmqCSharpGeneratorTask.java
+++ b/src/main/java/org/apache/activemq/nms/openwire/tool/AmqCSharpGeneratorTask.java
@@ -30,7 +30,7 @@
public class AmqCSharpGeneratorTask extends Task {
- int maxVersion = 5;
+ int maxVersion = 9;
File source = new File(".");
File target = new File(".");
diff --git a/src/main/java/org/apache/activemq/nms/openwire/tool/commands/MessageAckGenerator.java b/src/main/java/org/apache/activemq/nms/openwire/tool/commands/MessageAckGenerator.java
new file mode 100644
index 0000000..a1f4cde
--- /dev/null
+++ b/src/main/java/org/apache/activemq/nms/openwire/tool/commands/MessageAckGenerator.java
@@ -0,0 +1,50 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.activemq.nms.openwire.tool.commands;
+
+import java.io.PrintWriter;
+
+public class MessageAckGenerator extends CommandClassGenerator {
+
+ protected void generateConstructors( PrintWriter out ) {
+
+ out.println(" public "+getClassName()+"() : base()");
+ out.println(" {");
+ out.println(" }");
+ out.println("");
+ out.println(" public "+getClassName()+"(MessageDispatch dispatch, byte ackType, int messageCount) : base()");
+ out.println(" {");
+ out.println(" this.ackType = ackType;");
+ out.println(" this.consumerId = dispatch.ConsumerId;");
+ out.println(" this.destination = dispatch.Destination;");
+ out.println(" this.lastMessageId = dispatch.Message.MessageId;");
+ out.println(" this.messageCount = messageCount;");
+ out.println(" }");
+ out.println("");
+ out.println(" public "+getClassName()+"(Message message, byte ackType, int messageCount) : base()");
+ out.println(" {");
+ out.println(" this.ackType = ackType;");
+ out.println(" this.destination = message.Destination;");
+ out.println(" this.lastMessageId = message.MessageId;");
+ out.println(" this.messageCount = messageCount;");
+ out.println(" }");
+ out.println("");
+
+ super.generateConstructors(out);
+ }
+
+}