Ignore:
Timestamp:
06/20/13 16:57:39 (11 years ago)
Author:
stoda
Message:

Non static broker
TODO: change all test to see whether the new broker configuration works

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/main/java/omq/server/InvocationThread.java

    r49 r53  
    2323        private static final Logger logger = Logger.getLogger(InvocationThread.class.getName());
    2424        private RemoteObject obj;
     25        private transient Serializer serializer;
    2526        private BlockingQueue<Delivery> deliveryQueue;
    2627        private boolean killed = false;
    2728
    28         public InvocationThread(RemoteObject obj, BlockingQueue<Delivery> deliveryQueue) {
     29        public InvocationThread(RemoteObject obj, BlockingQueue<Delivery> deliveryQueue, Serializer serializer) {
    2930                this.obj = obj;
    3031                this.deliveryQueue = deliveryQueue;
     32                this.serializer = serializer;
    3133        }
    3234
     
    4143
    4244                                // Deserialize the json
    43                                 Request request = Serializer.deserializeRequest(serializerType, delivery.getBody(), obj);
     45                                Request request = serializer.deserializeRequest(serializerType, delivery.getBody(), obj);
    4446                                // Log.saveLog("Server-Deserialize", delivery.getBody());
    4547
     
    7375                                        BasicProperties replyProps = new BasicProperties.Builder().appId(obj.getRef()).correlationId(props.getCorrelationId()).build();
    7476
    75                                         byte[] bytesResponse = Serializer.serialize(serializerType, resp);
     77                                        byte[] bytesResponse = serializer.serialize(serializerType, resp);
    7678                                        channel.basicPublish("", props.getReplyTo(), replyProps, bytesResponse);
    7779
Note: See TracChangeset for help on using the changeset viewer.