I'm using Jboss 6.1 together with Hibernate and HornetQ. If I manipulate Data in my Database and add a message to the Queue that relies on the data changed just before I don't want that message to be processed before my data has been actually committed to the DB. So in order to avoid a race condition I'd like to get HornetQ into my Container Managed Transaction so the message would only be "committed" to the queue when the global Transaction is also committed.
Is this possible ? Any hints ?