activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r1528576 - in /activemq/activemq-dotnet/Apache.NMS.ActiveMQ.Openwire.Generator: ./ src/main/java/org/apache/activemq/nms/openwire/tool/commands/
Date Wed, 02 Oct 2013 17:42:08 GMT
Author: tabish
Date: Wed Oct  2 17:42:08 2013
New Revision: 1528576

URL: http://svn.apache.org/r1528576
Log:
https://issues.apache.org/jira/browse/AMQNET-444

Update to generate v10

Added:
    activemq/activemq-dotnet/Apache.NMS.ActiveMQ.Openwire.Generator/src/main/java/org/apache/activemq/nms/openwire/tool/commands/XATransactionIdGenerator.java
  (with props)
Modified:
    activemq/activemq-dotnet/Apache.NMS.ActiveMQ.Openwire.Generator/pom.xml
    activemq/activemq-dotnet/Apache.NMS.ActiveMQ.Openwire.Generator/src/main/java/org/apache/activemq/nms/openwire/tool/commands/MessageIdGenerator.java
    activemq/activemq-dotnet/Apache.NMS.ActiveMQ.Openwire.Generator/src/main/java/org/apache/activemq/nms/openwire/tool/commands/TransactionInfoGenerator.java

Modified: activemq/activemq-dotnet/Apache.NMS.ActiveMQ.Openwire.Generator/pom.xml
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.ActiveMQ.Openwire.Generator/pom.xml?rev=1528576&r1=1528575&r2=1528576&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.ActiveMQ.Openwire.Generator/pom.xml (original)
+++ activemq/activemq-dotnet/Apache.NMS.ActiveMQ.Openwire.Generator/pom.xml Wed Oct  2 17:42:08
2013
@@ -65,8 +65,8 @@
     <projectName>Apache NMS.ActiveMQ</projectName>
     <annogen-version>0.1.0</annogen-version>
     <ant-version>1.6.2</ant-version>
-    <xstream-version>1.4.2</xstream-version>
-    <activemq-core-dir>${ACTIVEMQ_SRC_HOME}/activemq-client/</activemq-core-dir>
+    <xstream-version>1.4.4</xstream-version>
+    <activemq-src-dir>${ACTIVEMQ_SRC_HOME}/activemq-client/</activemq-src-dir>
     <nms-activemq-dir>${NMS_ACTIVEMQ_HOME}</nms-activemq-dir>
   </properties>
 
@@ -128,8 +128,8 @@
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-compiler-plugin</artifactId>
         <configuration>
-          <source>1.5</source>
-          <target>1.5</target>
+          <source>1.6</source>
+          <target>1.6</target>
         </configuration>
       </plugin>
       <plugin>
@@ -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="9" source="${activemq-core-dir}" target="${nms-activemq-dir}"
/>
+            <generate maxVersion="10" source="${activemq-src-dir}" target="${nms-activemq-dir}"
/>
           </tasks>
         </configuration>
       </plugin>

Modified: activemq/activemq-dotnet/Apache.NMS.ActiveMQ.Openwire.Generator/src/main/java/org/apache/activemq/nms/openwire/tool/commands/MessageIdGenerator.java
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.ActiveMQ.Openwire.Generator/src/main/java/org/apache/activemq/nms/openwire/tool/commands/MessageIdGenerator.java?rev=1528576&r1=1528575&r2=1528576&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.ActiveMQ.Openwire.Generator/src/main/java/org/apache/activemq/nms/openwire/tool/commands/MessageIdGenerator.java
(original)
+++ activemq/activemq-dotnet/Apache.NMS.ActiveMQ.Openwire.Generator/src/main/java/org/apache/activemq/nms/openwire/tool/commands/MessageIdGenerator.java
Wed Oct  2 17:42:08 2013
@@ -59,7 +59,21 @@ public class MessageIdGenerator extends 
 
         out.println("            if(key == null) ");
         out.println("            {");
-        out.println("                key = producerId.ToString() + \":\" + producerSequenceId
+ \":\" + brokerSequenceId;");
+        out.println("                if (!String.IsNullOrEmpty(textView))");
+        out.println("                {");
+        out.println("                    if (textView.StartsWith(\"ID:\"))");
+        out.println("                    {");
+        out.println("                        key = textView;");
+        out.println("                    }");
+        out.println("                    else");
+        out.println("                    {");
+        out.println("                        key = \"ID:\" + textView;");
+        out.println("                    }");
+        out.println("                }");
+        out.println("                else");
+        out.println("                {");
+        out.println("                    key = producerId.ToString() + \":\" + producerSequenceId
+ \":\" + brokerSequenceId;");
+        out.println("                }");
         out.println("            }");
         out.println("            ");
         out.println("            return key;");

