Index: trunk/pom.xml
===================================================================
--- trunk/pom.xml	(revision 53)
+++ trunk/pom.xml	(revision 54)
@@ -70,4 +70,15 @@
 		<sourceDirectory>src</sourceDirectory>
 		<testSourceDirectory>test</testSourceDirectory>
+		<resources>
+			<resource>
+				<directory>src/main/resources</directory>
+				<filtering>true</filtering>
+				<includes>
+					<include>log4j.xml</include>
+					<include>example.properties</include>
+					<include>version.properties</include>
+				</includes>
+			</resource>
+		</resources>
 		<plugins>
 			<plugin>
Index: trunk/src/main/java/omq/client/annotation/MultiMethod.java
===================================================================
--- trunk/src/main/java/omq/client/annotation/MultiMethod.java	(revision 54)
+++ trunk/src/main/java/omq/client/annotation/MultiMethod.java	(revision 54)
@@ -0,0 +1,12 @@
+package omq.client.annotation;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+@Retention(RetentionPolicy.RUNTIME)
+@Target(ElementType.METHOD)
+public @interface MultiMethod {
+	int waitNum() default 1;
+}
Index: trunk/src/main/java/omq/client/listener/ResponseListener.java
===================================================================
--- trunk/src/main/java/omq/client/listener/ResponseListener.java	(revision 53)
+++ trunk/src/main/java/omq/client/listener/ResponseListener.java	(revision 54)
@@ -55,4 +55,5 @@
 	@Override
 	public void run() {
+		logger.info("ResponseListener started");
 		Delivery delivery;
 		String uid_request;
@@ -122,4 +123,5 @@
 
 		channel.queueDeclare(reply_queue, durable, false, false, args);
+		logger.info("ResponseListener creating queue: " + reply_queue + ", durable: " + durable);
 
 		// Declare a new consumer
Index: trunk/src/main/java/omq/client/proxy/Proxymq.java
===================================================================
--- trunk/src/main/java/omq/client/proxy/Proxymq.java	(revision 53)
+++ trunk/src/main/java/omq/client/proxy/Proxymq.java	(revision 54)
@@ -15,4 +15,5 @@
 import omq.Remote;
 import omq.client.annotation.AsyncMethod;
+import omq.client.annotation.MultiMethod;
 import omq.client.annotation.SyncMethod;
 import omq.client.listener.ResponseListener;
@@ -133,7 +134,4 @@
 		Request request = createRequest(method, arguments);
 
-		// Log.saveTimeSendRequestLog("Client-time-request", request.getId(),
-		// method.getName(), timeStart);
-
 		Object response = null;
 		// Publish the request
@@ -144,8 +142,4 @@
 			logger.debug("Publish sync request -> " + request.getId());
 			response = publishSyncRequest(request, method.getReturnType());
-
-			// long timeEnd = (new Date()).getTime();
-			// Log.saveTimeSendRequestLog("Client-time-response",
-			// request.getId(), method.getName(), timeEnd);
 		}
 
@@ -168,5 +162,4 @@
 		// channel.basicPublish(exchange, routingkey, props, bytesRequest);
 		broker.getChannel().basicPublish(exchange, routingkey, props, bytesRequest);
-		// Log.saveLog("Client-Serialize", bytesRequest);
 	}
 
@@ -203,4 +196,9 @@
 		String corrId = java.util.UUID.randomUUID().toString();
 		String methodName = method.getName();
+		boolean multi = false;
+
+		if (method.getAnnotation(MultiMethod.class) != null) {
+			multi = true;
+		}
 
 		// Since we need to know whether the method is async and if it has to
@@ -217,5 +215,5 @@
 			return Request.newSyncRequest(corrId, methodName, arguments, retries, timeout);
 		} else {
-			return Request.newAsyncRequest(corrId, methodName, arguments);
+			return Request.newAsyncRequest(corrId, methodName, arguments, multi);
 		}
 	}
@@ -237,5 +235,4 @@
 			}
 			resp = serializer.deserializeResponse(results.get(corrId), type);
-			// Log.saveLog("Client-Deserialize", results.get(corrId));
 
 			// Remove and indicate the key exists (a hashmap can contain a null
Index: trunk/src/main/java/omq/common/broker/Broker.java
===================================================================
--- trunk/src/main/java/omq/common/broker/Broker.java	(revision 53)
+++ trunk/src/main/java/omq/common/broker/Broker.java	(revision 54)
@@ -176,7 +176,9 @@
 		if (responseListener == null) {
 			responseListener = new ResponseListener(this);
+			responseListener.start();
 		}
 		if (eventDispatcher == null) {
 			eventDispatcher = new EventDispatcher(this);
+			eventDispatcher.start();
 		}
 	}
@@ -197,6 +199,4 @@
 		byte[] bytesResponse = serializer.serialize(wrapper);
 		channel.basicPublish(UID, "", null, bytesResponse);
-
-		// Log.saveLog("Server-Serialize", bytesResponse);
 	}
 
Index: trunk/src/main/java/omq/common/event/EventDispatcher.java
===================================================================
--- trunk/src/main/java/omq/common/event/EventDispatcher.java	(revision 53)
+++ trunk/src/main/java/omq/common/event/EventDispatcher.java	(revision 54)
@@ -56,4 +56,5 @@
 		boolean durable = Boolean.parseBoolean(env.getProperty(ParameterQueue.DURABLE_QUEUES, "false"));
 		channel.queueDeclare(event_queue, durable, false, false, null);
+		logger.info("EventDispatcher creating queue: " + event_queue + ", durable: " + durable);
 
 		// Declare a new consumer
@@ -72,4 +73,5 @@
 	@Override
 	public void run() {
+		logger.info("EventDispatcher started");
 		Delivery delivery;
 		Event event;
@@ -84,9 +86,4 @@
 
 				logger.info("Event received -> Topic: " + event.getTopic() + "CorrId: " + event.getCorrId());
-				// Log.saveLog("Client-Deserialize", delivery.getBody());
-
-				// long timeEnd = (new Date()).getTime();
-				// Log.saveTimeSendRequestLog("Client-time-response",
-				// event.getCorrId(), "Event!", timeEnd);
 
 				// Dispatch it
Index: trunk/src/main/java/omq/common/message/Request.java
===================================================================
--- trunk/src/main/java/omq/common/message/Request.java	(revision 53)
+++ trunk/src/main/java/omq/common/message/Request.java	(revision 54)
@@ -15,4 +15,5 @@
 	private boolean async = false;
 
+	private transient boolean multi;
 	private transient long timeout;
 	private transient int retries;
@@ -34,4 +35,8 @@
 	}
 
+	public Request(String id2, String method2, boolean b, Object[] params2, boolean multi2) {
+		// TODO Auto-generated constructor stub
+	}
+
 	public static Request newSyncRequest(String id, String method, Object[] params) {
 		return new Request(id, method, false, params);
@@ -45,6 +50,6 @@
 	}
 
-	public static Request newAsyncRequest(String id, String method, Object[] params) {
-		return new Request(id, method, true, params);
+	public static Request newAsyncRequest(String id, String method, Object[] params, boolean multi) {
+		return new Request(id, method, true, params, multi);
 	}
 
@@ -97,3 +102,10 @@
 	}
 
+	public boolean isMulti() {
+		return multi;
+	}
+
+	public void setMulti(boolean multi) {
+		this.multi = multi;
+	}
 }
Index: trunk/src/main/java/omq/server/InvocationThread.java
===================================================================
--- trunk/src/main/java/omq/server/InvocationThread.java	(revision 53)
+++ trunk/src/main/java/omq/server/InvocationThread.java	(revision 54)
@@ -44,6 +44,4 @@
 				// Deserialize the json
 				Request request = serializer.deserializeRequest(serializerType, delivery.getBody(), obj);
-				// Log.saveLog("Server-Deserialize", delivery.getBody());
-
 				String methodName = request.getMethod();
 				String requestID = request.getId();
@@ -77,6 +75,6 @@
 					byte[] bytesResponse = serializer.serialize(serializerType, resp);
 					channel.basicPublish("", props.getReplyTo(), replyProps, bytesResponse);
-
-					// Log.saveLog("Server-Serialize", bytesResponse);
+					logger.debug("Publish sync response -> Object: " + obj.getRef() + ", method: " + methodName + " corrID: " + requestID + " replyTo: "
+							+ props.getReplyTo());
 				}
 
Index: trunk/src/main/java/omq/server/RemoteObject.java
===================================================================
--- trunk/src/main/java/omq/server/RemoteObject.java	(revision 53)
+++ trunk/src/main/java/omq/server/RemoteObject.java	(revision 54)
@@ -35,4 +35,5 @@
 
 	private static final long serialVersionUID = -1778953938739846450L;
+	private static final String multi = "multi#";
 	private static final Logger logger = Logger.getLogger(RemoteObject.class.getName());
 
