source: branches/objectmq_old/test/exceptionTest/ServerTest.java @ 72

Last change on this file since 72 was 39, checked in by stoda, 11 years ago

Exception test revised.
Broker.lookup does not need the casting
GsonImp? arguments problem solved
MultiProcessTest? added

File size: 1.0 KB
Line 
1package exceptionTest;
2
3import java.util.Properties;
4
5import omq.common.broker.Broker;
6import omq.common.util.ParameterQueue;
7import omq.common.util.Serializer;
8
9public class ServerTest {
10
11        public static void main(String[] args) throws Exception {
12                Properties env = new Properties();
13                env.setProperty(ParameterQueue.USER_NAME, "guest");
14                env.setProperty(ParameterQueue.USER_PASS, "guest");
15
16                // Get host info of rabbimq (where it is)
17                env.setProperty(ParameterQueue.SERVER_HOST, "127.0.0.1");
18                env.setProperty(ParameterQueue.SERVER_PORT, "5672");
19                env.setProperty(ParameterQueue.DURABLE_QUEUES, "false");
20                env.setProperty(ParameterQueue.SERIALIZER_NAME, Serializer.kryo);
21                env.setProperty(ParameterQueue.ENABLECOMPRESSION, "false");
22
23                // Set info about where the message will be sent
24                env.setProperty(ParameterQueue.RPC_EXCHANGE, "rpc_exchange");
25                env.setProperty(ParameterQueue.RETRY_TIME_CONNECTION, "2000");
26
27                OmqServerImpl server = new OmqServerImpl();
28
29                Broker.initBroker(env);
30                Broker.bind("server", server);
31        }
32}
Note: See TracBrowser for help on using the repository browser.