Author: tabish
Date: Wed Jun 8 17:52:34 2011
New Revision: 1133483
URL: http://svn.apache.org/viewvc?rev=1133483&view=rev
Log:
Make a few needed fixes before generating updated OpenWire commands and
marshalers
Modified:
activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/commands/ConsumerIdHeaderGenerator.java
activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/commands/ConsumerIdSourceGenerator.java
activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/commands/ProducerIdHeaderGenerator.java
activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/commands/ProducerIdSourceGenerator.java
activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/commands/XATransactionIdSourceGenerator.java
Modified:
activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/commands/ConsumerIdHeaderGenerator.java
URL:
http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/commands/ConsumerIdHeaderGenerator.java?rev=1133483&r1=1133482&r2=1133483&view=diff
==============================================================================
---
activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/commands/ConsumerIdHeaderGenerator.java
(original)
+++
activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/commands/ConsumerIdHeaderGenerator.java
Wed Jun 8 17:52:34 2011
@@ -37,12 +37,12 @@ public class ConsumerIdHeaderGenerator e
protected void generateProperties( PrintWriter out ) {
+ super.generateProperties(out);
+
out.println(" private:");
out.println("");
out.println(" mutable Pointer<SessionId> parentId;");
out.println("");
-
- super.generateProperties(out);
}
protected void generateAdditonalMembers( PrintWriter out ) {
Modified:
activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/commands/ConsumerIdSourceGenerator.java
URL:
http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/commands/ConsumerIdSourceGenerator.java?rev=1133483&r1=1133482&r2=1133483&view=diff
==============================================================================
---
activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/commands/ConsumerIdSourceGenerator.java
(original)
+++
activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/commands/ConsumerIdSourceGenerator.java
Wed Jun 8 17:52:34 2011
@@ -36,7 +36,7 @@ public class ConsumerIdSourceGenerator e
super.generateAdditionalConstructors(out);
}
- protected String generateInitializerList(String current) {
+ protected String generateInitializerList() {
return super.generateInitializerList() + ", parentId()";
}
Modified:
activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/commands/ProducerIdHeaderGenerator.java
URL:
http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/commands/ProducerIdHeaderGenerator.java?rev=1133483&r1=1133482&r2=1133483&view=diff
==============================================================================
---
activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/commands/ProducerIdHeaderGenerator.java
(original)
+++
activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/commands/ProducerIdHeaderGenerator.java
Wed Jun 8 17:52:34 2011
@@ -39,12 +39,12 @@ public class ProducerIdHeaderGenerator e
protected void generateProperties( PrintWriter out ) {
+ super.generateProperties(out);
+
out.println(" private:");
out.println("");
out.println(" mutable Pointer<SessionId> parentId;");
out.println("");
-
- super.generateProperties(out);
}
protected void generateAdditonalMembers( PrintWriter out ) {
Modified:
activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/commands/ProducerIdSourceGenerator.java
URL:
http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/commands/ProducerIdSourceGenerator.java?rev=1133483&r1=1133482&r2=1133483&view=diff
==============================================================================
---
activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/commands/ProducerIdSourceGenerator.java
(original)
+++
activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/commands/ProducerIdSourceGenerator.java
Wed Jun 8 17:52:34 2011
@@ -51,7 +51,7 @@ public class ProducerIdSourceGenerator e
super.generateAdditionalConstructors(out);
}
- protected String generateInitializerList(String current) {
+ protected String generateInitializerList() {
return super.generateInitializerList() + ", parentId()";
}
Modified:
activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/commands/XATransactionIdSourceGenerator.java
URL:
http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/commands/XATransactionIdSourceGenerator.java?rev=1133483&r1=1133482&r2=1133483&view=diff
==============================================================================
---
activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/commands/XATransactionIdSourceGenerator.java
(original)
+++
activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/commands/XATransactionIdSourceGenerator.java
Wed Jun 8 17:52:34 2011
@@ -121,7 +121,11 @@ public class XATransactionIdSourceGenera
out.println("int XATransactionId::getBranchQualifier( unsigned char*
buffer, int size ) const {");
out.println("");
out.println(" if( size < 0 ) {");
- out.println(" throw cms::XAException(\"Invalid negative size
value passed to getBranchQualifier()\");");
+ out.println(" throw cms::XAException(\"Error: Negative size
value passed to getBranchQualifier()\");");
+ out.println(" }");
+ out.println("");
+ out.println(" if( buffer == NULL ) {");
+ out.println(" throw cms::XAException(\"Error: NULL buffer
pointer passed to getBranchQualifier()\");");
out.println(" }");
out.println("");
out.println(" if( size < (int)this->branchQualifier.size() ) {");
@@ -141,7 +145,11 @@ public class XATransactionIdSourceGenera
out.println("int XATransactionId::getGlobalTransactionId( unsigned
char* buffer, int size ) const {");
out.println("");
out.println(" if( size < 0 ) {");
- out.println(" throw cms::XAException(\"Invalid negative size
value passed to getGlobalTransactionId()\");");
+ out.println(" throw cms::XAException(\"Error: Negative size
value passed to getGlobalTransactionId()\");");
+ out.println(" }");
+ out.println("");
+ out.println(" if( buffer == NULL ) {");
+ out.println(" throw cms::XAException(\"Error: NULL buffer
pointer passed to getGlobalTransactionId()\");");
out.println(" }");
out.println("");
out.println(" if( size < (int)this->globalTransactionId.size() )
{");