3 Replies Latest reply on Jul 28, 2004 4:44 AM by Ulf Schroeter

    JMS-Request/Reply from SessionBean

    Ulf Schroeter Novice

      From within a simple SessionBean I am trying to 'emulate' a synchronous request/reply communication with an external legacy system on JBoss3.2.5.

      The session bean creates a temporary queue, stores the reference within the JMS request message (JMSReplyTo) and sends the request to a global request queue.

      The legacy system processes the request and sends the reply back to the client specific temporary reply queue, from where it should be delivered to the waiting ( aReceiver.receive(lTimeout) ) session bean.

      But unfortunately the reply actually DOES NOT get delivered to the waiting session bean. The reply message is succesfully inserted into the temporary queue by the server but the receiving session bean still receives a timeout ?!? Any ideas ?

      Here is the code (simple enough)

       aConnection = rQueueFactory.createQueueConnection();
       aSession = aConnection.createQueueSession(false,QueueSession.AUTO_ACKNOWLEDGE);
       aSender = aSession.createSender(rRequestQueue);
       aReplyQueue = aSession.createTemporaryQueue();
       aReceiver = aSession.createReceiver(aReplyQueue);
       aRequestMessage = aSession.createTextMessage();
       aReplyMessage = (TextMessage) aReceiver.receive(lTimeout);
       sResult = aReplyMessage.getText();
      catch (JMSException eEx)