3 Replies Latest reply on Jun 4, 2003 3:00 AM by artems

    JMS session not committed by Container Transaction

    artems Newbie

      I'm using a stateless session with container transactions and the transactional attribute is Required.

      The session's business method updates the DB and publishes a message to a topic. At the end of the business method I call close() method on the session.
      The code looks like that:

      topicSession = topicConnection.createTopicSession(true, 0);
      publisher = topicSession.createPublisher(topic);
      message = topicSession.createObjectMessage(obj);

      The problem is that the message is not delivered upon commit (after the method returns), but instead the topic session is rolled back as a result of calling close().

      Am i doing something wrong?

      Thanks in advance,