Index: /trunk/src/main/java/omq/common/util/OmqConnectionFactory.java
===================================================================
--- /trunk/src/main/java/omq/common/util/OmqConnectionFactory.java	(revision 50)
+++ /trunk/src/main/java/omq/common/util/OmqConnectionFactory.java	(revision 51)
@@ -39,5 +39,8 @@
 			} catch (Exception e) {
 				logger.error(e);
-				long milis = Long.parseLong(env.getProperty(ParameterQueue.RETRY_TIME_CONNECTION, "2000"));
+				long milis = 2000;
+				if (env != null) {
+					milis = Long.parseLong(env.getProperty(ParameterQueue.RETRY_TIME_CONNECTION, "2000"));
+				}
 				Thread.sleep(milis);
 			}
Index: unk/src/test/java/omq/test/calculator/ClientGson.java
===================================================================
--- /trunk/src/test/java/omq/test/calculator/ClientGson.java	(revision 50)
+++ 	(revision )
@@ -1,104 +1,0 @@
-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.AfterClass;
-import org.junit.BeforeClass;
-import org.junit.Test;
-
-public class ClientGson {
-	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.gson);
-		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);
-	}
-	
-	@AfterClass
-	public static void stop() throws Exception {
-		Broker.stopBroker();
-		Thread.sleep(2000);
-	}
-
-	@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: unk/src/test/java/omq/test/calculator/ClientJava.java
===================================================================
--- /trunk/src/test/java/omq/test/calculator/ClientJava.java	(revision 50)
+++ 	(revision )
@@ -1,104 +1,0 @@
-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.AfterClass;
-import org.junit.BeforeClass;
-import org.junit.Test;
-
-public class ClientJava {
-	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);
-	}
-
-	@AfterClass
-	public static void stop() throws Exception {
-		Broker.stopBroker();
-		Thread.sleep(1000);
-	}
-
-	@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: unk/src/test/java/omq/test/calculator/ClientKryo.java
===================================================================
--- /trunk/src/test/java/omq/test/calculator/ClientKryo.java	(revision 50)
+++ 	(revision )
@@ -1,104 +1,0 @@
-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.AfterClass;
-import org.junit.BeforeClass;
-import org.junit.Test;
-
-public class ClientKryo {
-	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.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.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);
-	}
-	
-	@AfterClass
-	public static void stop() throws Exception {
-		Broker.stopBroker();
-		Thread.sleep(2000);
-	}
-
-	@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 50)
+++ /trunk/src/test/java/omq/test/calculator/ClientTest.java	(revision 51)
@@ -1,9 +1,114 @@
 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.Suite;
+import org.junit.runners.Parameterized;
+import org.junit.runners.Parameterized.Parameters;
 
-@RunWith(Suite.class)
-@Suite.SuiteClasses({ ClientJava.class, ClientGson.class, ClientKryo.class })
+@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: unk/src/test/java/omq/test/calculator/ParameterizedClient.java
===================================================================
--- /trunk/src/test/java/omq/test/calculator/ParameterizedClient.java	(revision 50)
+++ 	(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 ParameterizedClient {
-
-	private static Calculator remoteCalc;
-	private static Calculator remoteCalc2;
-
-	public ParameterizedClient(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();
-	}
-}
