0 Replies Latest reply on Aug 27, 2002 10:25 AM by Kuba Nowakowski

    jdbc2.PersistenceManager bug

    Kuba Nowakowski Newbie

      Hi

      during solving problem described in
      Message "Duplicate message.header.messageId"

      i also find small bug int jdbc2.PersistenceManager
      if messageRef.isStored == true
      markMessage throws NullPointerException because of lack
      c = datasource.getConnection()

      i'm sure it's never appeard in tests because of the bug i described in reply to "Duplicate message.header.messageId" message.

      public void add(MessageReference messageRef, org.jboss.mq.pm.Tx txId) throws javax.jms.JMSException
      {

      // LogInfo logInfo;
      TransactionManagerStrategy tms = new TransactionManagerStrategy();
      tms.startTX();
      Connection c = null;
      PreparedStatement stmt = null;
      try
      {

      // has it allready been stored by the message cache interface??
      if (messageRef.isStored)
      {
      //update the stored record,

      /// c == null

      markMessage(c, messageRef.messageId, (String) messageRef.persistData, txId, "A");
      }


      regards

      Kuba