@@ -230,6 +231,8 @@
 		logger.info("RemoteObject: " + UID + " declaring direct exchange: " + exchange + ", Queue: " + queue);
 		channel.exchangeDeclare(exchange, "direct");
+		channel.exchangeDeclare(multi + exchange, "fanout");
 		channel.queueDeclare(queue, durable, false, false, null);
 		channel.queueBind(queue, exchange, routingKey);
+		channel.queueBind(queue, multi + exchange, routingKey);
 
 		// Declare the event topic fanout
Index: trunk/src/main/resources/log4j.xml
===================================================================
--- trunk/src/main/resources/log4j.xml	(revision 53)
+++ trunk/src/main/resources/log4j.xml	(revision 54)
@@ -6,5 +6,5 @@
         <param name="Threshold" value="DEBUG" />
         <layout class="org.apache.log4j.PatternLayout">
-            <param name="ConversionPattern" value="%d{[yyyy-MM-dd HH:mm:ss]} %-5p %c{1}:%L - %m%n" />
+            <param name="ConversionPattern" value="%d{[yyyy-MM-dd HH:mm:ss]} %-5p %c:%L - %m%n" />
         </layout>
     </appender>
@@ -25,5 +25,5 @@
         
         <layout class="org.apache.log4j.PatternLayout">
-            <param value="%d{[yyyy-MM-dd HH:mm:ss]} %-5p %c{1}:%L - %m%n" name="ConversionPattern"/>
+            <param value="%d{[yyyy-MM-dd HH:mm:ss]} %-5p %c:%L - %m%n" name="ConversionPattern"/>
         </layout>        
     </appender>
Index: trunk/src/test/java/omq/test/calculator/CalculatorImpl.java
===================================================================
--- trunk/src/test/java/omq/test/calculator/CalculatorImpl.java	(revision 53)
+++ trunk/src/test/java/omq/test/calculator/CalculatorImpl.java	(revision 54)
@@ -3,5 +3,4 @@
 import java.io.IOException;
 
-import omq.common.broker.Broker;
 import omq.exception.SerializerException;
 import omq.server.RemoteObject;
@@ -36,13 +35,13 @@
 	@Override
 	public void asyncDivideByZero() throws IOException, SerializerException {
-		ZeroEvent ze = new ZeroEvent("my zero event", "zero-event");
-		Broker.trigger(ze);
-		//notifyEvent(ze);
+		// ZeroEvent ze = new ZeroEvent("my zero event", "zero-event");
+		// Broker.trigger(ze);
+		// notifyEvent(ze);
 	}
 
 	@Override
 	public void sendMessage(Message m) {
-		System.out.println("Code = "+m.getCode());
-		System.out.println("Message = "+m.getMessage());
+		System.out.println("Code = " + m.getCode());
+		System.out.println("Message = " + m.getMessage());
 	}
 
