File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes EJB and other Java EE Technologies and the fly likes JMS MessageSelector Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "JMS MessageSelector" Watch "JMS MessageSelector" New topic
Author

JMS MessageSelector

Christian Neudorfer
Greenhorn

Joined: Feb 09, 2004
Posts: 5
Hi,
if I have a durable subscription to a topic with a specified MessageSelector. What is easiest way, if I want to change the conditions of the MessageSelector?
Do I have to unsubscribe and subscribe again with a new MessageSelector?
Best regards,
Christian
Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8919

public TopicSubscriber createDurableSubscriber(Topic topic,
String name,
String messageSelector,
boolean noLocal)
throws JMSException


Groovy
Christian Neudorfer
Greenhorn

Joined: Feb 09, 2004
Posts: 5
Yes, I know. I already have a client with a durable subscription.
What I wanted to know is, if there is a way to change the MessageSelector of a TopicSubscriber.
For example:
TopicSubscriber tSubscriber = tSess.createDurableSubscriber(topic, "Test", "version > 2", true);
What do I have to do, if I want to change to "version > 3" ???
Christian
Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8919

You will have to create a new subscriber for the new message selector.
Christian Neudorfer
Greenhorn

Joined: Feb 09, 2004
Posts: 5
Ok,
I hoped that there is another way...
Thank you for your fast reply.
Best regards,
Christian
 
Don't get me started about those stupid light bulbs.
 
subject: JMS MessageSelector