Index: trunk/src/main/java/omq/client/proxy/Proxymq.java
===================================================================
--- trunk/src/main/java/omq/client/proxy/Proxymq.java	(revision 58)
+++ trunk/src/main/java/omq/client/proxy/Proxymq.java	(revision 59)
@@ -8,5 +8,4 @@
 import java.util.Collection;
 import java.util.HashMap;
-import java.util.Hashtable;
 import java.util.Map;
 import java.util.Properties;
@@ -25,5 +24,4 @@
 import omq.common.util.ParameterQueue;
 import omq.common.util.Serializer;
-import omq.exception.NoContainsInstanceException;
 import omq.exception.OmqException;
 import omq.exception.RetryException;
@@ -50,5 +48,4 @@
 	private static final Logger logger = Logger.getLogger(Proxymq.class.getName());
 	private static final String multi = "multi#";
-	private static Map<String, Object> proxies = new Hashtable<String, Object>();
 
 	private String uid;
@@ -287,5 +284,4 @@
 				// Remove the corrId to receive new replies
 				resp = serializer.deserializeResponse(results.remove(corrId), actualType);
-				System.out.println("/n/n/n/n/nResult type: "+resp.getResult()+" /n/n/n/n/n");
 				Array.set(array, i, resp.getResult());
 			}
@@ -297,29 +293,4 @@
 
 		return array;
-	}
-
-	/**
-	 * 
-	 * @param reference
-	 *            RemoteObject reference
-	 * @return true if the proxy has been created before or false in the other
-	 *         case
-	 */
-	public static boolean containsProxy(String reference) {
-		return proxies.containsKey(reference);
-	}
-
-	/**
-	 * 
-	 * @param reference
-	 *            RemoteObject reference
-	 * @return a proxy instance
-	 * @throws NoContainsInstanceException
-	 */
-	public static Object getInstance(String reference) throws NoContainsInstanceException {
-		if (!containsProxy(reference)) {
-			throw new NoContainsInstanceException(reference);
-		}
-		return proxies.get(reference);
 	}
 
@@ -341,10 +312,5 @@
 	 */
 	public static Object newProxyInstance(ClassLoader loader, Class<?>[] interfaces, Proxymq proxy) {
-		if (proxies.containsKey(proxy.getRef())) {
-			return proxies.get(proxy.getRef());
-		}
-		Object value = Proxy.newProxyInstance(loader, interfaces, proxy);
-		proxies.put(proxy.getRef(), value);
-		return value;
+		return Proxy.newProxyInstance(loader, interfaces, proxy);
 	}
 
@@ -359,16 +325,4 @@
 	}
 
-	public static void stopProxy() {
-		proxies = new HashMap<String, Object>();
-	}
-
-	public static Map<String, Object> getProxies() {
-		return proxies;
-	}
-
-	public static void setProxies(Map<String, Object> proxies) {
-		Proxymq.proxies = proxies;
-	}
-
 	@Override
 	public String getRef() {
Index: trunk/src/main/java/omq/common/broker/Broker.java
===================================================================
--- trunk/src/main/java/omq/common/broker/Broker.java	(revision 58)
+++ trunk/src/main/java/omq/common/broker/Broker.java	(revision 59)
@@ -4,4 +4,5 @@
 import java.net.URL;
 import java.util.HashMap;
+import java.util.Hashtable;
 import java.util.Map;
 import java.util.Properties;
@@ -44,4 +45,5 @@
 	private Properties environment = null;
 	private Map<String, RemoteObject> remoteObjs;
+	private Map<String, Object> proxies = new Hashtable<String, Object>();
 
 	public Broker(Properties env) throws Exception {
@@ -71,5 +73,5 @@
 			responseListener.kill();
 			eventDispatcher.kill();
-			Proxymq.stopProxy();
+			//TODO proxies = null; ??
 		}
 		// Stop all the remote objects working
@@ -123,5 +125,5 @@
 
 	@SuppressWarnings("unchecked")
-	public <T extends Remote> T lookup(String reference, Class<T> contract) throws RemoteException {
+	public synchronized <T extends Remote> T lookup(String reference, Class<T> contract) throws RemoteException {
 		try {
 
@@ -131,10 +133,12 @@
 			}
 
-			if (!Proxymq.containsProxy(reference)) {
+			if (!proxies.containsKey(reference)) {
 				Proxymq proxy = new Proxymq(reference, contract, this);
 				Class<?>[] array = { contract };
-				return (T) Proxymq.newProxyInstance(contract.getClassLoader(), array, proxy);
+				Object newProxy = Proxymq.newProxyInstance(contract.getClassLoader(), array, proxy);
+				proxies.put(reference, newProxy);
+				return (T) newProxy;
 			}
-			return (T) Proxymq.getInstance(reference);
+			return (T) proxies.get(reference);
 
 		} catch (Exception e) {
