Solved

JMS

Posted on 2002-03-07
2
360 Views
Last Modified: 2010-03-31
Hi all
I read in java.sun JMS tutorial that I can create a message selectors. Can I use it to select messages that contains/not contains specific words ?
If so How can I do it? (I need to moderate messages that contains specific words)
Code will be useful.
    Thanks Danny
0
Comment
Question by:dannysh
2 Comments
 
LVL 19

Accepted Solution

by:
Jim Cakalic earned 40 total points
Comment Utility
According to the JMS Spec (3.8.1), selectors cannot reference message body values. Instead, they allow the consumer to specify which messages it is interested in based on headers and properties of the message. The header is a set of predefined fields needed primarily for routing and delivery. The properties are application defined but are separate from the body of the message itself. If you could be guaranteed that the producer of the message would reliably put the correct properties in the message so that your filtering would work, then you could use a selector in your message consumer. Note that the selector doesn't prevent a producer from placing a message on a queue. It simply prevents the consumer from seeing it. The following link, although some of it is Oracle specific, contains some example code for using a selector
    http://download-west.oracle.com/otndoc/oracle9i/901_doc/appdev.901/a88890/adq12jap4.htm

The JMS Specification itself contains a detailed explanation of the syntax for a selector. It is SQL-ish in nature so if you understand a SQL where clause you are well on your way to understanding the JMS selector syntax.

Best regards,
Jim Cakalic
0
 

Author Comment

by:dannysh
Comment Utility
Thanks Jim.
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now