Index: trunk/src/test/java/omq/test/calculator/CalculatorTest.java
===================================================================
--- trunk/src/test/java/omq/test/calculator/CalculatorTest.java	(revision 54)
+++ trunk/src/test/java/omq/test/calculator/CalculatorTest.java	(revision 54)
@@ -0,0 +1,142 @@
+package omq.test.calculator;
+
+import static org.junit.Assert.assertEquals;
+
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Properties;
+
+import omq.common.broker.Broker;
+import omq.common.util.ParameterQueue;
+import omq.common.util.Serializer;
+
+import org.junit.After;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized;
+import org.junit.runners.Parameterized.Parameters;
+
+@RunWith(value = Parameterized.class)
+public class CalculatorTest {
+
+	private static Broker broker;
+	private static Calculator remoteCalc;
+	private static Calculator remoteCalc2;
+
+	public CalculatorTest(String type) throws Exception {
+		Properties env = new Properties();
+		env.setProperty(ParameterQueue.USER_NAME, "guest");
+		env.setProperty(ParameterQueue.USER_PASS, "guest");
+
+		// Set host info of rabbimq (where it is)
+		env.setProperty(ParameterQueue.SERVER_HOST, "127.0.0.1");
+		env.setProperty(ParameterQueue.SERVER_PORT, "5672");
+		env.setProperty(ParameterQueue.DURABLE_QUEUES, "false");
+		env.setProperty(ParameterQueue.SERIALIZER_NAME, type);
+		env.setProperty(ParameterQueue.ENABLECOMPRESSION, "false");
+
+		// Set info about where the message will be sent
+		env.setProperty(ParameterQueue.RPC_EXCHANGE, "rpc_exchange");
+		// env.setProperty(ParameterQueue.DEBUGFILE, "c:\\middlewareDebug");
+
+		// Set info about the queue & the exchange where the ResponseListener
+		// will listen to.
+		env.setProperty(ParameterQueue.RPC_REPLY_QUEUE, "reply_queue");
+		env.setProperty(ParameterQueue.EVENT_REPLY_QUEUE, "event_queue");
+
+		broker = new Broker(env);
+		remoteCalc = broker.lookup("calculator1", Calculator.class);
+		remoteCalc2 = broker.lookup("calculator2", Calculator.class);
+	}
+
+	@Parameters
+	public static Collection<Object[]> data() {
+		Object[][] data = new Object[][] { { Serializer.java }, { Serializer.gson }, { Serializer.kryo } };
+		return Arrays.asList(data);
+	}
+
+	@BeforeClass
+	public static void server() throws Exception {
+		Properties env = new Properties();
+		env.setProperty(ParameterQueue.USER_NAME, "guest");
+		env.setProperty(ParameterQueue.USER_PASS, "guest");
+
+		// Get host info of rabbimq (where it is)
+		env.setProperty(ParameterQueue.SERVER_HOST, "127.0.0.1");
+		env.setProperty(ParameterQueue.SERVER_PORT, "5672");
+		env.setProperty(ParameterQueue.DURABLE_QUEUES, "false");
+		env.setProperty(ParameterQueue.ENABLECOMPRESSION, "false");
+
+		// Set info about where the message will be sent
+		env.setProperty(ParameterQueue.RPC_EXCHANGE, "rpc_exchange");
+		env.setProperty(ParameterQueue.RETRY_TIME_CONNECTION, "2000");
+
+		CalculatorImpl calc = new CalculatorImpl();
+		CalculatorImpl calc2 = new CalculatorImpl();
+
+		Broker broker = new Broker(env);
+		broker.bind("calculator1", calc);
+		broker.bind("calculator2", calc2);
+
+		System.out.println("Server started");
+	}
+
+	@After
+	public void stop() throws Exception {
+		broker.stopBroker();
+	}
+
+	@Test
+	public void add() throws Exception {
+		int x = 10;
+		int y = 20;
+
+		int sync = remoteCalc.add(x, y);
+		int sum = x + y;
+
+		assertEquals(sum, sync);
+	}
+
+	@Test
+	public void add2() throws Exception {
+		int x = 10;
+		int y = 20;
+
+		int sync = remoteCalc2.add(x, y);
+		int sum = x + y;
+
+		assertEquals(sum, sync);
+	}
+
+	@Test
+	public void mult() throws Exception {
+		int x = 5;
+		int y = 15;
+
+		remoteCalc.mult(x, y);
+		Thread.sleep(200);
+	}
+
+	@Test
+	public void notifyEvent() throws Exception {
+		ZeroListener zL = new ZeroListener("zero-event");
+
+		remoteCalc.addListener(zL);
+
+		remoteCalc.asyncDivideByZero();
+
+		Thread.sleep(200);
+	}
+
+	@Test
+	public void sendMessage() throws Exception {
+		Message m = new Message(2334, "Hello objectmq");
+		remoteCalc.sendMessage(m);
+	}
+
+	@Test(expected = ArithmeticException.class)
+	public void divideByZero() {
+		remoteCalc.divideByZero();
+	}
+}
Index: trunk/src/test/java/omq/test/calculator/ClientTest.java
===================================================================
--- trunk/src/test/java/omq/test/calculator/ClientTest.java	(revision 53)
+++ 	(revision )
@@ -1,114 +1,0 @@
-package omq.test.calculator;
-
-import static org.junit.Assert.assertEquals;
-
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Properties;
-
-import omq.common.broker.Broker;
-import omq.common.util.ParameterQueue;
-import omq.common.util.Serializer;
-
-import org.junit.After;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.junit.runners.Parameterized;
-import org.junit.runners.Parameterized.Parameters;
-
-@RunWith(value = Parameterized.class)
-public class ClientTest {
-
-	private static Calculator remoteCalc;
-	private static Calculator remoteCalc2;
-
-	public ClientTest(String type) throws Exception {
-		Properties env = new Properties();
-		env.setProperty(ParameterQueue.USER_NAME, "guest");
-		env.setProperty(ParameterQueue.USER_PASS, "guest");
-
-		// Set host info of rabbimq (where it is)
-		env.setProperty(ParameterQueue.SERVER_HOST, "127.0.0.1");
-		env.setProperty(ParameterQueue.SERVER_PORT, "5672");
-		env.setProperty(ParameterQueue.DURABLE_QUEUES, "false");
-		env.setProperty(ParameterQueue.SERIALIZER_NAME, type);
-		env.setProperty(ParameterQueue.ENABLECOMPRESSION, "false");
-
-		// Set info about where the message will be sent
-		env.setProperty(ParameterQueue.RPC_EXCHANGE, "rpc_exchange");
-		// env.setProperty(ParameterQueue.DEBUGFILE, "c:\\middlewareDebug");
-
-		// Set info about the queue & the exchange where the ResponseListener
-		// will listen to.
-		env.setProperty(ParameterQueue.RPC_REPLY_QUEUE, "reply_queue");
-		env.setProperty(ParameterQueue.EVENT_REPLY_QUEUE, "event_queue");
-
-		Broker.initBroker(env);
-		remoteCalc = (Calculator) Broker.lookup("calculator1", Calculator.class);
-		remoteCalc2 = (Calculator) Broker.lookup("calculator2", Calculator.class);
-	}
-
-	@Parameters
-	public static Collection<Object[]> data() {
-		Object[][] data = new Object[][] { { Serializer.java }, { Serializer.gson }, { Serializer.kryo } };
-		return Arrays.asList(data);
-	}
-
-	@After
-	public void stop() throws Exception {
-		Broker.stopBroker();
-	}
-
-	@Test
-	public void add() throws Exception {
-		int x = 10;
-		int y = 20;
-
-		int sync = remoteCalc.add(x, y);
-		int sum = x + y;
-
-		assertEquals(sum, sync);
-	}
-
-	@Test
-	public void add2() throws Exception {
-		int x = 10;
-		int y = 20;
-
-		int sync = remoteCalc2.add(x, y);
-		int sum = x + y;
-
-		assertEquals(sum, sync);
-	}
-
-	@Test
-	public void mult() throws Exception {
-		int x = 5;
-		int y = 15;
-
-		remoteCalc.mult(x, y);
-		Thread.sleep(200);
-	}
-
-	@Test
-	public void notifyEvent() throws Exception {
-		ZeroListener zL = new ZeroListener("zero-event");
-
-		remoteCalc.addListener(zL);
-
-		remoteCalc.asyncDivideByZero();
-
-		Thread.sleep(200);
-	}
-
-	@Test
-	public void sendMessage() throws Exception {
-		Message m = new Message(2334, "Hello objectmq");
-		remoteCalc.sendMessage(m);
-	}
-
-	@Test(expected = ArithmeticException.class)
-	public void divideByZero() {
-		remoteCalc.divideByZero();
-	}
-}
Index: trunk/src/test/java/omq/test/calculator/ServerTest.java
===================================================================
--- trunk/src/test/java/omq/test/calculator/ServerTest.java	(revision 53)
+++ 	(revision )
@@ -1,42 +1,0 @@
-package omq.test.calculator;
-
-import java.util.Properties;
-
-import omq.common.broker.Broker;
-import omq.common.util.ParameterQueue;
-
-import org.junit.Test;
-
-public class ServerTest {
-
-	private CalculatorImpl calc;
-	private CalculatorImpl calc2;
-
-	@Test
-	public void serverTest() throws Exception {
-		Properties env = new Properties();
-		env.setProperty(ParameterQueue.USER_NAME, "guest");
-		env.setProperty(ParameterQueue.USER_PASS, "guest");
-
-		// Get host info of rabbimq (where it is)
-		env.setProperty(ParameterQueue.SERVER_HOST, "127.0.0.1");
-		env.setProperty(ParameterQueue.SERVER_PORT, "5672");
-		env.setProperty(ParameterQueue.DURABLE_QUEUES, "false");
-		env.setProperty(ParameterQueue.ENABLECOMPRESSION, "false");
-
-		// Set info about where the message will be sent
-		env.setProperty(ParameterQueue.RPC_EXCHANGE, "rpc_exchange");
-		env.setProperty(ParameterQueue.RETRY_TIME_CONNECTION, "2000");
-
-		calc = new CalculatorImpl();
-		calc2 = new CalculatorImpl();
-
-		Broker.initBroker(env);
-		Broker.bind("calculator1", calc);
-		Broker.bind("calculator2", calc2);
-
-		System.out.println("Server started");
-
-		Thread.sleep(60 * 60 * 1000);
-	}
-}
Index: trunk/src/test/java/omq/test/exception/ClientTest.java
===================================================================
--- trunk/src/test/java/omq/test/exception/ClientTest.java	(revision 53)
+++ 	(revision )
@@ -1,103 +1,0 @@
-package omq.test.exception;
-
-import static org.junit.Assert.assertEquals;
-
-import java.lang.reflect.UndeclaredThrowableException;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Properties;
-
-import omq.common.broker.Broker;
-import omq.common.util.ParameterQueue;
-import omq.common.util.Serializer;
-
-import org.junit.After;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.junit.runners.Parameterized;
-import org.junit.runners.Parameterized.Parameters;
-
-@RunWith(value = Parameterized.class)
-public class ClientTest {
-	private ClientInterface client;
-
-	public ClientTest(String type) throws Exception {
-		Properties env = new Properties();
-		env.setProperty(ParameterQueue.USER_NAME, "guest");
-		env.setProperty(ParameterQueue.USER_PASS, "guest");
-
-		// Set host info of rabbimq (where it is)
-		env.setProperty(ParameterQueue.SERVER_HOST, "127.0.0.1");
-		env.setProperty(ParameterQueue.SERVER_PORT, "5672");
-		env.setProperty(ParameterQueue.DURABLE_QUEUES, "false");
-		env.setProperty(ParameterQueue.SERIALIZER_NAME, type);
-		env.setProperty(ParameterQueue.ENABLECOMPRESSION, "false");
-
-		// Set info about where the message will be sent
-		env.setProperty(ParameterQueue.RPC_EXCHANGE, "rpc_exchange");
-
-		// Set info about the queue & the exchange where the ResponseListener
-		// will listen to.
-		env.setProperty(ParameterQueue.RPC_REPLY_QUEUE, "reply_queue");
-		env.setProperty(ParameterQueue.EVENT_REPLY_QUEUE, "event_queue");
-
-		Broker.initBroker(env);
-		client = (ClientInterface) Broker.lookup("server", ClientInterface.class);
-	}
-
-	@Parameters
-	public static Collection<Object[]> data() {
-		Object[][] data = new Object[][] { { Serializer.java }, { Serializer.gson }, { Serializer.kryo } };
-		return Arrays.asList(data);
-	}
-
-	@After
-	public void stop() throws Exception {
-		Broker.stopBroker();
-	}
-
-	@Test
-	public void addWheels() throws Exception {
-		int wheels = 4;
-		client.addWheels(wheels);
-		Thread.sleep(200);
-		int result = client.getWheels();
-
-		assertEquals(wheels, result);
-	}
-
-	@Test
-	public void addHp() throws Exception {
-		int hp = 200;
-		client.addHp(hp);
-		Thread.sleep(200);
-		int result = client.getHp();
-
-		assertEquals(hp, result);
-	}
-
-	@Test
-	public void addTrailer() throws Exception {
-		Trailer t = new Trailer(1200);
-		client.addTrailer(t);
-		Thread.sleep(200);
-	}
-
-	@Test(expected = UndeclaredThrowableException.class)
-	// This exception will be caused by java.lang.NoSuchMethodException
-	public void getTrailer() throws Exception {
-		client.getTrailer();
-	}
-
-	@Test
-	public void setPrice() throws Exception {
-		double price = 4999.99;
-		client.setPrice(price);
-		Thread.sleep(200);
-	}
-
-	@Test(expected = ClassCastException.class)
-	public void getPrice() throws Exception {
-		client.getPrice();
-	}
-}
Index: trunk/src/test/java/omq/test/exception/ExceptionTest.java
===================================================================
--- trunk/src/test/java/omq/test/exception/ExceptionTest.java	(revision 54)
+++ trunk/src/test/java/omq/test/exception/ExceptionTest.java	(revision 54)
@@ -0,0 +1,127 @@
+package omq.test.exception;
+
+import static org.junit.Assert.assertEquals;
+
+import java.lang.reflect.UndeclaredThrowableException;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Properties;
+
+import omq.common.broker.Broker;
+import omq.common.util.ParameterQueue;
+import omq.common.util.Serializer;
+
+import org.junit.After;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized;
+import org.junit.runners.Parameterized.Parameters;
+
+@RunWith(value = Parameterized.class)
+public class ExceptionTest {
+	private static Broker broker;
+	private static ClientInterface client;
+
+	public ExceptionTest(String type) throws Exception {
+		Properties env = new Properties();
+		env.setProperty(ParameterQueue.USER_NAME, "guest");
+		env.setProperty(ParameterQueue.USER_PASS, "guest");
+
+		// Set host info of rabbimq (where it is)
+		env.setProperty(ParameterQueue.SERVER_HOST, "127.0.0.1");
+		env.setProperty(ParameterQueue.SERVER_PORT, "5672");
+		env.setProperty(ParameterQueue.DURABLE_QUEUES, "false");
+		env.setProperty(ParameterQueue.SERIALIZER_NAME, type);
+		env.setProperty(ParameterQueue.ENABLECOMPRESSION, "false");
+
+		// Set info about where the message will be sent
+		env.setProperty(ParameterQueue.RPC_EXCHANGE, "rpc_exchange");
+
+		// Set info about the queue & the exchange where the ResponseListener
+		// will listen to.
+		env.setProperty(ParameterQueue.RPC_REPLY_QUEUE, "reply_queue");
+		env.setProperty(ParameterQueue.EVENT_REPLY_QUEUE, "event_queue");
+
+		broker = new Broker(env);
+		client = broker.lookup("server", ClientInterface.class);
+	}
+
+	@Parameters
+	public static Collection<Object[]> data() {
+		Object[][] data = new Object[][] { { Serializer.java }, { Serializer.gson }, { Serializer.kryo } };
+		return Arrays.asList(data);
+	}
+
+	@BeforeClass
+	public static void serverTest() throws Exception {
+		Properties env = new Properties();
+		env.setProperty(ParameterQueue.USER_NAME, "guest");
+		env.setProperty(ParameterQueue.USER_PASS, "guest");
+
+		// Get host info of rabbimq (where it is)
+		env.setProperty(ParameterQueue.SERVER_HOST, "127.0.0.1");
+		env.setProperty(ParameterQueue.SERVER_PORT, "5672");
+		env.setProperty(ParameterQueue.DURABLE_QUEUES, "false");
+		env.setProperty(ParameterQueue.ENABLECOMPRESSION, "false");
+
+		// Set info about where the message will be sent
+		env.setProperty(ParameterQueue.RPC_EXCHANGE, "rpc_exchange");
+		env.setProperty(ParameterQueue.RETRY_TIME_CONNECTION, "2000");
+
+		OmqServerImpl server = new OmqServerImpl();
+
+		Broker broker = new Broker(env);
+		broker.bind("server", server);
+	}
+
+	@After
+	public void stop() throws Exception {
+		broker.stopBroker();
+	}
+
+	@Test
+	public void addWheels() throws Exception {
+		int wheels = 4;
+		client.addWheels(wheels);
+		Thread.sleep(200);
+		int result = client.getWheels();
+
+		assertEquals(wheels, result);
+	}
+
+	@Test
+	public void addHp() throws Exception {
+		int hp = 200;
+		client.addHp(hp);
+		Thread.sleep(200);
+		int result = client.getHp();
+
+		assertEquals(hp, result);
+	}
+
+	@Test
+	public void addTrailer() throws Exception {
+		Trailer t = new Trailer(1200);
+		client.addTrailer(t);
+		Thread.sleep(200);
+	}
+
+	@Test(expected = UndeclaredThrowableException.class)
+	// This exception will be caused by java.lang.NoSuchMethodException
+	public void getTrailer() throws Exception {
+		client.getTrailer();
+	}
+
+	@Test
+	public void setPrice() throws Exception {
+		double price = 4999.99;
+		client.setPrice(price);
+		Thread.sleep(200);
+	}
+
+	@Test(expected = ClassCastException.class)
+	public void getPrice() throws Exception {
+		client.getPrice();
+	}
+}
Index: trunk/src/test/java/omq/test/exception/ServerTest.java
===================================================================
--- trunk/src/test/java/omq/test/exception/ServerTest.java	(revision 53)
+++ trunk/src/test/java/omq/test/exception/ServerTest.java	(revision 54)
@@ -28,8 +28,9 @@
 		OmqServerImpl server = new OmqServerImpl();
 
