[jboss-user] [JBoss Messaging] - best practice for JTA based consuming and delegating
do-not-reply at jboss.com
Wed Jul 2 04:40:16 EDT 2008
I am a little confused.
I have to receive messages from a local queue and have to delegate this to some business logic (Session Beans) (which persists data in a DB);
I have to ensure that the message order is preserved, also in case of rollbacks or exceptions. I also have to ensure that the consuming and the business logic is handles in one transaction.
My first idea was to receive messages via a MDB but in case of setRollbackOnly() the MDB container does not retry the same message so order is scrambled.
Then I thought to create a Service which starts a plain receiver which uses jmsXA Connectionfactory to create a transacted receive. Message by Message.
My question. Does this also starts a JTA transaction where my called Sessionbeans later enlist to? Or must I start a transaction by hand?
I am searching for the best practice to receive messages and process them by my ejb3 session and entitybeans in one transaction.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4161973#4161973
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4161973
More information about the jboss-user