1
2
3
4
5
6
7 package org.mule.tck;
8
9 import org.mule.work.DefaultWorkListener;
10
11 import javax.resource.spi.work.WorkEvent;
12
13 public class TestingWorkListener extends DefaultWorkListener
14 {
15 protected void handleWorkException(WorkEvent event, String type)
16 {
17 super.handleWorkException(event, type);
18 if (event.getException() != null)
19 {
20 Throwable t = event.getException().getCause();
21 if (t != null)
22 {
23
24 if (t instanceof Error)
25 {
26 throw (Error)t;
27 }
28 else if (t instanceof RuntimeException)
29 {
30 throw (RuntimeException)t;
31 }
32 }
33
34 }
35 }
36 }