ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » IBM MQ Java / JMS » reset message sequence number in Java

Post new topic  Reply to topic
 reset message sequence number in Java « View previous topic :: View next topic » 
Author Message
bamboozled_by_MQ
PostPosted: Thu Aug 19, 2004 3:49 pm    Post subject: reset message sequence number in Java Reply with quote

Voyager

Joined: 07 Jan 2004
Posts: 75

if I wanted to reset the message sequence number to 999 I am trying to code it like this, but it seems to keep resetting to '1'

any ideas what i'm doing wrong?

Code:
public static int resetChannel(String channelName, PCFAgent agent) {

    PCFParameter [] parameters = new PCFParameter [] {
            new MQCFST (MQCACH_CHANNEL_NAME, channelName), new MQCFIN (MQIACH_MSG_SEQUENCE_NUMBER, 999)
            };

    PCFHashtable response = null;

    try {
      MQMessage [] pcfResponses = agent.send (MQCMD_RESET_CHANNEL,
                                              parameters);
      response = new PCFHashtable(pcfResponses[0]);
                                     // assume only the one response.

      if (response.isValid()) {
        return 0;
      }

    } catch (Exception e) {
      e.printStackTrace();
    }
    return response.getReasonCode();
  }


thanks
Back to top
View user's profile Send private message
gunter
PostPosted: Fri Aug 20, 2004 1:17 am    Post subject: Reply with quote

Partisan

Joined: 21 Jan 2004
Posts: 307
Location: Germany, Frankfurt

The behavior is unexpectedfor me, but the seqno changed.
dis chstatus(channel) always shows 0 after reset and restart of the channel. If you send a message over the channel, you'll see the real seqno.
_________________
Gunter Jeschawitz
IBM Certified System Administrator - Websphere MQ, 5.3
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » reset message sequence number in Java
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.