source: branches/objectmq_old/test/multiProcessTest/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: 1000 bytes
Line 
1package multiProcessTest;
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        public static void main(String[] args) throws Exception {
11                Properties env = new Properties();
12                env.setProperty(ParameterQueue.USER_NAME, "guest");
13                env.setProperty(ParameterQueue.USER_PASS, "guest");
14
15                // Get host info of rabbimq (where it is)
16                env.setProperty(ParameterQueue.SERVER_HOST, "127.0.0.1");
17                env.setProperty(ParameterQueue.SERVER_PORT, "5672");
18                env.setProperty(ParameterQueue.DURABLE_QUEUES, "false");
19                env.setProperty(ParameterQueue.SERIALIZER_NAME, Serializer.java);
20                env.setProperty(ParameterQueue.ENABLECOMPRESSION, "false");
21
22                // Set info about where the message will be sent
23                env.setProperty(ParameterQueue.RPC_EXCHANGE, "rpc_exchange");
24                env.setProperty(ParameterQueue.RETRY_TIME_CONNECTION, "2000");
25
26                Broker.initBroker(env);
27                Broker.bind("number", new NumberImpl());
28        }
29}
Note: See TracBrowser for help on using the repository browser.