ServiceProxyFactory.java
import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Proxy;
import java.util.HashMap;
import java.util.Map;
import jp.co.mg.mgstruts.exception.ProcessingException;
public class ServiceProxyFactory {
private static final int NON_TRANSACTION = 6;
private static final int TRANSACTION = 3;
private Class targetClass;
private static Map cache = new HashMap();
public ServiceProxyFactory(Class targetClass) {
this.targetClass = targetClass;
}
public synchronized Object getProxy(int transactionType)
throws ProcessingException {
Object target = cache.get(targetClass);
if (target == null) {
try {
target = targetClass.newIns