0 Replies Latest reply on Feb 1, 2012 8:25 AM by 914537

    jms text message. unable to fill text_vc field

    914537
      I have oracle AQ with payload type SYS.AQ$_JMS_TEXT_MESSAGE, then i enqueue the message into the queue (extract from the code here, "message" is the text of the message):

      Connection conn = cf.createConnection();
      Session session = conn.createSession(false, 1);
      MessageProducer producer = session.createProducer(dst);
      TextMessage msg = session.createTextMessage(message);
      setHeaders(msg, headers);
      producer.send(msg);

      the problem is that I always have the USER_DATA.TEXT_LOB filled, even if the message's size is less than 4000 bytes. I assume to have USER_DATA.TEXT_VC filled in case of short string message (<4000 bytes).

      the AQ DB has multibyte character set utf8, so it's about 4 bytes/symbol (and takes some additional overhead per conversion).
      By force of experiments i found that message is placed in the TEXT_VC field if its length =<500 symbols.
      so i suppose the TEXT_LEN field isn't calculated correctly (as i see it is calculated as per 1 byte encoding). could somebody advice why?