0 Replies Latest reply on Sep 27, 2004 10:01 PM by grantjennings

    Transactions and cache behaviour

    grantjennings Newbie

      I had an MDB that was updating an entity to which the primary key was sent to it as a property of the message.

      The MDB uses BMT and JBOSS is configured with all defaults.

      A field on the entity is modified (in a transaction) and the MDB commits the transaction & ends.

      If 2 (or more) messages arrive at the same time, accesses to the entity are serialized, but the value of the field on the entity is not updated & the second message gets the same value as the 1st message (prior to setting it).

      The behaviour is consistent with an InstanceCache policy of 'InstancePerTx...', but that is not what is configured, or desired. I have a test case that demonstrates the problem quite consistently. This bug manifests itself in more than 1 place (eg. Sequence generator for primary keys)

      I am assuming this is a bug, but it is possible that i am missing something.