activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From my_forum <my_fo...@ukr.net>
Subject Re: Message selectors + MDB
Date Tue, 30 Sep 2008 14:52:07 GMT


bsnyder wrote:
> 
> 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/
> 
> 


Thanks for your reply!
After some investigation I found out that message selectors is not actually
what I need.
I want to support dynamic number of priorities and working with selectors I
will have to create "one bean declaration per priority".

After reading through the forum I see that QM below 5.1 does not support
queue priorities, So I installed MQ 5.1 to my geronimo server and the only
thing left to be done is to set up the JMS resource with
oldestMessageWithLowestPriorityEvictionStrategy.

But the problem I have now that it complains while I'm trying to deploy JMS
resource with BrokerXmlConfig property
'broker:xbean:file:///C:/broker-config.xml' with the exception
javax.management.InstanceAlreadyExistsException:
org.apache.activemq:BrokerName=localhost,Type=Broker

Could you give me a clue how I could handle this?
Thanks a lot!


-- 
View this message in context: http://www.nabble.com/Message-selectors-%2B-MDB-tp19726023p19743676.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Mime
View raw message