activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bruce Snyder" <bruce.sny...@gmail.com>
Subject Re: Message selectors + MDB
Date Tue, 30 Sep 2008 12:58:26 GMT
On Mon, Sep 29, 2008 at 9:25 AM, my_forum <my_forum@ukr.net> wrote:
>
> Guys,
> could anyone give me an example of usage message selectors with Message
> Driven beans?
> I want to process my messages by priority so I think using selectors will be
> a correct choice.
> Has somebody implemented messages processing by priority using MDBs?

Filtering on properties is one way to weed out the messages you're
seeking. I've used it many times in the past with much success. The
message selector syntax supports a subset of SQL 92 and the selector
is typically defined in the EJB deployment descriptor. There are
examples of this in the Java EE docs. Depending on the Java EE version
you're using and the container you're using, below are the URLs:

http://java.sun.com/j2ee/1.4/docs/tutorial/doc/MDB.html
http://java.sun.com/javaee/5/docs/tutorial/doc/bnbpk.html

Also, check out the sample chapter on MDBs from Richard
Monson-Haefel's EJB book available here:

http://www.onjava.com/pub/a/onjava/excerpt/ejb3_ch13/index.html

Also note that instead of creating message-driven beans that require a
Java EE container, you can also create message-driven POJOs by using
only the Spring Framework:

http://blog.springsource.com/2006/08/11/message-driven-pojos/

Bruce
-- 
perl -e 'print unpack("u30","D0G)U8V4\@4VYY9&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
);'

Apache ActiveMQ - http://activemq.org/
Apache Camel - http://activemq.org/camel/
Apache ServiceMix - http://servicemix.org/

Blog: http://bruceblog.org/

Mime
View raw message