1
2
3
4
5
6
7
8
9
10 package org.mule.transport.jms.xa;
11
12 import java.lang.reflect.InvocationHandler;
13 import java.lang.reflect.InvocationTargetException;
14 import java.lang.reflect.Method;
15
16 public class ConsumerProducerInvocationHandler implements InvocationHandler
17 {
18
19 private Object target;
20
21 public ConsumerProducerInvocationHandler(SessionInvocationHandler sessionInvocationHandler, Object target)
22 {
23 this.target = target;
24 }
25
26 public Object invoke(Object proxy, Method method, Object[] args) throws Throwable
27 {
28 try
29 {
30 return method.invoke(target, args);
31 }
32 catch (InvocationTargetException e)
33 {
34 throw e.getCause();
35 }
36 }
37
38 }