Commit 776ca552 authored by Spiros Koulouzis's avatar Spiros Koulouzis

Added properties

parent e822aa62
...@@ -24,7 +24,7 @@ import org.springframework.security.config.annotation.method.configuration.Globa ...@@ -24,7 +24,7 @@ import org.springframework.security.config.annotation.method.configuration.Globa
/** /**
* *
* @author alogo * @author S. Koulouzis
*/ */
@Configuration @Configuration
@EnableGlobalMethodSecurity(prePostEnabled = true) @EnableGlobalMethodSecurity(prePostEnabled = true)
......
...@@ -22,6 +22,7 @@ import com.rabbitmq.client.ConnectionFactory; ...@@ -22,6 +22,7 @@ import com.rabbitmq.client.ConnectionFactory;
import java.io.FileInputStream; import java.io.FileInputStream;
import java.io.IOException; import java.io.IOException;
import java.io.InputStream; import java.io.InputStream;
import java.text.MessageFormat;
import java.util.Properties; import java.util.Properties;
import java.util.concurrent.TimeoutException; import java.util.concurrent.TimeoutException;
import java.util.logging.Level; import java.util.logging.Level;
...@@ -54,6 +55,7 @@ public class RPCServer { ...@@ -54,6 +55,7 @@ public class RPCServer {
} }
} }
HOST = prop.getProperty("rabbitmq.host", "127.0.0.1"); HOST = prop.getProperty("rabbitmq.host", "127.0.0.1");
Logger.getLogger(RPCServer.class.getName()).log(Level.INFO, MessageFormat.format("rabbitmq.host: {0}", HOST));
start(); start();
} }
...@@ -63,6 +65,7 @@ public class RPCServer { ...@@ -63,6 +65,7 @@ public class RPCServer {
factory.setPassword("guest"); factory.setPassword("guest");
factory.setUsername("guest"); factory.setUsername("guest");
factory.setPort(AMQP.PROTOCOL.PORT); factory.setPort(AMQP.PROTOCOL.PORT);
Logger.getLogger(RPCServer.class.getName()).log(Level.INFO, "Trying to connect to: {0}", HOST);
try (Connection connection = factory.newConnection()) { try (Connection connection = factory.newConnection()) {
Channel channel = connection.createChannel(); Channel channel = connection.createChannel();
//We define the queue name //We define the queue name
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment