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 » JMS Selector Bug?

Post new topic  Reply to topic
 JMS Selector Bug? « View previous topic :: View next topic » 
Author Message
garbagedook
PostPosted: Mon May 15, 2006 8:49 am    Post subject: JMS Selector Bug? Reply with quote

Novice

Joined: 15 May 2006
Posts: 11

Hello all,

I have a BytesMessage that I am calling setLongProperty with the current timestamp in milliseconds.

long x = System.currentTimeMillis();
msg.setLongProperty("LASTMODDT", x);

I place this message on a queue.

I use a selector with a value that is LESS than x e.g. LASTMODDT >= 1146501224000

But it always returns me nothing!

Please note, I have the selector working on other properites, i.e. those using String equality. I also have the selector working with JMSTimestamp >=, but for my OWN long property it does not work.

Anyone seen this before? Thank you very much in advance.
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Mon May 15, 2006 12:07 pm    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

JMS selectors have extremely poor performance (in the current MQ JMS Implementation).

You are strongly recommended not to use them for anything other than MsgID and CorrelationID.

What are you trying to accomplish with this selector?

Queues are not databases, also, please don't try to use them that way.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
lohitashwa
PostPosted: Tue May 23, 2006 2:10 am    Post subject: Reply with quote

Newbie

Joined: 05 May 2005
Posts: 5

Hi,
I tried a sample program to put a BytesMessage setting the property and fetching the same with Message selectors and it worked fine...

BytesMessage bMsg = session.createBytesMessage();
long x = System.currentTimeMillis();
bMsg.setLongProperty("MYTIME", x);
sender.send(bMsg);

Thread.sleep(1000);
bMsg = null;
QueueReceiver receive = session.createReceiver(que, "MYTIME>=1000");
bMsg = (BytesMessage)receive.receive(5000);
System.out.println("The Msg is " + bMsg);

.
When i executed the above code , i got the message since the time millis was greater than 1000. Can you let me know if you are getting any kind of exception. What is the WMQ CSD version you are currently using.

Regards
Lohitashwa T
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Tue May 23, 2006 3:31 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

@garbagedook
Is it possible that your session is transacted and that your are trying to receive the message before having committed the send ?

Remember was transaction settings will superseed whatever transaction settings you put on the session...

Enjoy
_________________
MQ & Broker admin
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 » JMS Selector Bug?
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.