0 Replies Latest reply on Jan 7, 2011 4:41 AM by Corneil du Plessis

    Transactions with JBoss Messaging and SeamTest not behaving as expected.

    Corneil du Plessis Newbie

      I am experiencing a problem with JMS messages being available and read by listening MDB before the original transaction has completed committing.

       

      The following steps outline the problem:

      • Insert message to queue
      • Listener reads queue and creates an entity.
      • Listener also publishes information classname/id to topic.
      • Topic listener reads entity using classname and id but object is not found.

       

      If topic listener sleeps before attempting to read the entity the object is available.

       

      I have created a project that illustrates the problem.

       

      The project is an Eclipse project with Maven pom.

       

      To get the project to work you need to copy bootstrap from seam distribution into project folder.

       

      Search for TODO in the Java code and uncomment the sleep statement to see the difference made by delaying the topic listener.