Index: trunk/src/main/java/omq/common/util/Log.java
===================================================================
--- trunk/src/main/java/omq/common/util/Log.java	(revision 51)
+++ 	(revision )
@@ -1,80 +1,0 @@
-package omq.common.util;
-
-import java.io.File;
-import java.io.FileWriter;
-import java.io.IOException;
-import java.util.Date;
-import java.util.Properties;
-
-import omq.common.broker.Broker;
-
-public class Log {
-
-	public static void saveLog(String processName, byte[] bytesResponse) throws IOException {
-
-		Properties env = Broker.getEnvironment();
-
-		String debugPath = env.getProperty(ParameterQueue.DEBUGFILE, "");
-		if (debugPath.length() > 0) {
-			long timeNow = (new Date()).getTime();
-
-			File outputFolder = new File(debugPath + File.separator);
-			outputFolder.mkdirs();
-
-			// File outputFolder = new File(debugPath + File.separator +
-			// processName);
-			// outputFolder.mkdirs();
-
-			// File outputFileContent = new
-			// File(outputFolder.getAbsoluteFile() + File.separator +
-			// "content_" + timeNow);
-			// FileOutputStream outputStream = new
-			// FileOutputStream(outputFileContent);
-			// IOUtils.write(bytesResponse, outputStream);
-			// outputStream.close();
-
-			File outputFileLog = new File(debugPath + File.separator + "log");
-			boolean exist = outputFileLog.exists();
-
-			FileWriter fw = new FileWriter(outputFileLog, true); // the true
-																	// will
-																	// append
-																	// the
-																	// new
-																	// data
-			if (!exist) {
-				fw.write("#ProcessName\t\tFile\t\t\t\t\tDate\t\t\tSize\n");
-			}
-			fw.write(processName + "\t" + "content_" + timeNow + "\t" + timeNow + "\t" + bytesResponse.length + "\tbytes\n");
-			fw.close();
-		}
-
-	}
-
-	public static void saveTimeSendRequestLog(String processName, String coorId, String method, long timeNow) throws IOException {
-
-		Properties env = Broker.getEnvironment();
-
-		String debugPath = env.getProperty(ParameterQueue.DEBUGFILE, "");
-		if (debugPath.length() > 0) {
-			File outputFolder = new File(debugPath + File.separator + processName);
-			outputFolder.mkdirs();
-
-			File outputFileLog = new File(outputFolder + File.separator + "log");
-			boolean exist = outputFileLog.exists();
-
-			FileWriter fw = new FileWriter(outputFileLog, true); // the true
-																	// will
-																	// append
-																	// the
-																	// new
-																	// data
-			if (!exist) {
-				fw.write("#CoorId\tMethod\tDate\n");
-			}
-			fw.write(coorId + "\t" + method + "\t" + timeNow + "\n");
-			fw.close();
-		}
-
-	}
-}
Index: trunk/src/main/java/omq/common/util/Serializer.java
===================================================================
--- trunk/src/main/java/omq/common/util/Serializer.java	(revision 51)
+++ trunk/src/main/java/omq/common/util/Serializer.java	(revision 53)
@@ -4,7 +4,4 @@
 import java.util.Properties;
 
-import org.apache.log4j.Logger;
-
-import omq.common.broker.Broker;
 import omq.common.event.Event;
 import omq.common.message.Request;
@@ -23,26 +20,31 @@
  */
 public class Serializer {
-	private static final Logger logger = Logger.getLogger(Serializer.class.getName());
-	public static String kryo = "kryo";
-	public static String java = "java";
-	public static String gson = "gson";
+	// private static final Logger logger =
+	// Logger.getLogger(Serializer.class.getName());
+	public static final String kryo = "kryo";
+	public static final String java = "java";
+	public static final String gson = "gson";
 
 	// Client serializer
-	public static ISerializer serializer;
+	public ISerializer serializer;
 
 	// Server serializers
-	private static ISerializer kryoSerializer;
-	private static ISerializer javaSerializer;
-	private static ISerializer gsonSerializer;
+	private ISerializer kryoSerializer;
+	private ISerializer javaSerializer;
+	private ISerializer gsonSerializer;
 
-	private static Boolean getEnableCompression() {
-		Properties env = Broker.getEnvironment();
+	private Properties env;
+
+	public Serializer(Properties env) {
+		this.env = env;
+	}
+
+	private Boolean getEnableCompression() {
 		return Boolean.valueOf(env.getProperty(ParameterQueue.ENABLECOMPRESSION, "false"));
 	}
 
-	public static ISerializer getInstance() throws SerializerException {
+	public ISerializer getInstance() throws SerializerException {
 		if (serializer == null) {
 			try {
-				Properties env = Broker.getEnvironment();
 				String className = env.getProperty(ParameterQueue.SERIALIZER_NAME, Serializer.java);
 
@@ -60,5 +62,5 @@
 	}
 
-	public static ISerializer getInstance(String type) throws SerializerException {
+	public ISerializer getInstance(String type) throws SerializerException {
 		if (kryo.equals(type)) {
 			if (kryoSerializer == null) {
@@ -79,5 +81,5 @@
 	}
 
-	public static byte[] serialize(String type, Object obj) throws SerializerException {
+	public byte[] serialize(String type, Object obj) throws SerializerException {
 		ISerializer instance = getInstance(type);
 
@@ -96,5 +98,5 @@
 
 	// TODO: remove this function and think about the event serialization
-	public static byte[] serialize(Object obj) throws SerializerException {
+	public byte[] serialize(Object obj) throws SerializerException {
 		ISerializer instance = getInstance();
 
@@ -112,5 +114,5 @@
 	}
 
-	public static Request deserializeRequest(String type, byte[] bytes, RemoteObject obj) throws SerializerException {
+	public Request deserializeRequest(String type, byte[] bytes, RemoteObject obj) throws SerializerException {
 		ISerializer instance = getInstance(type);
 
@@ -128,5 +130,5 @@
 	}
 
-	public static Response deserializeResponse(byte[] bytes, Class<?> type) throws SerializerException {
+	public Response deserializeResponse(byte[] bytes, Class<?> type) throws SerializerException {
 		ISerializer instance = getInstance();
 
@@ -144,5 +146,5 @@
 	}
 
-	public static Event deserializeEvent(byte[] bytes) throws SerializerException {
+	public Event deserializeEvent(byte[] bytes) throws SerializerException {
 		ISerializer instance = getInstance();
 
@@ -160,10 +162,10 @@
 	}
 
-	public static void removeSerializers() {
-		logger.warn("Removing serializers");
-		serializer = null;
-		kryoSerializer = null;
-		javaSerializer = null;
-		gsonSerializer = null;
-	}
+	// public static void removeSerializers() {
+	// logger.warn("Removing serializers");
+	// serializer = null;
+	// kryoSerializer = null;
+	// javaSerializer = null;
+	// gsonSerializer = null;
+	// }
 }
