[jbpm-commits] JBoss JBPM SVN: r3666 - jbpm3/trunk/modules/core/src/main/java/org/jbpm/command/impl.
do-not-reply at jboss.org
do-not-reply at jboss.org
Sun Jan 18 22:46:05 EST 2009
Author: alex.guizar at jboss.com
Date: 2009-01-18 22:46:04 -0500 (Sun, 18 Jan 2009)
New Revision: 3666
Modified:
jbpm3/trunk/modules/core/src/main/java/org/jbpm/command/impl/CommandServiceImpl.java
Log:
log exceptions in command service
Modified: jbpm3/trunk/modules/core/src/main/java/org/jbpm/command/impl/CommandServiceImpl.java
===================================================================
--- jbpm3/trunk/modules/core/src/main/java/org/jbpm/command/impl/CommandServiceImpl.java 2009-01-17 12:41:08 UTC (rev 3665)
+++ jbpm3/trunk/modules/core/src/main/java/org/jbpm/command/impl/CommandServiceImpl.java 2009-01-19 03:46:04 UTC (rev 3666)
@@ -32,28 +32,24 @@
import org.jbpm.command.CommandService;
/**
- * Provide services for accessing the jBPM engine. Access is currently provided through a set of
- * {@link org.jbpm.command.Command} derived operations.
+ * The command service provides access the jBPM engine and its related services. Access is provided
+ * through a set of {@link org.jbpm.command.Command} derived operations.
*
* @author Jim Rigsbee
* @author Tom Baeyens
*/
-public class CommandServiceImpl implements CommandService, Serializable
-{
+public class CommandServiceImpl implements CommandService, Serializable {
protected final JbpmConfiguration jbpmConfiguration;
private static final long serialVersionUID = 1L;
/**
- * Establish an instance of the command service with a particular jBPM configuration which
- * provides connectivity to the jBPM engine and its related services including the persistence
- * manager.
+ * Establish an instance of the command service with a particular configuration.
*
* @param jbpmConfiguration jBPM Configuration
*/
- public CommandServiceImpl(JbpmConfiguration jbpmConfiguration)
- {
+ public CommandServiceImpl(JbpmConfiguration jbpmConfiguration) {
this.jbpmConfiguration = jbpmConfiguration;
}
@@ -64,26 +60,23 @@
*
* @param command jBPM engine command to execute
*/
- public Object execute(Command command)
- {
+ public Object execute(Command command) {
JbpmContext jbpmContext = jbpmConfiguration.createJbpmContext();
- try
- {
+ try {
log.debug("executing " + command);
return command.execute(jbpmContext);
}
- catch (RuntimeException e)
- {
+ catch (RuntimeException e) {
jbpmContext.setRollbackOnly();
+ log.error("failed to execute " + command, e);
throw e;
}
- catch (Exception e)
- {
+ catch (Exception e) {
jbpmContext.setRollbackOnly();
+ log.error("failed to execute " + command, e);
throw new JbpmException("failed to execute " + command, e);
}
- finally
- {
+ finally {
jbpmContext.close();
}
}
More information about the jbpm-commits
mailing list