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