4 Replies Latest reply on Jan 29, 2002 3:28 PM by Dain Sundstrom

    Many ejbStore calls

    Michel de Groot Newbie


      we're using jboss 2.4.0 and experiencing a lot of ejbStore calls, even on most getters. This is probably not so nice for performance.

      What could we do to reduce the number of stores?

        • 1. Re: Many ejbStore calls
          Michel de Groot Newbie

          Found some pointers on the web which explained that adding a method
          public boolean isModified()
          to ejb implementation class helps.

          It should return true if the state has changed. JBoss 2.4.x does not store the ejb if the state has not changed.

          • 2. Re: Many ejbStore calls
            Mark Desrosier Newbie

            You can also specify <tuned-updates>true</tuned-updates> in jaws.xml. Either as the default or for each entity bean. <tuned-updates> acceessed whether the bean has changed or not. For us, using Jboss 2.2.1, 2.4.0, and 2.4.3, setting this eliminated the multiple calls to ejbStore without implementing the isModified()

            • 3. Re: Many ejbStore calls
              Alexei Yudichev Newbie

              But <tuned-updates>true</tuned-updates> doesn't work in jboss 2.4.4. Is there any replacement or workaround for CMP beans? isModified() is non-standart.

              • 4. Re: Many ejbStore calls
                Dain Sundstrom Master

                The problem is that you transactions are to small. When each transaction completes the container must sync the entity with the database. Assuming that you have tuned updates on, persistence engine checks each field to see if the value has changed, and if it has it will store the value in the database.

                A common problem occurs when a web interface loads form input into an entity. Programmers commonly forget to wrap these sets with a transaction, so you get one transaction for each field in your form.