Modified: activemq/activemq-dotnet/Apache.NMS.ActiveMQ.Openwire.Generator/src/main/java/org/apache/activemq/nms/openwire/tool/commands/TransactionInfoGenerator.java
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.ActiveMQ.Openwire.Generator/src/main/java/org/apache/activemq/nms/openwire/tool/commands/TransactionInfoGenerator.java?rev=1528576&r1=1528575&r2=1528576&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.ActiveMQ.Openwire.Generator/src/main/java/org/apache/activemq/nms/openwire/tool/commands/TransactionInfoGenerator.java
(original)
+++ activemq/activemq-dotnet/Apache.NMS.ActiveMQ.Openwire.Generator/src/main/java/org/apache/activemq/nms/openwire/tool/commands/TransactionInfoGenerator.java
Wed Oct  2 17:42:08 2013
@@ -25,21 +25,21 @@ public class TransactionInfoGenerator ex
         out.println("            switch(type)");
         out.println("            {");
         out.println("                case TransactionInfo.BEGIN:");
-        out.println("                    return visitor.processBeginTransaction(this);");
+        out.println("                    return visitor.ProcessBeginTransaction(this);");
         out.println("                case TransactionInfo.END:");
-        out.println("                    return visitor.processEndTransaction(this);");
+        out.println("                    return visitor.ProcessEndTransaction(this);");
         out.println("                case TransactionInfo.PREPARE:");
-        out.println("                    return visitor.processPrepareTransaction(this);");
+        out.println("                    return visitor.ProcessPrepareTransaction(this);");
         out.println("                case TransactionInfo.COMMIT_ONE_PHASE:");
-        out.println("                    return visitor.processCommitTransactionOnePhase(this);");
+        out.println("                    return visitor.ProcessCommitTransactionOnePhase(this);");
         out.println("                case TransactionInfo.COMMIT_TWO_PHASE:");
-        out.println("                    return visitor.processCommitTransactionTwoPhase(this);");
+        out.println("                    return visitor.ProcessCommitTransactionTwoPhase(this);");
         out.println("                case TransactionInfo.ROLLBACK:");
-        out.println("                    return visitor.processRollbackTransaction(this);");
+        out.println("                    return visitor.ProcessRollbackTransaction(this);");
         out.println("                case TransactionInfo.RECOVER:");
-        out.println("                    return visitor.processRecoverTransactions(this);");
+        out.println("                    return visitor.ProcessRecoverTransactions(this);");
         out.println("                case TransactionInfo.FORGET:");
-        out.println("                    return visitor.processForgetTransaction(this);");
+        out.println("                    return visitor.ProcessForgetTransaction(this);");
         out.println("                default:");
         out.println("                    throw new IOException(\"Transaction info type unknown:
\" + type);");
         out.println("            }");

Added: activemq/activemq-dotnet/Apache.NMS.ActiveMQ.Openwire.Generator/src/main/java/org/apache/activemq/nms/openwire/tool/commands/XATransactionIdGenerator.java
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.ActiveMQ.Openwire.Generator/src/main/java/org/apache/activemq/nms/openwire/tool/commands/XATransactionIdGenerator.java?rev=1528576&view=auto
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.ActiveMQ.Openwire.Generator/src/main/java/org/apache/activemq/nms/openwire/tool/commands/XATransactionIdGenerator.java
(added)
+++ activemq/activemq-dotnet/Apache.NMS.ActiveMQ.Openwire.Generator/src/main/java/org/apache/activemq/nms/openwire/tool/commands/XATransactionIdGenerator.java
Wed Oct  2 17:42:08 2013
@@ -0,0 +1,36 @@
+/**
+ * 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 XATransactionIdGenerator extends CommandClassGenerator {
+
+    protected void generateUsingDirectives( PrintWriter out ) {
+        super.generateUsingDirectives(out);
+
+        out.println("using System;");
+    }
+
+    protected void generateToStringBody( PrintWriter out ) {
+        out.println("            return GetType().Name + \"[ \" +");
+        out.println("                \"FormatId = \" + FormatId + \", \" +");
+        out.println("                \"GlobalTransactionId = \" + BitConverter.ToString(GlobalTransactionId).Replace(\"-\",
string.Empty) + \", \" +");
+        out.println("                \"BranchQualifier = \" + System.Text.ASCIIEncoding.ASCII.GetString(BranchQualifier)
+ \" ]\";");
+    }
+
+}

Propchange: activemq/activemq-dotnet/Apache.NMS.ActiveMQ.Openwire.Generator/src/main/java/org/apache/activemq/nms/openwire/tool/commands/XATransactionIdGenerator.java
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message