Skip to content
Permalink
Browse files
Add a transient Exception field in MessageDispatch to store the Rollb…
…ack cause.
  • Loading branch information
Timothy A. Bish committed Apr 18, 2013
1 parent b78d698 commit 0e8f216d5a8b3475c29e6347d55cc674506302b5
Showing 1 changed file with 27 additions and 0 deletions.
@@ -16,11 +16,38 @@
*/
package org.apache.activemq.nms.openwire.tool.commands;

import java.io.PrintWriter;

public class MessageDispatchGenerator extends CommandClassGenerator {

public MessageDispatchGenerator() {
super();
this.setComparable(true);
}

protected void generateUsingDirectives( PrintWriter out ) {
super.generateUsingDirectives(out);

out.println("using System;");
}

protected void generateProperties( PrintWriter out ) {

out.println(" private Exception rollbackCause = null;");
out.println("");

super.generateProperties(out);
}

protected void generateAdditonalMembers( PrintWriter out ) {
out.println(" public Exception RollbackCause");
out.println(" {");
out.println(" get { return this.rollbackCause; }");
out.println(" set { this.rollbackCause = value; }");
out.println(" }");
out.println("");

super.generateAdditonalMembers( out );
}

}

0 comments on commit 0e8f216

Please sign in to comment.