Author: manaRH
Date: 2011-02-15 18:17:51 -0500 (Tue, 15 Feb 2011)
New Revision: 14047
Modified:
branches/enterprise/JBPAPP_5_0/src/main/org/jboss/seam/bpm/BusinessProcess.java
branches/enterprise/JBPAPP_5_0/src/main/org/jboss/seam/bpm/BusinessProcessInterceptor.java
Log:
JBPAPP-5517 cleaning log messages while throwing exception
Modified: branches/enterprise/JBPAPP_5_0/src/main/org/jboss/seam/bpm/BusinessProcess.java
===================================================================
---
branches/enterprise/JBPAPP_5_0/src/main/org/jboss/seam/bpm/BusinessProcess.java 2011-02-15
13:40:09 UTC (rev 14046)
+++
branches/enterprise/JBPAPP_5_0/src/main/org/jboss/seam/bpm/BusinessProcess.java 2011-02-15
23:17:51 UTC (rev 14047)
@@ -220,7 +220,7 @@
}
}
catch (Exception e) {
- log.error("Exception while ending bussiness task!");
+ // log.error("Exception while ending bussiness task!");
processId = null;
taskId = null;
throw new RuntimeException(e);
@@ -250,7 +250,7 @@
}
catch (Exception e)
{
- log.error("Exception while transition is in process!");
+ //log.error("Exception while transition is in process!");
processId = null;
taskId = null;
throw new RuntimeException(e);
Modified:
branches/enterprise/JBPAPP_5_0/src/main/org/jboss/seam/bpm/BusinessProcessInterceptor.java
===================================================================
---
branches/enterprise/JBPAPP_5_0/src/main/org/jboss/seam/bpm/BusinessProcessInterceptor.java 2011-02-15
13:40:09 UTC (rev 14046)
+++
branches/enterprise/JBPAPP_5_0/src/main/org/jboss/seam/bpm/BusinessProcessInterceptor.java 2011-02-15
23:17:51 UTC (rev 14047)
@@ -17,14 +17,12 @@
import org.jboss.seam.annotations.intercept.Interceptor;
import org.jboss.seam.contexts.Contexts;
import org.jboss.seam.core.BijectionInterceptor;
-import org.jboss.seam.core.EventInterceptor;
import org.jboss.seam.core.Expressions;
import org.jboss.seam.core.Init;
import org.jboss.seam.intercept.AbstractInterceptor;
import org.jboss.seam.intercept.InvocationContext;
import org.jboss.seam.log.LogProvider;
import org.jboss.seam.log.Logging;
-import org.jboss.seam.transaction.TransactionInterceptor;
import org.jboss.seam.util.Strings;
import org.jboss.seam.web.Parameters;
@@ -68,7 +66,7 @@
return BusinessProcess.instance().resumeTask(taskId);
}
catch (Exception e) {
- log.error("BusinessProcess.resumeTask thrown exception!");
+ //log.warn("BusinessProcess.resumeTask thrown exception!");
return false;
}
}
@@ -82,7 +80,7 @@
return BusinessProcess.instance().resumeTask(taskId);
}
catch (Exception e) {
- log.error("BusinessProcess.resumeTask thrown exception!");
+ //log.warn("BusinessProcess.resumeTask thrown exception!");
return false;
}
}
@@ -97,7 +95,14 @@
}
else
{
- return BusinessProcess.instance().resumeProcess( tag.definition(),
getProcessKey( tag.processKey() ) );
+ try
+ {
+ return BusinessProcess.instance().resumeProcess( tag.definition(),
getProcessKey( tag.processKey() ) );
+ }
+ catch (Exception e) {
+ //log.warn("BusinessProcess.resumeTask thrown exception!");
+ return false;
+ }
}
}
if ( method.isAnnotationPresent(EndTask.class) )
@@ -142,7 +147,7 @@
BusinessProcess.instance().endTask(
method.getAnnotation(EndTask.class).transition() );
}
catch (Exception e) {
- log.error("Closing JBPM context because exception(s) was
thrown!", e);
+ //log.error("Closing JBPM context because exception(s) was
thrown!", e);
throw new RuntimeException(e);
}
finally
@@ -161,7 +166,7 @@
BusinessProcess.instance().transition(transitionName);
}
catch (Exception e) {
- log.error("Closing JBPM context because exception(s) was
thrown!", e);
+ //log.error("Closing JBPM context because exception(s) was
thrown!", e);
throw new RuntimeException(e);
}
finally