2 Replies Latest reply on Sep 13, 2001 2:09 PM by larry054

    storeRow is executed every time I call a business method

    larry054

      I was diagnosing slow performance on a new application and discovered that every time my program references a business method on an entity bean, the storeRow method of that entity bean gets executed. My Oracle server is hitting the disk every time, writing the same row over and over in a "for" loop, even though none of the values have changed.

      This is happening for several beans. All work perfectly except for this and all are BMP and CMT (with required transaction). Am I overlooking some setting somewhere that can prevent this? Is this a driver issue or Jboss issue? Environment is Jboss 2.4.0/Tomcat 3.2.3/Oracle 8.1.7/Oracle type 4 driver/Win2000-SP2 on both Oracle server and Jboss machine. Thanks for any advice.

      Larry

        • 1. Re: storeRow is executed every time I call a business method
          p_d_austin

          This is normal behaviour, at the end of each transaction store will be called on the bean. To stop this from happening implement and isModified() method that returns true if the data has been modified. In business methods that change data set modified to true. In ejbStore/ejbLoad set isModified to false.

          I think the container knows about the isModified method automatically without any further configuration. I'll check this and get back to you.

          Paul

          • 2. Re: storeRow is executed every time I call a business method
            larry054

            Thank you Paul. In retrospect, it seems obvious, but I have read two books and worked with EJB's for six months and never heard about this issue. I searched Serverside for "isModified" and found some interesting discussion on this subject.
            Thanks again!

            Larry