Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

JMS

Posted on 2002-03-07
2
Medium Priority
?
399 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 160 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

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
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…
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
Suggested Courses

715 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