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 » set Header property

Post new topic  Reply to topic
 set Header property « View previous topic :: View next topic » 
Author Message
maxis
PostPosted: Thu Nov 07, 2002 1:28 pm    Post subject: set Header property Reply with quote

Centurion

Joined: 25 Jun 2002
Posts: 144

Code:

        long expiry = 1036705617096L ;
        long setTime = 1036705617096L ;

        TextMessage tmsg = qSession.createTextMessage();
       
        tmsg.setText("Today is Thursday") ;
        tmsg.setJMSExpiration(expiry) ;
        tmsg.setJMSTimestamp(setTime) ;

       
        qSender.send(tmsg);
        System.out.println("expiry set to "+tmsg.getJMSExpiration());
        System.out.println("setTime "+setTime);
        System.out.println("get time Stamp "+tmsg.getJMSTimestamp());


whats wrong with above code .. am getting the output as

Quote:

expiry set to 0
setTime 1036705617096
get time Stamp 1036705656850
which is not correct.
Will someone correct me ...pl

thanks
M
Back to top
View user's profile Send private message
abmanesh
PostPosted: Fri Nov 08, 2002 6:33 am    Post subject: Reply with quote

Apprentice

Joined: 06 Nov 2001
Posts: 39

Could you check the value of EXPIRY property value on the Queue admin object.

I think you have to set EXPIRY(APP) when you define the Queue Admin object with JMSAdmin tool, so that your application can control the value of Expiry.
Back to top
View user's profile Send private message Send e-mail
dletien
PostPosted: Wed Nov 20, 2002 6:54 pm    Post subject: Reply with quote

Newbie

Joined: 30 Aug 2002
Posts: 9
Location: Chicago

As far as I remember, the setJMSMessage is not taken into account when you send a message.

In order to specify the Message life time, you have to specify it directly using the send method.

Didier
Back to top
View user's profile Send private message MSN Messenger
udaybho
PostPosted: Fri Nov 22, 2002 1:07 pm    Post subject: Reply with quote

Voyager

Joined: 09 May 2002
Posts: 94
Location: Chicago

I recommend to crosscheck this values directly inside the MQ Message. When you see the message inside the MQ queue, use utilities such as amqbsc ( I might have spelled it wrong) to browse the messages in the queue and then check out the MQRFH2 header.

Uday Bhosle
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » set Header property
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.