2 Replies Latest reply on Sep 6, 2002 5:46 PM by selvamd

    CMP Persistance problem

    selvamd

      Every time I access a 'get or set' cmp bean property, I saw a call to ejbStore. But ejbLoad() was called only once after the first get or set call. I was surprised and hence to ensure this behaviour I updated the underlying data using Oracle SQLPlus externally when server was runnning. As expected, the updates were not picked up until I restarted the jboss server.

      This behavior seems very strange to me. In my opinion if anything has to called repeatedly to 'over-sync' the data
      it should be ejbLoad(). Calling ejbStore() with every access (get or set) makes no sense at all.

        • 1. Re: CMP Persistance problem
          dsundstrom

          Let me guess... you are using JBoss 2.x. Right?

          JBoss 2.x shipped with commit-option A on by default. Option A assumes that JBoss is the sole user of the database so it can cache anything. In JBoss 3.x the default is Option B which synchronizes with database.

          Commit options are set in the jboss.xml file.

          • 2. Re: CMP Persistance problem
            selvamd

            Still, why would a access to get Method trigger a ejbStore() ?. Get method triggering an ejbLoad() and set triggering ejbStore() could have made more sense.