Package javax.jms

Examples of javax.jms.Destination


         System.out.println("message processed, result: " + result);
        
         conn = getConnection();
         session = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
        
         Destination replyTo = m.getJMSReplyTo();
         MessageProducer producer = session.createProducer(replyTo);
         TextMessage reply = session.createTextMessage(result);
        
         producer.send(reply);
         producer.close();
View Full Code Here


         conn = cf.createConnection();
         conn.start();
         session = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);

         Destination replyTo = m.getJMSReplyTo();
         MessageProducer producer = session.createProducer(replyTo);
         TextMessage reply = session.createTextMessage(result);

         producer.send(reply);
         producer.close();
View Full Code Here

   }

   public void run() throws Exception
   {
      Object message[] = test.getMessages().get(msgNo);
      Destination msgdest = (Destination)message[1];
      if (destination == null)
         destination = test.getDestination();
     
      if (message == null || !msgdest.equals(destination))
         throw new Exception("**** For msgNo=" + msgNo + " destination=" + destination.toString() + " received=" + msgdest.toString());
     
   }
View Full Code Here

   {
      try
      {
         if(message.getJMSReplyTo() != null)
         {
            Destination destination = message.getJMSReplyTo();
           
            Connection conn = connectionFactory.createConnection();
            try
            {
               Session session = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
View Full Code Here

   {
      try
      {
         if(message.getJMSReplyTo() != null)
         {
            Destination destination = message.getJMSReplyTo();
           
            Connection conn = connectionFactory.createConnection();
            try
            {
               Session session = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
View Full Code Here

      long sentTimestamp = message.getJMSTimestamp();
      long currentTimestamp = System.currentTimeMillis();
      // check if received message is not too old because in case of overload we could have old search-messages
      if ( (currentTimestamp - sentTimestamp) < receiveTimeout ) {
        final String correlationID = message.getJMSCorrelationID();
        final Destination replyTo = message.getJMSReplyTo();
        if (message instanceof ObjectMessage) {
          ObjectMessage objectMessage = (ObjectMessage) message;
          final SearchRequest searchRequest = (SearchRequest) objectMessage.getObject();
          TaskExecutorManager.getInstance().runTask(new Runnable() {
   
View Full Code Here

 
  private synchronized Destination acquireTempQueue(Session session) throws JMSException {
    if (tempQueues_.size()==0) {
      if (session==null) {
        Session s = connection_.createSession(false, Session.AUTO_ACKNOWLEDGE);
        Destination tempQ = s.createTemporaryQueue();
        s.close();
        return tempQ;
      }
      return session.createTemporaryQueue();
    } else {
View Full Code Here

  public void setSearchWorker(OLATSearcher searchWorker) {
    //not used: here the searcherWorker is the remote search service   
  }

  private Message doSearchRequest(Session session, Message message) throws JMSException {
    Destination replyQueue = acquireTempQueue(session);
    if(Tracing.isDebugEnabled(ClusteredSearchRequester.class)){
      Tracing.logDebug("doSearchRequest replyQueue=" + replyQueue,ClusteredSearchRequester.class);
    }
    try{
      MessageConsumer responseConsumer = session.createConsumer(replyQueue);
View Full Code Here

        List<Exchange> list = resultEndpoint.getReceivedExchanges();
        Exchange exchange = list.get(0);
        Object replyTo = exchange.getIn().getHeader("JMSReplyTo");
        LOG.info("Reply to is: " + replyTo);
        Destination destination = assertIsInstanceOf(Destination.class, replyTo);
        assertEquals("ReplyTo", replyQueue.toString(), destination.toString());
    }
View Full Code Here

    return _destination;
  }

  private void resolve()
  {
    Destination destination = null;

    InjectManager webBeans = InjectManager.create();

    String name = _mappedName;
View Full Code Here

TOP

Related Classes of javax.jms.Destination

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.