Index: /trunk/objectmq/.classpath
===================================================================
--- /trunk/objectmq/.classpath	(revision 21)
+++ /trunk/objectmq/.classpath	(revision 22)
@@ -6,5 +6,9 @@
 	<classpathentry kind="lib" path="lib/commons-cli-1.1.jar"/>
 	<classpathentry kind="lib" path="lib/commons-io-1.2.jar"/>
-	<classpathentry kind="lib" path="lib/rabbitmq-client.jar"/>
+	<classpathentry kind="lib" path="lib/rabbitmq-client.jar">
+		<attributes>
+			<attribute name="javadoc_location" value="file:/home/sergi/Documentos/Sergi/Java/workspace/objectmq/lib/rabbitmq-java-client-javadoc-3.0.1/"/>
+		</attributes>
+	</classpathentry>
 	<classpathentry kind="lib" path="lib/kryo-2.21-all.jar"/>
 	<classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/4"/>
Index: /trunk/objectmq/src/omq/common/broker/Broker.java
===================================================================
--- /trunk/objectmq/src/omq/common/broker/Broker.java	(revision 21)
+++ /trunk/objectmq/src/omq/common/broker/Broker.java	(revision 22)
@@ -12,6 +12,8 @@
 import omq.common.util.Environment;
 import omq.common.util.OmqConnectionFactory;
+import omq.common.util.ParameterQueue;
 import omq.common.util.Serializer;
 import omq.exception.EnvironmentException;
+import omq.exception.InitBrokerException;
 import omq.exception.RemoteException;
 import omq.exception.SerializerException;
@@ -20,4 +22,6 @@
 import com.rabbitmq.client.Channel;
 import com.rabbitmq.client.Connection;
+import com.rabbitmq.client.QueueingConsumer;
+import com.rabbitmq.client.QueueingConsumer.Delivery;
 
 public class Broker {
@@ -33,4 +37,11 @@
 			connection = OmqConnectionFactory.getNewConnection(env);
 			channel = connection.createChannel();
+			try {
+				tryConnection(env);
+			} catch (Exception e) {
+				channel.close();
+				connection.close();
+				throw new InitBrokerException("The connection didn't work");
+			}
 		}
 	}
@@ -104,3 +115,31 @@
 	}
 
+	public static void tryConnection(Properties env) throws Exception {
+		Channel channel = connection.createChannel();
+		String message = "ping";
+
+		String exchange = env.getProperty(ParameterQueue.USER_NAME);
+		String queueName = exchange + "ping";
+		String routingKey = "routingKey";
+
+		channel.exchangeDeclare(exchange, "direct");
+		channel.queueDeclare(queueName, false, false, false, null);
+		channel.queueBind(queueName, exchange, routingKey);
+
+		channel.basicPublish(exchange, routingKey, null, message.getBytes());
+
+		QueueingConsumer consumer = new QueueingConsumer(channel);
+
+		channel.basicConsume(queueName, true, consumer);
+		Delivery delivery = consumer.nextDelivery(1000);
+
+		channel.exchangeDelete(exchange);
+		channel.queueDelete(queueName);
+
+		channel.close();
+
+		if (!message.equalsIgnoreCase(new String(delivery.getBody()))) {
+			throw new Exception();
+		}
+	}
 }
Index: /trunk/objectmq/src/omq/common/util/OmqConnectionFactory.java
===================================================================
--- /trunk/objectmq/src/omq/common/util/OmqConnectionFactory.java	(revision 21)
+++ /trunk/objectmq/src/omq/common/util/OmqConnectionFactory.java	(revision 22)
@@ -17,4 +17,5 @@
 public class OmqConnectionFactory {
 	private static Connection connection;
+	private static int connectionTimeout = 2 * 1000;
 
 	public static void init(Properties env) throws KeyManagementException, NoSuchAlgorithmException, IOException {
@@ -41,4 +42,5 @@
 		factory.setHost(host);
 		factory.setPort(port);
+		factory.setConnectionTimeout(connectionTimeout);
 		if (ssl) {
 			factory.useSslProtocol();
Index: /trunk/objectmq/src/omq/exception/InitBrokerException.java
===================================================================
--- /trunk/objectmq/src/omq/exception/InitBrokerException.java	(revision 22)
+++ /trunk/objectmq/src/omq/exception/InitBrokerException.java	(revision 22)
@@ -0,0 +1,13 @@
+package omq.exception;
+
+public class InitBrokerException extends Exception {
+
+	/**
+	 * 
+	 */
+	private static final long serialVersionUID = 1L;
+
+	public InitBrokerException(String string) {
+		super(string);
+	}
+}
