Solved

JMS

Posted on 2002-03-07
2
386 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 19

Accepted Solution

by:
Jim Cakalic earned 40 total points
ID: 6852233
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
ID: 6855794
Thanks Jim.
0

Featured Post

Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
Suggested Courses

710 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