1 Reply Latest reply on Jul 28, 2002 1:16 AM by dsundstrom

    CMP-Cache Problem with commit-option A or B

    manuelf

      Hi all,

      I encountered the following problem using either JBOSS 2.4.4 or 2.4.6:

      calling a session-bean method (tx required), which first deletes an cmp-entity-bean and afterwards tries to insert an entity-bean with the same primary-key fails with "INSERTING AN ALREADY EXISTING BEAN". However if I change the commit-option for that bean to C everything works fine. Btw. the primary-key is a simple String.

      Later on I changed my testcase:

      In the first method call to the session bean I delete the entity-bean. Database profiling shows me the delete-statement and a look in the DB ensures that the corresponding row is deleted.
      Then in the second call (new Tx) I check for existence of the entity bean (home.findByPrimaryKey(key)) and the finder returns the entity bean, although it doesn't exist in the DB.

      Any ideas?? I don't like switching to commit-option C!

      Cheers,

      Manuel