-		Broker.initBroker(env);
-		Broker.bind("server", server);
+		Broker broker = new Broker(env);
+		broker.bind("server", server);
 
 		Thread.sleep(60 * 60 * 1000);
 	}
 }
+;
Index: trunk/src/test/java/omq/test/faultTolerance/ClientTest.java
===================================================================
--- trunk/src/test/java/omq/test/faultTolerance/ClientTest.java	(revision 53)
+++ 	(revision )
@@ -1,67 +1,0 @@
-package omq.test.faultTolerance;
-
-import static org.junit.Assert.assertEquals;
-
-import java.util.Properties;
-
-import omq.common.broker.Broker;
-import omq.common.util.ParameterQueue;
-import omq.common.util.Serializer;
-import omq.test.calculator.Calculator;
-
-import org.junit.BeforeClass;
-import org.junit.Test;
-
-
-public class ClientTest {
-	private static Calculator remoteCalc;
-
-	@BeforeClass
-	public static void startClient() throws Exception {
-		Properties env = new Properties();
-		env.setProperty(ParameterQueue.USER_NAME, "guest");
-		env.setProperty(ParameterQueue.USER_PASS, "guest");
-
-		// Set host info of rabbimq (where it is)
-		env.setProperty(ParameterQueue.SERVER_HOST, "127.0.0.1");
-		env.setProperty(ParameterQueue.SERVER_PORT, "5672");
-		env.setProperty(ParameterQueue.DURABLE_QUEUES, "false");
-		env.setProperty(ParameterQueue.SERIALIZER_NAME, Serializer.java);
-		env.setProperty(ParameterQueue.ENABLECOMPRESSION, "false");
-
-		// Set info about where the message will be sent
-		env.setProperty(ParameterQueue.RPC_EXCHANGE, "rpc_exchange");
-		// env.setProperty(ParameterQueue.DEBUGFILE, "c:\\middlewareDebug");
-
-		// Set info about the queue & the exchange where the ResponseListener
-		// will listen to.
-		env.setProperty(ParameterQueue.RPC_REPLY_QUEUE, "reply_queue");
-		env.setProperty(ParameterQueue.EVENT_REPLY_QUEUE, "event_queue");
-		env.setProperty(ParameterQueue.RETRY_TIME_CONNECTION, "5000");
-
-		Broker.initBroker(env);
-		remoteCalc = (Calculator) Broker.lookup("calculator1", Calculator.class);
-	}
-
-	@Test
-	public void toleranceTest() throws Exception {
-		int x = 10;
-		int y = 20;
-		int sum = 10 + 20;
-
-		int sync = remoteCalc.add(x, y);
-
-		String password = "unpc";
-		String[] command = { "/bin/bash", "-c", "echo " + password + " | sudo -S service rabbitmq-server restart" };
-
-		Runtime runtime = Runtime.getRuntime();
-		runtime.exec(command);
-
-		Thread.sleep(15000);
-		int resp = remoteCalc.add(x, y);
-
-		assertEquals(sum, sync);
-		assertEquals(sum, resp);
-	}
-
-}
Index: trunk/src/test/java/omq/test/faultTolerance/FaultToleranceTest.java
===================================================================
--- trunk/src/test/java/omq/test/faultTolerance/FaultToleranceTest.java	(revision 54)
+++ trunk/src/test/java/omq/test/faultTolerance/FaultToleranceTest.java	(revision 54)
@@ -0,0 +1,109 @@
+package omq.test.faultTolerance;
+
+import static org.junit.Assert.assertEquals;
+
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Properties;
+
+import omq.common.broker.Broker;
+import omq.common.util.ParameterQueue;
+import omq.common.util.Serializer;
+import omq.test.calculator.Calculator;
+import omq.test.calculator.CalculatorImpl;
+
+import org.junit.After;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized;
+import org.junit.runners.Parameterized.Parameters;
+
+@RunWith(value = Parameterized.class)
+public class FaultToleranceTest {
+	private static Broker broker;
+	private static Calculator remoteCalc;
+
+	public FaultToleranceTest(String type) throws Exception {
+		Properties env = new Properties();
+		env.setProperty(ParameterQueue.USER_NAME, "guest");
+		env.setProperty(ParameterQueue.USER_PASS, "guest");
+
+		// Set host info of rabbimq (where it is)
+		env.setProperty(ParameterQueue.SERVER_HOST, "127.0.0.1");
+		env.setProperty(ParameterQueue.SERVER_PORT, "5672");
+		env.setProperty(ParameterQueue.DURABLE_QUEUES, "false");
+		env.setProperty(ParameterQueue.SERIALIZER_NAME, type);
+		env.setProperty(ParameterQueue.ENABLECOMPRESSION, "false");
+
+		// Set info about where the message will be sent
+		env.setProperty(ParameterQueue.RPC_EXCHANGE, "rpc_exchange");
+		// env.setProperty(ParameterQueue.DEBUGFILE, "c:\\middlewareDebug");
+
+		// Set info about the queue & the exchange where the ResponseListener
+		// will listen to.
+		env.setProperty(ParameterQueue.RPC_REPLY_QUEUE, "reply_queue");
+		env.setProperty(ParameterQueue.EVENT_REPLY_QUEUE, "event_queue");
+		env.setProperty(ParameterQueue.RETRY_TIME_CONNECTION, "5000");
+
+		broker = new Broker(env);
+		remoteCalc = broker.lookup("calculator1", Calculator.class);
+	}
+
+	@Parameters
+	public static Collection<Object[]> data() {
+		Object[][] data = new Object[][] { { Serializer.java }, { Serializer.gson }, { Serializer.kryo } };
+		return Arrays.asList(data);
+	}
+
+	@After
+	public void stop() throws Exception {
+		broker.stopBroker();
+	}
+
+	@BeforeClass
+	public static void serverTest() throws Exception {
+		Properties env = new Properties();
+		env.setProperty(ParameterQueue.USER_NAME, "guest");
+		env.setProperty(ParameterQueue.USER_PASS, "guest");
+
+		// Get host info of rabbimq (where it is)
+		env.setProperty(ParameterQueue.SERVER_HOST, "127.0.0.1");
+		env.setProperty(ParameterQueue.SERVER_PORT, "5672");
+		env.setProperty(ParameterQueue.DURABLE_QUEUES, "false");
+		env.setProperty(ParameterQueue.ENABLECOMPRESSION, "false");
+
+		// Set info about where the message will be sent
+		env.setProperty(ParameterQueue.RPC_EXCHANGE, "rpc_exchange");
+		env.setProperty(ParameterQueue.RETRY_TIME_CONNECTION, "2000");
+
+		CalculatorImpl calc = new CalculatorImpl();
+
+		broker = new Broker(env);
+		broker.bind("calculator1", calc);
+
+		System.out.println("Server started");
+	}
+
+	@Test
+	public void toleranceTest() throws Exception {
+		int x = 10;
+		int y = 20;
+		int sum = 10 + 20;
+
+		int sync = remoteCalc.add(x, y);
+
+		String password = "unpc";
+		String[] command = { "/bin/bash", "-c", "echo " + password + " | sudo -S service rabbitmq-server restart" };
+
+		Runtime runtime = Runtime.getRuntime();
+		runtime.exec(command);
+
+		Thread.sleep(15000);
+		int resp = remoteCalc.add(x, y);
+
+		assertEquals(sum, sync);
+		assertEquals(sum, resp);
+	}
+
+}
Index: trunk/src/test/java/omq/test/faultTolerance/ServerTest.java
===================================================================
--- trunk/src/test/java/omq/test/faultTolerance/ServerTest.java	(revision 53)
+++ 	(revision )
@@ -1,39 +1,0 @@
-package omq.test.faultTolerance;
-
-import java.util.Properties;
-
-import omq.common.broker.Broker;
-import omq.common.util.ParameterQueue;
-import omq.test.calculator.CalculatorImpl;
-
-import org.junit.Test;
-
-public class ServerTest {
-	private static CalculatorImpl calc;
-
-	@Test
-	public void test() throws Exception {
-		Properties env = new Properties();
-		env.setProperty(ParameterQueue.USER_NAME, "guest");
-		env.setProperty(ParameterQueue.USER_PASS, "guest");
-
-		// Get host info of rabbimq (where it is)
-		env.setProperty(ParameterQueue.SERVER_HOST, "127.0.0.1");
-		env.setProperty(ParameterQueue.SERVER_PORT, "5672");
-		env.setProperty(ParameterQueue.DURABLE_QUEUES, "false");
-		env.setProperty(ParameterQueue.ENABLECOMPRESSION, "false");
-
-		// Set info about where the message will be sent
-		env.setProperty(ParameterQueue.RPC_EXCHANGE, "rpc_exchange");
-		env.setProperty(ParameterQueue.RETRY_TIME_CONNECTION, "2000");
-
-		calc = new CalculatorImpl();
-
-		Broker.initBroker(env);
-		Broker.bind("calculator1", calc);
-
-		System.out.println("Server started");
-		
-		Thread.sleep(60 * 1000);
-	}
-}
Index: trunk/src/test/java/omq/test/multiProcess/ClientTest.java
===================================================================
--- trunk/src/test/java/omq/test/multiProcess/ClientTest.java	(revision 53)
+++ 	(revision )
@@ -1,70 +1,0 @@
-package omq.test.multiProcess;
-
-import static org.junit.Assert.assertEquals;
-
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Properties;
-
-import omq.common.broker.Broker;
-import omq.common.util.ParameterQueue;
-import omq.common.util.Serializer;
-
-import org.junit.After;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.junit.runners.Parameterized;
-import org.junit.runners.Parameterized.Parameters;
-
-@RunWith(value = Parameterized.class)
-public class ClientTest {
-	// Execute ServerTest.java 2 times before start this test
-	public Number remoteNumber;
-
-	public ClientTest(String type) throws Exception {
-		Properties env = new Properties();
-		env.setProperty(ParameterQueue.USER_NAME, "guest");
-		env.setProperty(ParameterQueue.USER_PASS, "guest");
-
-		// Set host info of rabbimq (where it is)
-		env.setProperty(ParameterQueue.SERVER_HOST, "127.0.0.1");
-		env.setProperty(ParameterQueue.SERVER_PORT, "5672");
-		env.setProperty(ParameterQueue.DURABLE_QUEUES, "false");
-		env.setProperty(ParameterQueue.SERIALIZER_NAME, type);
-		env.setProperty(ParameterQueue.ENABLECOMPRESSION, "false");
-
-		// Set info about where the message will be sent
-		env.setProperty(ParameterQueue.RPC_EXCHANGE, "rpc_exchange");
-
-		// Set info about the queue & the exchange where the ResponseListener
-		// will listen to.
-		env.setProperty(ParameterQueue.RPC_REPLY_QUEUE, "reply_queue");
-		env.setProperty(ParameterQueue.EVENT_REPLY_QUEUE, "event_queue");
-
-		Broker.initBroker(env);
-		remoteNumber = Broker.lookup("number", Number.class);
-	}
-
-	@Parameters
-	public static Collection<Object[]> data() {
-		Object[][] data = new Object[][] { { Serializer.java }, { Serializer.gson }, { Serializer.kryo } };
-		return Arrays.asList(data);
-	}
-
-	@After
-	public void stop() throws Exception {
-		Broker.stopBroker();
-	}
-
-	@Test
-	public void test() {
-		int x = 10;
-		remoteNumber.setNumber(x);
-		int a = remoteNumber.getNumer();
-		assertEquals(0, a);
-		int b = remoteNumber.getNumer();
-		assertEquals(x, b);
-		remoteNumber.setNumber(0);
-	}
-
-}
Index: trunk/src/test/java/omq/test/multiProcess/MultiProcessTest.java
===================================================================
--- trunk/src/test/java/omq/test/multiProcess/MultiProcessTest.java	(revision 54)
+++ trunk/src/test/java/omq/test/multiProcess/MultiProcessTest.java	(revision 54)
@@ -0,0 +1,105 @@
+package omq.test.multiProcess;
+
+import static org.junit.Assert.assertEquals;
+
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Properties;
+
+import omq.common.broker.Broker;
+import omq.common.util.ParameterQueue;
+import omq.common.util.Serializer;
+
+import org.junit.After;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized;
+import org.junit.runners.Parameterized.Parameters;
+
+@RunWith(value = Parameterized.class)
+public class MultiProcessTest {
+	public static Broker broker;
+	public static Number remoteNumber;
+
+	public MultiProcessTest(String type) throws Exception {
+		Properties env = new Properties();
+		env.setProperty(ParameterQueue.USER_NAME, "guest");
+		env.setProperty(ParameterQueue.USER_PASS, "guest");
+
+		// Set host info of rabbimq (where it is)
+		env.setProperty(ParameterQueue.SERVER_HOST, "127.0.0.1");
+		env.setProperty(ParameterQueue.SERVER_PORT, "5672");
+		env.setProperty(ParameterQueue.DURABLE_QUEUES, "false");
+		env.setProperty(ParameterQueue.SERIALIZER_NAME, type);
+		env.setProperty(ParameterQueue.ENABLECOMPRESSION, "false");
+
+		// Set info about where the message will be sent
+		env.setProperty(ParameterQueue.RPC_EXCHANGE, "rpc_exchange");
+
+		// Set info about the queue & the exchange where the ResponseListener
+		// will listen to.
+		env.setProperty(ParameterQueue.RPC_REPLY_QUEUE, "reply_queue");
+		env.setProperty(ParameterQueue.EVENT_REPLY_QUEUE, "event_queue");
+
+		broker = new Broker(env);
+		remoteNumber = broker.lookup("number", Number.class);
+	}
+
+	@Parameters
+	public static Collection<Object[]> data() {
+		Object[][] data = new Object[][] { { Serializer.java }, { Serializer.gson }, { Serializer.kryo } };
+		return Arrays.asList(data);
+	}
+
+	@BeforeClass
+	public static void serverTest() throws Exception {
+		Properties env = new Properties();
+		env.setProperty(ParameterQueue.USER_NAME, "guest");
+		env.setProperty(ParameterQueue.USER_PASS, "guest");
+
+		// Get host info of rabbimq (where it is)
+		env.setProperty(ParameterQueue.SERVER_HOST, "127.0.0.1");
+		env.setProperty(ParameterQueue.SERVER_PORT, "5672");
+		env.setProperty(ParameterQueue.DURABLE_QUEUES, "false");
+		env.setProperty(ParameterQueue.ENABLECOMPRESSION, "false");
+
+		// Set info about where the message will be sent
+		env.setProperty(ParameterQueue.RPC_EXCHANGE, "rpc_exchange");
+		env.setProperty(ParameterQueue.RETRY_TIME_CONNECTION, "2000");
+
+		Broker broker = new Broker(env);
+		broker.bind("number", new NumberImpl());
+
+		Broker broker2 = new Broker(env);
+		broker2.bind("number", new NumberImpl());
+	}
+
+	@After
+	public void stop() throws Exception {
+		broker.stopBroker();
+	}
+
+	@Test
+	public void fifoTest() {
+		int x = 10;
+		remoteNumber.setNumber(x);
+		int a = remoteNumber.getNumer();
+		assertEquals(0, a);
+		int b = remoteNumber.getNumer();
+		assertEquals(x, b);
+		remoteNumber.setNumber(0);
+	}
+
+	@Test
+	public void multiTest() throws Exception {
+		int x = 10;
+		remoteNumber.setMultiNumber(x);
+		Thread.sleep(200);
+		int a = remoteNumber.getNumer();
+		assertEquals(x, a);
+		remoteNumber.setMultiNumber(0);
+		Thread.sleep(200);
+	}
+
+}
Index: trunk/src/test/java/omq/test/multiProcess/Number.java
===================================================================
--- trunk/src/test/java/omq/test/multiProcess/Number.java	(revision 53)
+++ trunk/src/test/java/omq/test/multiProcess/Number.java	(revision 54)
@@ -2,4 +2,6 @@
 
 import omq.Remote;
