0 Replies Latest reply on Dec 4, 2002 10:14 AM by morphace

    CMP state

    morphace

      Hi,

      fist of all: I use JBoss 3.2beta1.

      I looked in the server.log and wondered that there are so many SQL statements executing, when the state of my CMP EJB's is written to the database (Oracle non-xa ds).

      For examle (create of a BestellPosition instance):

      16:17:29,201 DEBUG [BestellPosition] Create: pk=120045
      16:17:29,201 DEBUG [BestellPosition] Executing SQL: SELECT COUNT(*) FROM M001POSITIONBESTELLUNG WHERE positionNr=?
      16:17:29,201 DEBUG [BestellPosition] Executing SQL: INSERT INTO M001POSITIONBESTELLUNG (positionNr, bestellMenge, eK, rabatt1, bestellungNr, artikelNr
      ) VALUES (?, ?, ?, ?, ?, ?)
      16:17:29,201 DEBUG [BestellPosition] Rows affected = 1
      16:17:29,201 DEBUG [BestellPosition] Executing SQL: UPDATE M001POSITIONBESTELLUNG SET bestellMenge=?, rabatt1=? WHERE positionNr=?
      16:17:29,201 DEBUG [BestellPosition] Rows affected = 1
      16:17:29,217 DEBUG [BestellPosition] Executing SQL: UPDATE M001POSITIONBESTELLUNG SET artikelNr=? WHERE positionNr=?
      16:17:29,232 DEBUG [BestellPosition] Rows affected = 1

      As you can see, the same table is UPDATED several times (in one transaction!)

      Why doesn't JBoss wait until all modifications of the corresponding EJB's are done (until the commit) and then write the state to the DB ?

      I know, that the MVCSoft persistance manager does something similar.

      Are there any options to influence this behavior ?

      I bought the CMP docs, but I did not find something about this issue.


      Thanx
      Markus