Package javax.jms

Examples of javax.jms.Session.createTemporaryQueue()


      try
      {
         Connection conn = connectionFactory.createConnection();
         Session session = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
        
         Queue replyTo = session.createTemporaryQueue();
         TextMessage msg = session.createTextMessage("Hello world");
         msg.setJMSReplyTo(replyTo);
        
         MessageConsumer consumer = session.createConsumer(replyTo);
         conn.start();
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

        Session sess = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);

        conn.start();

        sess.createConsumer(sess.createTemporaryQueue());
    }

    public void setUpClientConsumeFromNamedQueueValid() throws Exception
    {
        writeACLFile("test", "ACL ALLOW-LOG client ACCESS VIRTUALHOST",
View Full Code Here

    {
        Connection conn = getConnection("test", "client", "guest");
        Session sess = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
        conn.start();

        sess.createTemporaryQueue();
        conn.close();
    }

    public void setUpClientCreateTemporaryQueueFailed() throws Exception
    {
View Full Code Here

        conn.start();

        try
        {

            session.createTemporaryQueue();

            fail("Test failed as creation succeded.");
        }
        catch (JMSException e)
        {
View Full Code Here

        serverConnection.start();

        //Set up the consumer
        Connection clientConnection = getConnection("test", "client", "guest");
        Session clientSession = clientConnection.createSession(true, Session.SESSION_TRANSACTED);
        Queue responseQueue = clientSession.createTemporaryQueue();
        MessageConsumer clientResponse = clientSession.createConsumer(responseQueue);
        clientConnection.start();

        // Client
        Message request = clientSession.createTextMessage("Request");
View Full Code Here

         if (HornetQRASession.trace)
         {
            HornetQRASession.log.trace("createTemporaryQueue " + session);
         }

         TemporaryQueue temp = session.createTemporaryQueue();

         if (HornetQRASession.trace)
         {
            HornetQRASession.log.trace("createdTemporaryQueue " + session + " temp=" + temp);
         }
View Full Code Here

           
         }
        
         //Create a temp queue
        
         TemporaryQueue tempQueue = sess.createTemporaryQueue();
        
         counters = (List)
         ServerManagement.getAttribute(ServerManagement.getServerPeerObjectName(), "MessageCounters");
     
         assertNotNull(counters);
View Full Code Here

         producerSession.close();

         try
         {
            producerSession.createTemporaryQueue();
            ProxyAssertSupport.fail("should throw exception");
         }
         catch (javax.jms.IllegalStateException e)
         {
            // OK
View Full Code Here

      {
         producerConnection = JMSTestCase.cf.createConnection();

         Session producerSession = producerConnection.createSession(false, Session.AUTO_ACKNOWLEDGE);

         TemporaryQueue tempQueue = producerSession.createTemporaryQueue();
         String queueName = tempQueue.getQueueName();

         try
         {
            JMSTestCase.ic.lookup("/queue/" + queueName);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.