+import omq.client.annotation.AsyncMethod;
+import omq.client.annotation.MultiMethod;
 import omq.client.annotation.RemoteInterface;
 import omq.client.annotation.SyncMethod;
@@ -12,3 +14,7 @@
 	@SyncMethod(timeout = 1000)
 	public int getNumer();
+
+	@MultiMethod
+	@AsyncMethod
+	public void setMultiNumber(int x);
 }
Index: trunk/src/test/java/omq/test/multiProcess/NumberImpl.java
===================================================================
--- trunk/src/test/java/omq/test/multiProcess/NumberImpl.java	(revision 53)
+++ trunk/src/test/java/omq/test/multiProcess/NumberImpl.java	(revision 54)
@@ -1,4 +1,6 @@
 package omq.test.multiProcess;
 
+import omq.client.annotation.AsyncMethod;
+import omq.client.annotation.MultiMethod;
 import omq.client.annotation.SyncMethod;
 import omq.server.RemoteObject;
@@ -30,3 +32,10 @@
 	}
 
+	@Override
+	@MultiMethod
+	@AsyncMethod
+	public void setMultiNumber(int x) {
+		this.x = x;
+	}
+
 }
Index: trunk/src/test/java/omq/test/multiProcess/ServerTest.java
===================================================================
--- trunk/src/test/java/omq/test/multiProcess/ServerTest.java	(revision 53)
+++ 	(revision )
@@ -1,32 +1,0 @@
-package omq.test.multiProcess;
-
-import java.util.Properties;
-
-import org.junit.Test;
-
-import omq.common.broker.Broker;
-import omq.common.util.ParameterQueue;
-
-public class ServerTest {
-	@Test
-	public void test() throws Exception {
-		Properties env = new Properties();
-		env.setProperty(ParameterQueue.USER_NAME, "guest");
-		env.setProperty(ParameterQueue.USER_PASS, "guest");
-
-		// Get host info of rabbimq (where it is)
-		env.setProperty(ParameterQueue.SERVER_HOST, "127.0.0.1");
-		env.setProperty(ParameterQueue.SERVER_PORT, "5672");
-		env.setProperty(ParameterQueue.DURABLE_QUEUES, "false");
-		env.setProperty(ParameterQueue.ENABLECOMPRESSION, "false");
-
-		// Set info about where the message will be sent
-		env.setProperty(ParameterQueue.RPC_EXCHANGE, "rpc_exchange");
-		env.setProperty(ParameterQueue.RETRY_TIME_CONNECTION, "2000");
-
-		Broker.initBroker(env);
-		Broker.bind("number", new NumberImpl());
-
-		Thread.sleep(60 * 1000);
-	}
-}
Index: trunk/src/test/java/omq/test/stopBroker/BrokerKillerImpl.java
===================================================================
--- trunk/src/test/java/omq/test/stopBroker/BrokerKillerImpl.java	(revision 53)
+++ trunk/src/test/java/omq/test/stopBroker/BrokerKillerImpl.java	(revision 54)
@@ -12,4 +12,10 @@
 	private static final long serialVersionUID = 1L;
 
