Index: /trunk/.classpath
===================================================================
--- /trunk/.classpath	(revision 45)
+++ /trunk/.classpath	(revision 46)
@@ -23,5 +23,5 @@
 		</attributes>
 	</classpathentry>
-	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5">
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6">
 		<attributes>
 			<attribute name="maven.pomderived" value="true"/>
Index: /trunk/src/test/java/omq/test/calculator/Calculator.java
===================================================================
--- /trunk/src/test/java/omq/test/calculator/Calculator.java	(revision 46)
+++ /trunk/src/test/java/omq/test/calculator/Calculator.java	(revision 46)
@@ -0,0 +1,28 @@
+package omq.test.calculator;
+
+import java.io.IOException;
+
+import omq.Remote;
+import omq.client.annotation.AsyncMethod;
+import omq.client.annotation.RemoteInterface;
+import omq.client.annotation.SyncMethod;
+import omq.exception.SerializerException;
+
+@RemoteInterface
+public interface Calculator extends Remote {
+	@SyncMethod(timeout = 1500)
+	public int add(int x, int y);
+
+	@AsyncMethod
+	public void mult(int x, int y);
+
+	@AsyncMethod
+	public void sendMessage(Message m);
+
+	@AsyncMethod
+	public void asyncDivideByZero() throws IOException, SerializerException;
+
+	@SyncMethod
+	public int divideByZero();
+
+}
Index: /trunk/src/test/java/omq/test/calculator/CalculatorImpl.java
===================================================================
--- /trunk/src/test/java/omq/test/calculator/CalculatorImpl.java	(revision 46)
+++ /trunk/src/test/java/omq/test/calculator/CalculatorImpl.java	(revision 46)
@@ -0,0 +1,55 @@
+package omq.test.calculator;
+
+import java.io.IOException;
+
+import omq.common.broker.Broker;
+import omq.exception.SerializerException;
+import omq.server.RemoteObject;
+
+public class CalculatorImpl extends RemoteObject implements Calculator {
+	private int mult = 0;
+
+	public CalculatorImpl() throws Exception {
+		super();
+	}
+
+	private static final long serialVersionUID = 1L;
+
+	@Override
+	public int add(int x, int y) {
+		return x + y;
+	}
+
+	@Override
+	public void mult(int x, int y) {
+		mult = x * y;
+	}
+
+	public int getMult() {
+		return mult;
+	}
+
+	public void setMult(int mult) {
+		this.mult = mult;
+	}
+
+	@Override
+	public void asyncDivideByZero() throws IOException, SerializerException {
+		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());
+	}
+
+	@Override
+	public int divideByZero() {
+		int x = 2 / 0;
+		return x;
+	}
+
+}
Index: /trunk/src/test/java/omq/test/calculator/ClientTest.java
===================================================================
--- /trunk/src/test/java/omq/test/calculator/ClientTest.java	(revision 46)
+++ /trunk/src/test/java/omq/test/calculator/ClientTest.java	(revision 46)
@@ -0,0 +1,97 @@
+package omq.test.calculator;
+
+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 org.junit.BeforeClass;
+import org.junit.Test;
+
+public class ClientTest {
+	private static Calculator remoteCalc;
+	private static Calculator remoteCalc2;
+
+	@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");
+
+		Broker.initBroker(env);
+		remoteCalc = (Calculator) Broker.lookup("calculator1", Calculator.class);
+		remoteCalc2 = (Calculator) Broker.lookup("calculator2", Calculator.class);
+	}
+
+	@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/Message.java
===================================================================
--- /trunk/src/test/java/omq/test/calculator/Message.java	(revision 46)
+++ /trunk/src/test/java/omq/test/calculator/Message.java	(revision 46)
@@ -0,0 +1,39 @@
+package omq.test.calculator;
+
+import java.io.Serializable;
+
+public class Message implements Serializable {
+	
+	
+	
+	/**
+	 * 
+	 */
+	private static final long serialVersionUID = 1L;
+	private int code;
+	private String message;
+	
+	public Message() {
+	}
+
+	public Message(int code, String message) {
+		this.code = code;
+		this.message = message;
+	}
+
+	public int getCode() {
+		return code;
+	}
+
+	public void setCode(int code) {
+		this.code = code;
+	}
+
+	public String getMessage() {
+		return message;
+	}
+
+	public void setMessage(String message) {
+		this.message = message;
+	}
+}
Index: /trunk/src/test/java/omq/test/calculator/ServerTest.java
===================================================================
--- /trunk/src/test/java/omq/test/calculator/ServerTest.java	(revision 46)
+++ /trunk/src/test/java/omq/test/calculator/ServerTest.java	(revision 46)
@@ -0,0 +1,38 @@
+package omq.test.calculator;
+
+import java.util.Properties;
+
+import omq.common.broker.Broker;
+import omq.common.util.ParameterQueue;
+import omq.common.util.Serializer;
+
+public class ServerTest {
+	private static CalculatorImpl calc;
+	private static CalculatorImpl calc2;
+
+	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, "true");
+		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");
+
+		calc = new CalculatorImpl();
+		calc2 = new CalculatorImpl();
+
+		Broker.initBroker(env);
+		Broker.bind("calculator1", calc);
+		Broker.bind("calculator2", calc2);
+
+		System.out.println("Server started");
+	}
+}
Index: /trunk/src/test/java/omq/test/calculator/ZeroEvent.java
===================================================================
--- /trunk/src/test/java/omq/test/calculator/ZeroEvent.java	(revision 46)
+++ /trunk/src/test/java/omq/test/calculator/ZeroEvent.java	(revision 46)
@@ -0,0 +1,22 @@
+package omq.test.calculator;
+
+import omq.common.event.Event;
+
+public class ZeroEvent extends Event {
+	/**
+	 * 
+	 */
+	private static final long serialVersionUID = 1L;
+
+	public ZeroEvent() {
+	}
+
+	public ZeroEvent(String corrId, String topic) {
+		super(corrId, topic);
+	}
+
+	public String getZeroMessage() {
+		return "divition by 0";
+	}
+
+}
Index: /trunk/src/test/java/omq/test/calculator/ZeroListener.java
===================================================================
--- /trunk/src/test/java/omq/test/calculator/ZeroListener.java	(revision 46)
+++ /trunk/src/test/java/omq/test/calculator/ZeroListener.java	(revision 46)
@@ -0,0 +1,15 @@
+package omq.test.calculator;
+
+import omq.common.event.EventListener;
+
+public class ZeroListener extends EventListener<ZeroEvent> {
+
+	public ZeroListener(String topic) {
+		super(topic);
+	}
+
+	@Override
+	public void notifyEvent(ZeroEvent event) {
+		System.out.println(event.getZeroMessage());
+	}
+}
Index: /trunk/src/test/java/omq/test/exception/ClientInterface.java
===================================================================
--- /trunk/src/test/java/omq/test/exception/ClientInterface.java	(revision 46)
+++ /trunk/src/test/java/omq/test/exception/ClientInterface.java	(revision 46)
@@ -0,0 +1,33 @@
+package omq.test.exception;
+
+import omq.Remote;
+import omq.client.annotation.AsyncMethod;
+import omq.client.annotation.RemoteInterface;
+import omq.client.annotation.SyncMethod;
+
+@RemoteInterface
+public interface ClientInterface extends Remote {
+	@AsyncMethod
+	public void addWheels(int numWheels);
+
+	@AsyncMethod
+	public void addHp(int hp);
+
+	@AsyncMethod
+	public void addTrailer(Trailer t);
+
+	@AsyncMethod
+	public void setPrice(double price);
+
+	@SyncMethod(timeout = 1000)
+	public Trailer getTrailer();
+
+	@SyncMethod(timeout = 1000)
+	public int getHp();
+
+	@SyncMethod(timeout = 1000)
+	public int getWheels();
+
+	@SyncMethod(timeout = 1000)
+	public double getPrice();
+}
Index: /trunk/src/test/java/omq/test/exception/ClientTest.java
===================================================================
--- /trunk/src/test/java/omq/test/exception/ClientTest.java	(revision 46)
+++ /trunk/src/test/java/omq/test/exception/ClientTest.java	(revision 46)
@@ -0,0 +1,87 @@
+package omq.test.exception;
+
+import static org.junit.Assert.assertEquals;
+
+import java.lang.reflect.UndeclaredThrowableException;
+import java.util.Properties;
+
+import omq.common.broker.Broker;
+import omq.common.util.ParameterQueue;
+import omq.common.util.Serializer;
+
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+public class ClientTest {
+	private static ClientInterface client;
+
+	@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.kryo);
+		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);
+	}
+
+	@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/OmqServerImpl.java
===================================================================
--- /trunk/src/test/java/omq/test/exception/OmqServerImpl.java	(revision 46)
+++ /trunk/src/test/java/omq/test/exception/OmqServerImpl.java	(revision 46)
@@ -0,0 +1,44 @@
+package omq.test.exception;
+
+import omq.server.RemoteObject;
+
+public class OmqServerImpl extends RemoteObject implements ServerInterface {
+	/**
+	 * 
+	 */
+	private static final long serialVersionUID = 1L;
+	private int numWheels;
+	private int hp;
+	private int price;
+
+	@Override
+	public void addWheels(int numWheels) {
+		this.numWheels = numWheels;
+	}
+
+	@Override
+	public void addHp(int hp) {
+		this.hp = hp;
+	}
+
+	@Override
+	public int getHp() {
+		return hp;
+	}
+
+	@Override
+	public int getWheels() {
+		return numWheels;
+	}
+
+	@Override
+	public void setPrice(int price) {
+		this.price = price;
+	}
+
+	@Override
+	public int getPrice() {
+		return price;
+	}
+
+}
Index: /trunk/src/test/java/omq/test/exception/ServerInterface.java
===================================================================
--- /trunk/src/test/java/omq/test/exception/ServerInterface.java	(revision 46)
+++ /trunk/src/test/java/omq/test/exception/ServerInterface.java	(revision 46)
@@ -0,0 +1,17 @@
+package omq.test.exception;
+
+import omq.Remote;
+
+public interface ServerInterface extends Remote {
+	public void addWheels(int numWheels);
+
+	public void addHp(int hp);
+
+	public int getHp();
+
+	public int getWheels();
+
+	public void setPrice(int price);
+
+	public int getPrice();
+}
Index: /trunk/src/test/java/omq/test/exception/ServerTest.java
===================================================================
--- /trunk/src/test/java/omq/test/exception/ServerTest.java	(revision 46)
+++ /trunk/src/test/java/omq/test/exception/ServerTest.java	(revision 46)
@@ -0,0 +1,32 @@
+package omq.test.exception;
+
+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.kryo);
+		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.initBroker(env);
+		Broker.bind("server", server);
+	}
+}
Index: /trunk/src/test/java/omq/test/exception/Trailer.java
===================================================================
--- /trunk/src/test/java/omq/test/exception/Trailer.java	(revision 46)
+++ /trunk/src/test/java/omq/test/exception/Trailer.java	(revision 46)
@@ -0,0 +1,34 @@
+package omq.test.exception;
+
+import java.io.Serializable;
+
+public class Trailer implements Serializable {
+
+	/**
+	 * 
+	 */
+	private static final long serialVersionUID = 1L;
+
+	private int kg;
+
+	public Trailer(int kg) {
+		this.kg = kg;
+	}
+
+	public int getKg() {
+		return kg;
+	}
+
+	public void setKg(int kg) {
+		this.kg = kg;
+	}
+
+	@Override
+	public boolean equals(Object obj) {
+		if (obj instanceof Trailer) {
+			Trailer t = (Trailer) obj;
+			return kg == t.getKg();
+		}
+		return false;
+	}
+}
Index: /trunk/src/test/java/omq/test/faultTolerance/ClientTest.java
===================================================================
--- /trunk/src/test/java/omq/test/faultTolerance/ClientTest.java	(revision 46)
+++ /trunk/src/test/java/omq/test/faultTolerance/ClientTest.java	(revision 46)
@@ -0,0 +1,67 @@
+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/ServerTest.java
===================================================================
--- /trunk/src/test/java/omq/test/faultTolerance/ServerTest.java	(revision 46)
+++ /trunk/src/test/java/omq/test/faultTolerance/ServerTest.java	(revision 46)
@@ -0,0 +1,36 @@
+package omq.test.faultTolerance;
+
+import java.util.Properties;
+
+import omq.common.broker.Broker;
+import omq.common.util.ParameterQueue;
+import omq.common.util.Serializer;
+import omq.test.calculator.CalculatorImpl;
+
+public class ServerTest {
+	private static CalculatorImpl calc;
+
+	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");
+
+		calc = new CalculatorImpl();
+
+		Broker.initBroker(env);
+		Broker.bind("calculator1", calc);
+
+		System.out.println("Server started");
+	}
+}
Index: /trunk/src/test/java/omq/test/multiProcess/ClientTest.java
===================================================================
--- /trunk/src/test/java/omq/test/multiProcess/ClientTest.java	(revision 46)
+++ /trunk/src/test/java/omq/test/multiProcess/ClientTest.java	(revision 46)
@@ -0,0 +1,53 @@
+package omq.test.multiProcess;
+
+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 org.junit.BeforeClass;
+import org.junit.Test;
+
+public class ClientTest {
+	// Execute ServerTest.java 2 times before start this test
+	public static Number remoteNumber;
+
+	@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");
+
+		// 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);
+	}
+
+	@Test
+	public void test() {
+		int x = 10;
+		remoteNumber.setNumber(x);
+		int a = remoteNumber.getNumer();
+		assertEquals(a, 0);
+		int b = remoteNumber.getNumer();
+		assertEquals(x, b);
+	}
+
+}
Index: /trunk/src/test/java/omq/test/multiProcess/Number.java
===================================================================
--- /trunk/src/test/java/omq/test/multiProcess/Number.java	(revision 46)
+++ /trunk/src/test/java/omq/test/multiProcess/Number.java	(revision 46)
@@ -0,0 +1,14 @@
+package omq.test.multiProcess;
+
+import omq.Remote;
+import omq.client.annotation.RemoteInterface;
+import omq.client.annotation.SyncMethod;
+
+@RemoteInterface
+public interface Number extends Remote {
+	@SyncMethod(timeout = 1000)
+	public void setNumber(int x);
+
+	@SyncMethod(timeout = 1000)
+	public int getNumer();
+}
Index: /trunk/src/test/java/omq/test/multiProcess/NumberImpl.java
===================================================================
--- /trunk/src/test/java/omq/test/multiProcess/NumberImpl.java	(revision 46)
+++ /trunk/src/test/java/omq/test/multiProcess/NumberImpl.java	(revision 46)
@@ -0,0 +1,32 @@
+package omq.test.multiProcess;
+
+import omq.client.annotation.SyncMethod;
+import omq.server.RemoteObject;
+
+public class NumberImpl extends RemoteObject implements Number {
+	/**
+	 * 
+	 */
+	private static final long serialVersionUID = 1L;
+	private int x = 0;
+
+	public NumberImpl() {
+	}
+
+	public NumberImpl(int x) {
+		this.x = x;
+	}
+
+	@Override
+	@SyncMethod
+	public void setNumber(int x) {
+		this.x = x;
+	}
+
+	@Override
+	@SyncMethod(timeout = 1000)
+	public int getNumer() {
+		return x;
+	}
+
+}
Index: /trunk/src/test/java/omq/test/multiProcess/ServerTest.java
===================================================================
--- /trunk/src/test/java/omq/test/multiProcess/ServerTest.java	(revision 46)
+++ /trunk/src/test/java/omq/test/multiProcess/ServerTest.java	(revision 46)
@@ -0,0 +1,29 @@
+package omq.test.multiProcess;
+
+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");
+
+		Broker.initBroker(env);
+		Broker.bind("number", new NumberImpl());
+	}
+}
Index: /trunk/src/test/java/omq/test/multiThread/Car.java
===================================================================
--- /trunk/src/test/java/omq/test/multiThread/Car.java	(revision 46)
+++ /trunk/src/test/java/omq/test/multiThread/Car.java	(revision 46)
@@ -0,0 +1,37 @@
+package omq.test.multiThread;
+
+import java.util.List;
+
+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 Car extends Remote {
+	@AsyncMethod
+	public void setPlate(String plate);
+
+	@SyncMethod(timeout = 1500)
+	public String getPlate();
+
+	@AsyncMethod
+	public void setHP(int hp);
+
+	@SyncMethod(timeout = 1500)
+	public int getHP();
+
+	@AsyncMethod
+	public void setRims(List<Rim> rims);
+
+	@SyncMethod(timeout = 3000)
+	public List<Rim> getRims();
+
+	@AsyncMethod
+	public void setMobile(String mobile) throws RemoteException;
+
+	@SyncMethod
+	public String getMobile();
+
+}
Index: /trunk/src/test/java/omq/test/multiThread/CarImpl.java
===================================================================
--- /trunk/src/test/java/omq/test/multiThread/CarImpl.java	(revision 46)
+++ /trunk/src/test/java/omq/test/multiThread/CarImpl.java	(revision 46)
@@ -0,0 +1,60 @@
+package omq.test.multiThread;
+
+import java.util.List;
+
+import omq.common.broker.Broker;
+import omq.exception.RemoteException;
+import omq.server.RemoteObject;
+
+public class CarImpl extends RemoteObject implements Car {
+
+	/**
+	 * 
+	 */
+	private static final long serialVersionUID = 1L;
+	private String plate;
+	private int hp;
+	private List<Rim> rims;
+	private Mobile mobile;
+
+	@Override
+	public void setPlate(String plate) {
+		this.plate = plate;
+	}
+
+	@Override
+	public String getPlate() {
+		return plate;
+	}
+
+	@Override
+	public void setHP(int hp) {
+		this.hp = hp;
+	}
+
+	@Override
+	public int getHP() {
+		return hp;
+	}
+
+	@Override
+	public void setRims(List<Rim> rims) {
+		this.rims = rims;
+	}
+
+	@Override
+	public List<Rim> getRims() {
+		return rims;
+	}
+
+	@Override
+	public void setMobile(String mobile) throws RemoteException {
+		this.mobile = (Mobile) Broker.lookup(mobile, Mobile.class);
+	}
+
+	@Override
+	public String getMobile() {
+		return mobile.getRef();
+	}
+
+}
Index: /trunk/src/test/java/omq/test/multiThread/CarThread.java
===================================================================
--- /trunk/src/test/java/omq/test/multiThread/CarThread.java	(revision 46)
+++ /trunk/src/test/java/omq/test/multiThread/CarThread.java	(revision 46)
@@ -0,0 +1,51 @@
+package omq.test.multiThread;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import omq.common.broker.Broker;
+
+public class CarThread extends Thread {
+	private String name;
+	private String tfn;
+	private Object lock;
+
+	public CarThread(String name, String tfn, Object lock) {
+		this.name = name;
+		this.tfn = tfn;
+		this.lock = lock;
+	}
+
+	@Override
+	public void run() {
+		try {
+			Car car = (Car) Broker.lookup(name, Car.class);
+			car.setHP(1001);
+			car.setPlate("California 125");
+			List<Rim> rims = new ArrayList<Rim>();
+			rims.add(new Rim("asdf", 17));
+			rims.add(new Rim("qwer", 21));
+			car.setRims(rims);
+
+			Thread.sleep(1000);
+			
+			System.out.println("HP -> " + car.getHP());
+			System.out.println("Plate -> " + car.getPlate());
+			for (Rim r : car.getRims()) {
+				System.out.println("Rim -> " + r.getModel() + ", " + r.getInch());
+			}
+
+			Mobile mobile = (Mobile) Broker.lookup(tfn, Mobile.class);
+			synchronized (lock) {
+				lock.wait(2000);
+				List<String> messages = mobile.getMessages();
+				for (String m : messages) {
+					System.out.println("Message -> " + m);
+				}
+			}
+
+		} catch (Exception e) {
+
+		}
+	}
+}
Index: /trunk/src/test/java/omq/test/multiThread/ClientTest.java
===================================================================
--- /trunk/src/test/java/omq/test/multiThread/ClientTest.java	(revision 46)
+++ /trunk/src/test/java/omq/test/multiThread/ClientTest.java	(revision 46)
@@ -0,0 +1,41 @@
+package omq.test.multiThread;
+
+import java.util.Properties;
+
+import omq.common.broker.Broker;
+import omq.common.util.ParameterQueue;
+
+public class ClientTest {
+
+	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.SERIALIZERNAME,
+		// "omq.common.util.Serializers.GsonImp");
+		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);
+
+		String car = "audi";
+		String tfn = "aifon";
+		Object lock = new Object();
+		CarThread t1 = new CarThread(car, tfn, lock);
+		MobileThread t2 = new MobileThread(tfn, lock);
+
+		t1.start();
+		t2.start();
+		
+	}
+}
Index: /trunk/src/test/java/omq/test/multiThread/Mobile.java
===================================================================
--- /trunk/src/test/java/omq/test/multiThread/Mobile.java	(revision 46)
+++ /trunk/src/test/java/omq/test/multiThread/Mobile.java	(revision 46)
@@ -0,0 +1,19 @@
+package omq.test.multiThread;
+
+import java.util.List;
+
+import omq.Remote;
+import omq.client.annotation.AsyncMethod;
+import omq.client.annotation.RemoteInterface;
+import omq.client.annotation.SyncMethod;
+
+@RemoteInterface
+public interface Mobile extends Remote {
+	@AsyncMethod
+	public void sendMessage(String message);
+	
+	@SyncMethod
+	public List<String> getMessages();
+	
+	
+}
Index: /trunk/src/test/java/omq/test/multiThread/MobileImpl.java
===================================================================
--- /trunk/src/test/java/omq/test/multiThread/MobileImpl.java	(revision 46)
+++ /trunk/src/test/java/omq/test/multiThread/MobileImpl.java	(revision 46)
@@ -0,0 +1,26 @@
+package omq.test.multiThread;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import omq.server.RemoteObject;
+
+public class MobileImpl extends RemoteObject implements Mobile {
+	/**
+	 * 
+	 */
+	private static final long serialVersionUID = 1L;
+	private List<String> messages = new ArrayList<String>();
+
+	@Override
+	public synchronized void sendMessage(String message) {
+		System.out.println("Message received " + this.getRef() + " -> " + message);
+		messages.add(message);
+	}
+
+	@Override
+	public List<String> getMessages() {
+		return messages;
+	}
+
+}
Index: /trunk/src/test/java/omq/test/multiThread/MobileThread.java
===================================================================
--- /trunk/src/test/java/omq/test/multiThread/MobileThread.java	(revision 46)
+++ /trunk/src/test/java/omq/test/multiThread/MobileThread.java	(revision 46)
@@ -0,0 +1,28 @@
+package omq.test.multiThread;
+
+import omq.common.broker.Broker;
+
+public class MobileThread extends Thread {
+	private String name;
+	private Object lock;
+
+	public MobileThread(String name, Object lock) {
+		this.name = name;
+		this.lock = lock;
+	}
+
+	@Override
+	public void run() {
+		try {
+			Mobile mobile = (Mobile) Broker.lookup(name, Mobile.class);
+			synchronized (lock) {
+				mobile.sendMessage("Hello this is Sergi");
+				mobile.sendMessage("and this is a test");
+				Thread.sleep(1000);
+				lock.notify();
+			}
+		} catch (Exception e) {
+
+		}
+	}
+}
Index: /trunk/src/test/java/omq/test/multiThread/Rim.java
===================================================================
--- /trunk/src/test/java/omq/test/multiThread/Rim.java	(revision 46)
+++ /trunk/src/test/java/omq/test/multiThread/Rim.java	(revision 46)
@@ -0,0 +1,39 @@
+package omq.test.multiThread;
+
+import java.io.Serializable;
+
+public class Rim implements Serializable {
+
+	/**
+	 * 
+	 */
+	private static final long serialVersionUID = 1L;
+
+	private String model;
+	private int inch;
+
+	public Rim() {
+	}
+
+	public Rim(String model, int inch) {
+		this.model = model;
+		this.inch = inch;
+	}
+
+	public String getModel() {
+		return model;
+	}
+
+	public void setModel(String model) {
+		this.model = model;
+	}
+
+	public int getInch() {
+		return inch;
+	}
+
+	public void setInch(int inch) {
+		this.inch = inch;
+	}
+
+}
Index: /trunk/src/test/java/omq/test/multiThread/ServerTest.java
===================================================================
--- /trunk/src/test/java/omq/test/multiThread/ServerTest.java	(revision 46)
+++ /trunk/src/test/java/omq/test/multiThread/ServerTest.java	(revision 46)
@@ -0,0 +1,36 @@
+package omq.test.multiThread;
+
+import java.util.Properties;
+
+import omq.common.broker.Broker;
+import omq.common.util.ParameterQueue;
+
+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.SERIALIZERNAME,
+		// "omq.common.util.Serializers.GsonImp");
+		env.setProperty(ParameterQueue.ENABLECOMPRESSION, "false");
+		env.setProperty(ParameterQueue.NUM_THREADS, "4");
+
+		// Set info about where the message will be sent
+		env.setProperty(ParameterQueue.RPC_EXCHANGE, "rpc_exchange");
+		env.setProperty(ParameterQueue.RETRY_TIME_CONNECTION, "2000");
+
+		String car = "audi";
+		String tfn = "aifon";
+
+		Broker.initBroker(env);
+		Broker.bind(car, new CarImpl());
+		Broker.bind(tfn, new MobileImpl());
+
+		System.out.println("Server started");
+	}
+}
Index: /trunk/src/test/java/omq/test/stopBroker/BrokerKiller.java
===================================================================
--- /trunk/src/test/java/omq/test/stopBroker/BrokerKiller.java	(revision 46)
+++ /trunk/src/test/java/omq/test/stopBroker/BrokerKiller.java	(revision 46)
@@ -0,0 +1,11 @@
+package omq.test.stopBroker;
+
+import omq.Remote;
+import omq.client.annotation.AsyncMethod;
+import omq.client.annotation.RemoteInterface;
+
+@RemoteInterface
+public interface BrokerKiller extends Remote {
+	@AsyncMethod
+	public void killServerBroker() throws Exception;
+}
Index: /trunk/src/test/java/omq/test/stopBroker/BrokerKillerImpl.java
===================================================================
--- /trunk/src/test/java/omq/test/stopBroker/BrokerKillerImpl.java	(revision 46)
+++ /trunk/src/test/java/omq/test/stopBroker/BrokerKillerImpl.java	(revision 46)
@@ -0,0 +1,35 @@
+package omq.test.stopBroker;
+
+import omq.client.annotation.AsyncMethod;
+import omq.common.broker.Broker;
+import omq.server.RemoteObject;
+
+public class BrokerKillerImpl extends RemoteObject implements BrokerKiller {
+
+	/**
+	 * 
+	 */
+	private static final long serialVersionUID = 1L;
+
+	@Override
+	@AsyncMethod
+	public void killServerBroker() throws Exception {
+		System.out.println("Kill broker");
+
+		// A remote method cannot stop the Broker because the stop method is
+		// thought to wait for the methods finish before it stops. For this
+		// reason it actually cannot stop itself
+		new Thread() {
+			public void run() {
+				try {
+					Thread.sleep(1000);
+					Broker.stopBroker();
+				} catch (Exception e) {
+					e.printStackTrace();
+				}
+			};
+		}.start();
+
+	}
+
+}
Index: /trunk/src/test/java/omq/test/stopBroker/ClientTest.java
===================================================================
--- /trunk/src/test/java/omq/test/stopBroker/ClientTest.java	(revision 46)
+++ /trunk/src/test/java/omq/test/stopBroker/ClientTest.java	(revision 46)
@@ -0,0 +1,44 @@
+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 46)
+++ /trunk/src/test/java/omq/test/stopBroker/ServerTest.java	(revision 46)
@@ -0,0 +1,36 @@
+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 ServerTest {
+
+	/**
+	 * @param args
+	 */
+	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");
+
+		BrokerKillerImpl bki = new BrokerKillerImpl();
+
+		Broker.initBroker(env);
+		Broker.bind("bk", bki);
+	}
+
+}
Index: /trunk/src/test/java/omq/test/stopBroker/UnbindTest.java
===================================================================
--- /trunk/src/test/java/omq/test/stopBroker/UnbindTest.java	(revision 46)
+++ /trunk/src/test/java/omq/test/stopBroker/UnbindTest.java	(revision 46)
@@ -0,0 +1,43 @@
+package omq.test.stopBroker;
+
+import java.util.Properties;
+
+import omq.common.broker.Broker;
+import omq.common.util.ParameterQueue;
+import omq.common.util.Serializer;
+import omq.test.calculator.CalculatorImpl;
+
+public class UnbindTest {
+	private static CalculatorImpl calc;
+
+	/**
+	 * @param args
+	 */
+	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");
+
+		String reference = "calculator1";
+		calc = new CalculatorImpl();
+
+		Broker.initBroker(env);
+		Broker.bind(reference, calc);
+
+		Broker.unbind(reference);
+
+		Broker.closeConnection();
+	}
+
+}
Index: /trunk/src/test/java/omq/test/temporal/Client.java
===================================================================
--- /trunk/src/test/java/omq/test/temporal/Client.java	(revision 46)
+++ /trunk/src/test/java/omq/test/temporal/Client.java	(revision 46)
@@ -0,0 +1,28 @@
+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 46)
+++ /trunk/src/test/java/omq/test/temporal/ClientImpl.java	(revision 46)
@@ -0,0 +1,62 @@
+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 46)
+++ /trunk/src/test/java/omq/test/temporal/ClientTest.java	(revision 46)
@@ -0,0 +1,40 @@
+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/ServerTest.java
===================================================================
--- /trunk/src/test/java/omq/test/temporal/ServerTest.java	(revision 46)
+++ /trunk/src/test/java/omq/test/temporal/ServerTest.java	(revision 46)
@@ -0,0 +1,36 @@
+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);
+	}
+
+}
