- Timestamp:
- 09/27/13 17:50:41 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/supervisor/src/main/java/omq/server/InvocationThread.java
r83 r91 24 24 private static final Logger logger = Logger.getLogger(InvocationThread.class.getName()); 25 25 private RemoteObject obj; 26 private transient Serializer serializer; 26 private Serializer serializer; 27 // private RemoteWrapper wrapper; 27 28 private BlockingQueue<Delivery> deliveryQueue; 28 29 private boolean killed = false; 29 30 30 public InvocationThread(RemoteObject obj, BlockingQueue<Delivery> deliveryQueue, Serializer serializer) {31 public InvocationThread(RemoteObject obj, RemoteWrapper wrapper, Serializer serializer) { 31 32 this.obj = obj; 32 this.deliveryQueue = deliveryQueue; 33 // this.wrapper = wrapper; 34 this.deliveryQueue = wrapper.getDeliveryQueue(); 33 35 this.serializer = serializer; 34 36 } … … 40 42 // Get the delivery 41 43 Delivery delivery = deliveryQueue.take(); 44 45 // // Indicate this thread is not available 46 // wrapper.increaseBusy(); 42 47 43 48 String serializerType = delivery.getProperties().getType(); … … 64 69 } 65 70 71 72 Channel channel = obj.getChannel(); 73 74 66 75 // Reply if it's necessary 67 76 if (!request.isAsync()) { 68 77 Response resp = new Response(request.getId(), obj.getRef(), result, error); 69 78 70 Channel channel = obj.getChannel();79 71 80 72 81 BasicProperties props = delivery.getProperties(); … … 79 88 + props.getReplyTo()); 80 89 } 81 90 91 channel.basicAck(delivery.getEnvelope().getDeliveryTag(), false); 92 93 // // Indicate this thread is available 94 // wrapper.decreaseBusy(); 82 95 } catch (InterruptedException i) { 83 96 logger.error(i);
Note: See TracChangeset
for help on using the changeset viewer.