Can you actually implement a MDB that listens to synchronous message?
There is no such thing as "synchronous and asynchronous messages", there is only synchronous and asynchronous ways of getting messages from the queueu. Your onlu chance I think is to have the MDB use a seletor of some cind of property that tells that this is the message to fecth (async) and that your sync JMS client (is it in a session bean?) select on another property.
sorry, I should have been more clear. I have a client that sends messages to a queue. The client may or may not need to wait for replies (hence synchronous or asynchronous). The MDB consumes these messages, does some processing and returns a reply. I am using message selectors to make sure the messages are consumed by the right component. But I want the MDB to process the synchronous messages first (if there are both async and sync messages in the queue at the same time), as I don't want my client to time out. I thought of setting the JMSPriority header but I'm not sure how JBoss handles that. Any ideas would be appreciated and thanks for the help.
Yes, last time I checked, the priorities (0-10) are honored.