3 Replies Latest reply on Feb 1, 2004 1:34 PM by Adrian Brock

    Turn off JMS persistense

    bul Newbie

       

      "bul" wrote:
      I use JBoss 3.2.3 + MySQL 4.0.17
      I want to turn off JMS persistence. I don't want JMS_MESSAGES and JMS_TRANSACTIONS tables in a database.
      I searched through 'Messaging, JMS & JBossMQ' topics. I found the answer that DeliveryMode.NON_PERSISTENT should be added as queueSender.send() parameter.
      I tried this (see the code).
      <
      QueueConnectionFactory connectionFactory = getConnectionFactory();
      Queue queue = getQueue();
      connection = connectionFactory.createQueueConnection();
      session = connection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
      QueueSender queueSender = session.createSender(queue);
      ObjectMessage message = session.createObjectMessage();
      message.setObject(obj);
      queueSender.send(queue,
      message,
      DeliveryMode.NON_PERSISTENT,
      Message.DEFAULT_PRIORITY,
      Message.DEFAULT_TIME_TO_LIVE);
      >

      BUT(!) MySql logs CONTAIN many sql queries to JMS_MESSAGES and JMS_TRANSACTIONS tables (see log part)
      <
      8 Query INSERT INTO JMS_TRANSACTIONS (TXID) values(3)
      8 Query commit
      8 Query DELETE FROM JMS_MESSAGES WHERE TXID=3 AND TXOP='D'
      8 Query DELETE FROM JMS_TRANSACTIONS WHERE TXID = 3
      8 Query commit
      >

      How could I TURN OFF JMS persistence in JBoss 3.2.x ?