svn commit: r899679 - in /ofbiz/branches/executioncontext20091231/framework/api/src/org/ofbiz/api/context: AbstractExecutionContext.java ExecutionArtifact.java ExecutionContext.java GenericExecutionArtifact.java ThreadContext.java

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r899679 - in /ofbiz/branches/executioncontext20091231/framework/api/src/org/ofbiz/api/context: AbstractExecutionContext.java ExecutionArtifact.java ExecutionContext.java GenericExecutionArtifact.java ThreadContext.java

adrianc
Author: adrianc
Date: Fri Jan 15 16:11:28 2010
New Revision: 899679

URL: http://svn.apache.org/viewvc?rev=899679&view=rev
Log:
Better implementation of my last commit. Duck any exceptions so client code can catch them.

Modified:
    ofbiz/branches/executioncontext20091231/framework/api/src/org/ofbiz/api/context/AbstractExecutionContext.java
    ofbiz/branches/executioncontext20091231/framework/api/src/org/ofbiz/api/context/ExecutionArtifact.java
    ofbiz/branches/executioncontext20091231/framework/api/src/org/ofbiz/api/context/ExecutionContext.java
    ofbiz/branches/executioncontext20091231/framework/api/src/org/ofbiz/api/context/GenericExecutionArtifact.java
    ofbiz/branches/executioncontext20091231/framework/api/src/org/ofbiz/api/context/ThreadContext.java

Modified: ofbiz/branches/executioncontext20091231/framework/api/src/org/ofbiz/api/context/AbstractExecutionContext.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/executioncontext20091231/framework/api/src/org/ofbiz/api/context/AbstractExecutionContext.java?rev=899679&r1=899678&r2=899679&view=diff
==============================================================================
--- ofbiz/branches/executioncontext20091231/framework/api/src/org/ofbiz/api/context/AbstractExecutionContext.java (original)
+++ ofbiz/branches/executioncontext20091231/framework/api/src/org/ofbiz/api/context/AbstractExecutionContext.java Fri Jan 15 16:11:28 2010
@@ -147,12 +147,10 @@
         this.timeZone = TimeZone.getDefault();
     }
 
-    public void runExecutionArtifact(ExecutionArtifact artifact) {
+    public void runExecutionArtifact(ExecutionArtifact artifact) throws Throwable {
         pushExecutionArtifact(artifact);
         try {
             artifact.run();
-        } catch (Throwable t) {
-            Debug.logError(t, module);
         } finally {
             popExecutionArtifact();
         }

Modified: ofbiz/branches/executioncontext20091231/framework/api/src/org/ofbiz/api/context/ExecutionArtifact.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/executioncontext20091231/framework/api/src/org/ofbiz/api/context/ExecutionArtifact.java?rev=899679&r1=899678&r2=899679&view=diff
==============================================================================
--- ofbiz/branches/executioncontext20091231/framework/api/src/org/ofbiz/api/context/ExecutionArtifact.java (original)
+++ ofbiz/branches/executioncontext20091231/framework/api/src/org/ofbiz/api/context/ExecutionArtifact.java Fri Jan 15 16:11:28 2010
@@ -41,5 +41,5 @@
     /**
      * Run this artifact's protected code.
      */
-    void run();
+    void run() throws Throwable;
 }

Modified: ofbiz/branches/executioncontext20091231/framework/api/src/org/ofbiz/api/context/ExecutionContext.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/executioncontext20091231/framework/api/src/org/ofbiz/api/context/ExecutionContext.java?rev=899679&r1=899678&r2=899679&view=diff
==============================================================================
--- ofbiz/branches/executioncontext20091231/framework/api/src/org/ofbiz/api/context/ExecutionContext.java (original)
+++ ofbiz/branches/executioncontext20091231/framework/api/src/org/ofbiz/api/context/ExecutionContext.java Fri Jan 15 16:11:28 2010
@@ -145,7 +145,7 @@
      *
      * @param artifact
      */
-    void runExecutionArtifact(ExecutionArtifact artifact);
+    void runExecutionArtifact(ExecutionArtifact artifact) throws Throwable;
 
      /**
      * Replaces the current <code>AuthorizationManager</code> instance

Modified: ofbiz/branches/executioncontext20091231/framework/api/src/org/ofbiz/api/context/GenericExecutionArtifact.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/executioncontext20091231/framework/api/src/org/ofbiz/api/context/GenericExecutionArtifact.java?rev=899679&r1=899678&r2=899679&view=diff
==============================================================================
--- ofbiz/branches/executioncontext20091231/framework/api/src/org/ofbiz/api/context/GenericExecutionArtifact.java (original)
+++ ofbiz/branches/executioncontext20091231/framework/api/src/org/ofbiz/api/context/GenericExecutionArtifact.java Fri Jan 15 16:11:28 2010
@@ -40,7 +40,7 @@
     }
 
     @Override
-    public void run() {}
+    public void run() throws Throwable {}
 
     @Override
     public String toString() {

Modified: ofbiz/branches/executioncontext20091231/framework/api/src/org/ofbiz/api/context/ThreadContext.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/executioncontext20091231/framework/api/src/org/ofbiz/api/context/ThreadContext.java?rev=899679&r1=899678&r2=899679&view=diff
==============================================================================
--- ofbiz/branches/executioncontext20091231/framework/api/src/org/ofbiz/api/context/ThreadContext.java (original)
+++ ofbiz/branches/executioncontext20091231/framework/api/src/org/ofbiz/api/context/ThreadContext.java Fri Jan 15 16:11:28 2010
@@ -115,6 +115,10 @@
         executionContext.get().reset();
     }
 
+    public void runExecutionArtifact(ExecutionArtifact artifact) throws Throwable {
+        executionContext.get().runExecutionArtifact(artifact);
+    }
+
     public static void runUnprotected() {
         executionContext.get().runUnprotected();
     }