[jbpm-commits] JBoss JBPM SVN: r6705 - jbpm3/branches/jbpm-3.2-soa/enterprise-jee5/src/main/java/org/jbpm/ejb.

do-not-reply at jboss.org do-not-reply at jboss.org
Thu Sep 30 07:48:29 EDT 2010


Author: bradsdavis
Date: 2010-09-30 07:48:29 -0400 (Thu, 30 Sep 2010)
New Revision: 6705

Modified:
   jbpm3/branches/jbpm-3.2-soa/enterprise-jee5/src/main/java/org/jbpm/ejb/CommandListenerBean.java
Log:
Enterprise is supposed to be used only by SOA-P, which provides commons-lang.  

This is to use ReflectionToStringBuilder to reflect commands coming into the CommandListenerBean.  This is needed because we need to be able to associate a command with a message, in case the command fails and the message is sent to the DLQ.  

Modified: jbpm3/branches/jbpm-3.2-soa/enterprise-jee5/src/main/java/org/jbpm/ejb/CommandListenerBean.java
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/enterprise-jee5/src/main/java/org/jbpm/ejb/CommandListenerBean.java	2010-09-30 11:45:50 UTC (rev 6704)
+++ jbpm3/branches/jbpm-3.2-soa/enterprise-jee5/src/main/java/org/jbpm/ejb/CommandListenerBean.java	2010-09-30 11:48:29 UTC (rev 6705)
@@ -38,6 +38,7 @@
 import javax.jms.ObjectMessage;
 import javax.jms.Session;
 
+import org.apache.commons.lang.builder.ReflectionToStringBuilder;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.jbpm.command.Command;
@@ -111,22 +112,22 @@
       Object result;
       try {
         if (log.isDebugEnabled()) {
-          log.debug("executing " + command);
+          log.debug("executing " + ReflectionToStringBuilder.toString(command));
         }
         result = commandService.execute(command);
 
         if (log.isTraceEnabled()) {
-          log.trace(command + " completed successfully, committing");
+          log.trace(ReflectionToStringBuilder.toString(command) + " completed successfully, committing");
         }
       }
       catch (RuntimeException e) {
         // if this is a locking exception, keep it quiet
         if (DbPersistenceService.isLockingException(e)) {
           StaleObjectLogConfigurer.getStaleObjectExceptionsLog().error(message
-            + " failed to execute " + command, e);
+            + " failed to execute " + ReflectionToStringBuilder.toString(command), e);
         }
         else {
-          log.error(message + " failed to execute " + command, e);
+          log.error(message + " failed to execute " + ReflectionToStringBuilder.toString(command), e);
         }
         // MDBs are not supposed to throw exceptions
         messageDrivenContext.setRollbackOnly();
@@ -161,7 +162,7 @@
         return (Command) object;
       }
       else {
-        log.warn("not a command: " + object);
+        log.warn("not a command: " + ReflectionToStringBuilder.toString(object));
       }
     }
     else {



More information about the jbpm-commits mailing list