+	private Broker broker;
+
+	public BrokerKillerImpl(Broker broker) {
+		this.broker = broker;
+	}
+
 	@Override
 	@AsyncMethod
@@ -24,5 +30,5 @@
 				try {
 					Thread.sleep(1000);
-					Broker.stopBroker();
+					broker.stopBroker();
 				} catch (Exception e) {
 					e.printStackTrace();
Index: trunk/src/test/java/omq/test/stopBroker/ClientTest.java
===================================================================
--- trunk/src/test/java/omq/test/stopBroker/ClientTest.java	(revision 53)
+++ 	(revision )
@@ -1,44 +1,0 @@
-package omq.test.stopBroker;
-
-import java.util.Properties;
-
-import omq.common.broker.Broker;
-import omq.common.util.ParameterQueue;
-import omq.common.util.Serializer;
-
-public class ClientTest {
-
-	/**
-	 * @param args
-	 * @throws Exception
-	 */
-	public static void main(String[] args) throws Exception {
-		Properties env = new Properties();
-		env.setProperty(ParameterQueue.USER_NAME, "guest");
-		env.setProperty(ParameterQueue.USER_PASS, "guest");
-
-		// Set host info of rabbimq (where it is)
-		env.setProperty(ParameterQueue.SERVER_HOST, "127.0.0.1");
-		env.setProperty(ParameterQueue.SERVER_PORT, "5672");
-		env.setProperty(ParameterQueue.DURABLE_QUEUES, "false");
-		env.setProperty(ParameterQueue.SERIALIZER_NAME, Serializer.java);
-		env.setProperty(ParameterQueue.ENABLECOMPRESSION, "false");
-
-		// Set info about where the message will be sent
-		env.setProperty(ParameterQueue.RPC_EXCHANGE, "rpc_exchange");
-		// env.setProperty(ParameterQueue.DEBUGFILE, "c:\\middlewareDebug");
-
-		// Set info about the queue & the exchange where the ResponseListener
-		// will listen to.
-		env.setProperty(ParameterQueue.RPC_REPLY_QUEUE, "reply_queue");
-		env.setProperty(ParameterQueue.EVENT_REPLY_QUEUE, "event_queue");
-		env.setProperty(ParameterQueue.RETRY_TIME_CONNECTION, "5000");
-
-		Broker.initBroker(env);
-		BrokerKiller bk = (BrokerKiller) Broker.lookup("bk", BrokerKiller.class);
-
-		bk.killServerBroker();
-		Broker.stopBroker();
-	}
-
-}
Index: trunk/src/test/java/omq/test/stopBroker/ServerTest.java
===================================================================
--- trunk/src/test/java/omq/test/stopBroker/ServerTest.java	(revision 53)
+++ 	(revision )
@@ -1,36 +1,0 @@
-package omq.test.stopBroker;
-
-import java.util.Properties;
-
-import org.junit.Test;
-
-import omq.common.broker.Broker;
-import omq.common.util.ParameterQueue;
-import omq.common.util.Serializer;
-
-public class ServerTest {
-
-	@Test
-	public void test() throws Exception {
-		Properties env = new Properties();
-		env.setProperty(ParameterQueue.USER_NAME, "guest");
-		env.setProperty(ParameterQueue.USER_PASS, "guest");
-
-		// Get host info of rabbimq (where it is)
-		env.setProperty(ParameterQueue.SERVER_HOST, "127.0.0.1");
-		env.setProperty(ParameterQueue.SERVER_PORT, "5672");
-		env.setProperty(ParameterQueue.DURABLE_QUEUES, "false");
-		env.setProperty(ParameterQueue.SERIALIZER_NAME, Serializer.java);
-		env.setProperty(ParameterQueue.ENABLECOMPRESSION, "false");
-
-		// Set info about where the message will be sent
-		env.setProperty(ParameterQueue.RPC_EXCHANGE, "rpc_exchange");
-		env.setProperty(ParameterQueue.RETRY_TIME_CONNECTION, "2000");
-
-		BrokerKillerImpl bki = new BrokerKillerImpl();
-
-		Broker.initBroker(env);
-		Broker.bind("bk", bki);
-	}
-
-}
Index: trunk/src/test/java/omq/test/stopBroker/StopBrokerTest.java
===================================================================
--- trunk/src/test/java/omq/test/stopBroker/StopBrokerTest.java	(revision 54)
+++ trunk/src/test/java/omq/test/stopBroker/StopBrokerTest.java	(revision 54)
@@ -0,0 +1,87 @@
+package omq.test.stopBroker;
+
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Properties;
+
+import omq.common.broker.Broker;
+import omq.common.util.ParameterQueue;
+import omq.common.util.Serializer;
+
+import org.junit.After;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized;
+import org.junit.runners.Parameterized.Parameters;
+
+@RunWith(value = Parameterized.class)
+public class StopBrokerTest {
+
+	private static Broker broker;
+	private static BrokerKiller bk;
+
+	public StopBrokerTest(String type) throws Exception {
+		Properties env = new Properties();
+		env.setProperty(ParameterQueue.USER_NAME, "guest");
+		env.setProperty(ParameterQueue.USER_PASS, "guest");
+
+		// Set host info of rabbimq (where it is)
+		env.setProperty(ParameterQueue.SERVER_HOST, "127.0.0.1");
+		env.setProperty(ParameterQueue.SERVER_PORT, "5672");
+		env.setProperty(ParameterQueue.DURABLE_QUEUES, "false");
+		env.setProperty(ParameterQueue.SERIALIZER_NAME, type);
+		env.setProperty(ParameterQueue.ENABLECOMPRESSION, "false");
+
+		// Set info about where the message will be sent
+		env.setProperty(ParameterQueue.RPC_EXCHANGE, "rpc_exchange");
+		// env.setProperty(ParameterQueue.DEBUGFILE, "c:\\middlewareDebug");
+
+		// Set info about the queue & the exchange where the ResponseListener
+		// will listen to.
+		env.setProperty(ParameterQueue.RPC_REPLY_QUEUE, "reply_queue");
+		env.setProperty(ParameterQueue.EVENT_REPLY_QUEUE, "event_queue");
+		env.setProperty(ParameterQueue.RETRY_TIME_CONNECTION, "5000");
+
+		broker = new Broker(env);
+		bk = broker.lookup("bk", BrokerKiller.class);
+	}
+
+	@Parameters
+	public static Collection<Object[]> data() {
+		Object[][] data = new Object[][] { { Serializer.java }, { Serializer.gson }, { Serializer.kryo } };
+		return Arrays.asList(data);
+	}
+
+	@BeforeClass
+	public static void server() throws Exception {
+		Properties env = new Properties();
+		env.setProperty(ParameterQueue.USER_NAME, "guest");
+		env.setProperty(ParameterQueue.USER_PASS, "guest");
+
+		// Get host info of rabbimq (where it is)
+		env.setProperty(ParameterQueue.SERVER_HOST, "127.0.0.1");
+		env.setProperty(ParameterQueue.SERVER_PORT, "5672");
+		env.setProperty(ParameterQueue.DURABLE_QUEUES, "false");
+		env.setProperty(ParameterQueue.ENABLECOMPRESSION, "false");
+
+		// Set info about where the message will be sent
+		env.setProperty(ParameterQueue.RPC_EXCHANGE, "rpc_exchange");
+		env.setProperty(ParameterQueue.RETRY_TIME_CONNECTION, "2000");
+
+		Broker broker = new Broker(env);
+		BrokerKillerImpl bki = new BrokerKillerImpl(broker);
+		broker.bind("bk", bki);
+	}
+
+	@After
+	public void stop() throws Exception {
+		broker.stopBroker();
+	}
+
+	@Test
+	public void stopBroker() throws Exception {
+		bk.killServerBroker();
+	}
+
+}
Index: trunk/src/test/java/omq/test/stopBroker/UnbindTest.java
===================================================================
--- trunk/src/test/java/omq/test/stopBroker/UnbindTest.java	(revision 53)
+++ trunk/src/test/java/omq/test/stopBroker/UnbindTest.java	(revision 54)
@@ -5,14 +5,12 @@
 import omq.common.broker.Broker;
 import omq.common.util.ParameterQueue;
-import omq.common.util.Serializer;
 import omq.test.calculator.CalculatorImpl;
 
+import org.junit.Test;
+
 public class UnbindTest {
-	private static CalculatorImpl calc;
 
-	/**
-	 * @param args
-	 */
-	public static void main(String[] args) throws Exception {
+	@Test
+	public void serverTest() throws Exception {
 		Properties env = new Properties();
 		env.setProperty(ParameterQueue.USER_NAME, "guest");
@@ -23,5 +21,4 @@
 		env.setProperty(ParameterQueue.SERVER_PORT, "5672");
 		env.setProperty(ParameterQueue.DURABLE_QUEUES, "false");
-		env.setProperty(ParameterQueue.SERIALIZER_NAME, Serializer.java);
 		env.setProperty(ParameterQueue.ENABLECOMPRESSION, "false");
 
@@ -31,12 +28,12 @@
 
 		String reference = "calculator1";
-		calc = new CalculatorImpl();
+		CalculatorImpl calc = new CalculatorImpl();
 
-		Broker.initBroker(env);
-		Broker.bind(reference, calc);
+		Broker broker = new Broker(env);
+		broker.bind(reference, calc);
 
-		Broker.unbind(reference);
+		broker.unbind(reference);
 
-		Broker.closeConnection();
+		broker.closeConnection();
 	}
 
Index: trunk/src/test/java/omq/test/temporal/Client.java
===================================================================
--- trunk/src/test/java/omq/test/temporal/Client.java	(revision 53)
+++ 	(revision )
@@ -1,28 +1,0 @@
-package omq.test.temporal;
-
-import java.util.Set;
-
-import omq.Remote;
-import omq.client.annotation.AsyncMethod;
-import omq.client.annotation.RemoteInterface;
-import omq.client.annotation.SyncMethod;
-import omq.exception.RemoteException;
-
-@RemoteInterface
-public interface Client extends Remote {
-
-	@SyncMethod(retry = 1, timeout = 1500)
-	public String getID();
-
-	@SyncMethod(retry = 1, timeout = 1500)
-	public String getProfileInfo();
-
-	@SyncMethod(retry = 1, timeout = 1500)
-	public Set<String> getFriends();
-
-	@AsyncMethod
-	public void sendMessage(String message);
-
-	@AsyncMethod
-	public void addContact(String contact) throws RemoteException;
-}
Index: trunk/src/test/java/omq/test/temporal/ClientImpl.java
===================================================================
--- trunk/src/test/java/omq/test/temporal/ClientImpl.java	(revision 53)
+++ 	(revision )
@@ -1,62 +1,0 @@
-package omq.test.temporal;
-
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Set;
-
-import omq.client.annotation.AsyncMethod;
-import omq.client.annotation.SyncMethod;
-import omq.common.broker.Broker;
-import omq.exception.RemoteException;
-import omq.server.RemoteObject;
-
-public class ClientImpl extends RemoteObject implements Client {
-
-	/**
-	 * 
-	 */
-	private static final long serialVersionUID = 1L;
-	private String id;
-	private String profileInfo;
-	private Map<String, Client> friendList;
-
-	public ClientImpl(String id, String profileInfo) {
-		this.id = id;
-		this.profileInfo = profileInfo;
-		this.friendList = new HashMap<String, Client>();
-	}
-
-	@Override
-	@SyncMethod(retry = 1, timeout = 1500)
-	public String getID() {
-		return id;
-	}
-
-	@Override
-	@SyncMethod(retry = 1, timeout = 1500)
-	public String getProfileInfo() {
-		return profileInfo;
-	}
-
-	@Override
-	@SyncMethod(retry = 1, timeout = 1500)
-	public Set<String> getFriends() {
-		return friendList.keySet();
-	}
-
-	@Override
-	@AsyncMethod
-	public void sendMessage(String message) {
-		System.out.println("" + message);
-	}
-
-	@Override
-	@AsyncMethod
-	public void addContact(String contact) throws RemoteException {
-		if (!id.equalsIgnoreCase(contact) && !friendList.containsKey(contact)) {
-			Client client = (Client) Broker.lookup(contact, Client.class);
-			friendList.put(contact, client);
-		}
-	}
-
-}
Index: trunk/src/test/java/omq/test/temporal/ClientTest.java
===================================================================
--- trunk/src/test/java/omq/test/temporal/ClientTest.java	(revision 53)
+++ 	(revision )
@@ -1,40 +1,0 @@
-package omq.test.temporal;
-
-import java.util.Properties;
-
-import omq.common.broker.Broker;
-import omq.common.util.ParameterQueue;
-import omq.common.util.Serializer;
-
-import org.junit.BeforeClass;
-
-public class ClientTest {
-	// private static Client user;
-
-	@BeforeClass
-	public static void startClient() throws Exception {
-		Properties env = new Properties();
-		env.setProperty(ParameterQueue.USER_NAME, "guest");
-		env.setProperty(ParameterQueue.USER_PASS, "guest");
-
-		// Set host info of rabbimq (where it is)
-		env.setProperty(ParameterQueue.SERVER_HOST, "127.0.0.1");
-		env.setProperty(ParameterQueue.SERVER_PORT, "5672");
-		env.setProperty(ParameterQueue.DURABLE_QUEUES, "false");
-		env.setProperty(ParameterQueue.SERIALIZER_NAME, Serializer.java);
-		env.setProperty(ParameterQueue.ENABLECOMPRESSION, "false");
-
-		// Set info about where the message will be sent
-		env.setProperty(ParameterQueue.RPC_EXCHANGE, "rpc_exchange");
-		// env.setProperty(ParameterQueue.DEBUGFILE, "c:\\middlewareDebug");
-
-		// Set info about the queue & the exchange where the ResponseListener
-		// will listen to.
-		env.setProperty(ParameterQueue.RPC_REPLY_QUEUE, "reply_queue");
-		env.setProperty(ParameterQueue.EVENT_REPLY_QUEUE, "event_queue");
-		env.setProperty(ParameterQueue.RETRY_TIME_CONNECTION, "5000");
-
-		Broker.initBroker(env);
-	}
-
-}
Index: trunk/src/test/java/omq/test/temporal/ProvaTest.java
===================================================================
--- trunk/src/test/java/omq/test/temporal/ProvaTest.java	(revision 54)
+++ trunk/src/test/java/omq/test/temporal/ProvaTest.java	(revision 54)
@@ -0,0 +1,105 @@
+package omq.test.temporal;
+
+import static org.junit.Assert.assertEquals;
+
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Properties;
+
+import omq.common.broker.Broker;
+import omq.common.util.ParameterQueue;
+import omq.common.util.Serializer;
+import omq.test.calculator.Calculator;
+import omq.test.calculator.CalculatorImpl;
+
+import org.junit.After;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized;
+import org.junit.runners.Parameterized.Parameters;
+
+@RunWith(value = Parameterized.class)
+public class ProvaTest {
+
+	@BeforeClass
+	public static void serverTest() throws Exception {
+		Properties env = new Properties();
+		env.setProperty(ParameterQueue.USER_NAME, "guest");
+		env.setProperty(ParameterQueue.USER_PASS, "guest");
+
+		// Get host info of rabbimq (where it is)
+		env.setProperty(ParameterQueue.SERVER_HOST, "127.0.0.1");
+		env.setProperty(ParameterQueue.SERVER_PORT, "5672");
+		env.setProperty(ParameterQueue.DURABLE_QUEUES, "false");
+		env.setProperty(ParameterQueue.ENABLECOMPRESSION, "false");
+
+		// Set info about where the message will be sent
+		env.setProperty(ParameterQueue.RPC_EXCHANGE, "rpc_exchange");
+		env.setProperty(ParameterQueue.RETRY_TIME_CONNECTION, "2000");
+
+		CalculatorImpl calc = new CalculatorImpl();
+
+		Broker broker = new Broker(env);
+		broker.bind("calculator1", calc);
+
+		System.out.println("Server started");
+	}
+
+	private static Broker broker;
+	private static Calculator remoteCalc;
+
+	public ProvaTest(String type) throws Exception {
+		Properties env = new Properties();
+		env.setProperty(ParameterQueue.USER_NAME, "guest");
+		env.setProperty(ParameterQueue.USER_PASS, "guest");
+
+		// Set host info of rabbimq (where it is)
+		env.setProperty(ParameterQueue.SERVER_HOST, "127.0.0.1");
+		env.setProperty(ParameterQueue.SERVER_PORT, "5672");
+		env.setProperty(ParameterQueue.DURABLE_QUEUES, "false");
+		env.setProperty(ParameterQueue.SERIALIZER_NAME, type);
+		env.setProperty(ParameterQueue.ENABLECOMPRESSION, "false");
+
+		// Set info about where the message will be sent
+		env.setProperty(ParameterQueue.RPC_EXCHANGE, "rpc_exchange");
+		// env.setProperty(ParameterQueue.DEBUGFILE, "c:\\middlewareDebug");
+
+		// Set info about the queue & the exchange where the ResponseListener
+		// will listen to.
+		env.setProperty(ParameterQueue.RPC_REPLY_QUEUE, "reply_queue");
+		env.setProperty(ParameterQueue.EVENT_REPLY_QUEUE, "event_queue");
+
+		broker = new Broker(env);
+		remoteCalc = broker.lookup("calculator1", Calculator.class);
+	}
+
+	@Parameters
+	public static Collection<Object[]> data() {
+		Object[][] data = new Object[][] { { Serializer.java } /*
+																 * , {
+																 * Serializer
+																 * .gson }, {
+																 * Serializer
+																 * .kryo }
+																 */};
+		return Arrays.asList(data);
+	}
+
+	@After
+	public void stop() throws Exception {
+		broker.stopBroker();
+	}
+
+	@Test
+	public void add() throws Exception {
+		int x = 10;
+		int y = 20;
+
+		int sync = remoteCalc.add(x, y);
+		int sum = x + y;
+
+		assertEquals(sum, sync);
+	}
+
+}
Index: trunk/src/test/java/omq/test/temporal/ServerTest.java
===================================================================
--- trunk/src/test/java/omq/test/temporal/ServerTest.java	(revision 53)
+++ 	(revision )
@@ -1,36 +1,0 @@
-package omq.test.temporal;
-
-import java.util.Properties;
-
-import omq.common.broker.Broker;
-import omq.common.util.ParameterQueue;
-import omq.common.util.Serializer;
-
-public class ServerTest {
-
-	public static void main(String[] args) throws Exception {
-		Properties env = new Properties();
-		env.setProperty(ParameterQueue.USER_NAME, "guest");
-		env.setProperty(ParameterQueue.USER_PASS, "guest");
-
-		// Get host info of rabbimq (where it is)
-		env.setProperty(ParameterQueue.SERVER_HOST, "127.0.0.1");
-		env.setProperty(ParameterQueue.SERVER_PORT, "5672");
-		env.setProperty(ParameterQueue.DURABLE_QUEUES, "false");
-		env.setProperty(ParameterQueue.SERIALIZER_NAME, Serializer.java);
-		env.setProperty(ParameterQueue.ENABLECOMPRESSION, "false");
-
-		// Set info about where the message will be sent
-		env.setProperty(ParameterQueue.RPC_EXCHANGE, "rpc_exchange");
-		env.setProperty(ParameterQueue.RETRY_TIME_CONNECTION, "2000");
-
-		ClientImpl c1 = new ClientImpl("Miki", "Hey, this is Miky");
-		ClientImpl c2 = new ClientImpl("Jack", "This is Jack");
-
-		Broker.initBroker(env);
-
-		Broker.bind(c1.getID(), c1);
-		Broker.bind(c2.getID(), c2);
-	}
-
-}
Index: trunk/target/classes/log4j.xml
===================================================================
--- trunk/target/classes/log4j.xml	(revision 53)
+++ 	(revision )
@@ -1,37 +1,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
-
-<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
-    <appender name="consoleAppender" class="org.apache.log4j.ConsoleAppender">
-        <param name="Threshold" value="DEBUG" />
-        <layout class="org.apache.log4j.PatternLayout">
-            <param name="ConversionPattern" value="%d{[yyyy-MM-dd HH:mm:ss]} %-5p %c{1}:%L - %m%n" />
-        </layout>
-    </appender>
-
-    <appender class="org.apache.log4j.rolling.RollingFileAppender" name="A2">
-        <param value="true" name="append"/>
-        <param value="logs/objectmq-temp.log" name="File"/>
-
-        <rollingPolicy class="org.apache.log4j.rolling.FixedWindowRollingPolicy">
-            <param name="fileNamePattern" value="logs/objectmq-%i.log" />
-            <param name="MinIndex" value="0"/> 
-            <param name="MaxIndex" value="1"/> 
-        </rollingPolicy>
-        
-        <triggeringPolicy class="org.apache.log4j.rolling.SizeBasedTriggeringPolicy"> 
-            <param name="MaxFileSize" value="10000000"/> 
-        </triggeringPolicy> 
-        
-        <layout class="org.apache.log4j.PatternLayout">
-            <param value="%d{[yyyy-MM-dd HH:mm:ss]} %-5p %c{1}:%L - %m%n" name="ConversionPattern"/>
-        </layout>        
-    </appender>
-
-  <root> 
-    <priority value ="debug" /> 
-    <appender-ref ref="consoleAppender" />
-    <appender-ref ref="A2" />  
-  </root>
-  
-</log4j:configuration>
