Esempio n. 1
0
 public MessageExchange accept() throws MessagingException {
   if (this.closed) {
     throw new MessagingException("Channel is closed");
   }
   try {
     QueueSession qs = container.getQueueSession();
     Queue queue = qs.getQueue(componentName);
     MessageExchange me = (MessageExchange) queue.take();
     if (me != null) {
       handleReceive(me);
     }
     return me;
   } catch (InterruptedException e) {
     throw new MessagingException(e);
   }
 }