users@glassfish.java.net

JMS: Queue-Ordering

From: <forums_at_java.net>
Date: Wed, 7 Mar 2012 07:13:29 -0600 (CST)

Hi all,

I'm currently evaluating glassfish and its jms-component for a project where
two requirements have to be fullfilled. The queue has to be orderd and there
may be only one consumer. This is important since messages might depend on
each other.

By configuring a singleton-bean-pool I currently have one MDB processing the
messages, wich is quite good but has one bad issue: I have to query an
external resource and this query might fail. It is unlikely, but possible,
that a couple of messages are delivered to the queue and the first one fails
to query the external resource. In that case I want to abort and reprocess
this "message 1" until it succeeds and I do NOT want to process "message 2"
or even "message 3", which made it to the queue as well.

However, that's precisely that happens when I detect the issue and invoke
"mdc.setRollbackOnly();" on "message 1".

I should be able to dodge MDB and instead create a standalone-client
performing the required processing. However, I'm not sure that would solve
the ordering issue? And since it would be very closely coupled, a
MDB-solution would be the preferred option. Or there might be
options/properties of queues in Glassfish which I'm not aware of yet. Or I
might have to evaluate alternatives, but that would be the worst option. :-(

I'm quite confused by the available glassfish-homepages and available
documentation, quite a lot of links are leading to non-existent URLs. Looks
like quite a bit of documentation still has issues with Oracle aquiring Sun?
I'm not even sure I'm asking in the right forum, so feel free to give me some
kicking, as long as you point me in the right direction. ;-)

Yours,

Patrick.


--
[Message sent by forum member 'pvdh']
View Post: http://forums.java.net/node/884067