4 Replies Latest reply on May 10, 2004 4:40 PM by vektom

    each CMP Getter causes reload from storage

    myname

      We have an application that performed well under 3.2.1 with commit-option "B" (which we need). Under 3.2.4 performance decreased massively and it seems as if jboss does generates one sql statement per getter-call.

      It seems like transactions are now defined per getter and not on the enclosing session bean call anymore.

      3.2.4 fixes some bug (ctx lock) for us, so we need to switch. Can anyone please point to some solution on the above problem?

      Regards Volker

        • 1. Re: each CMP Getter causes reload from storage
          myname

          Problem is already addressed under bug report 925597 on sourceforge. But there are no replys since March 30th ...

          • 2. Re: each CMP Getter causes reload from storage

            That is because it is invalid.

            Your problem is because the field access is not linked to a transaction.
            For one of two reasons:
            1) You have no transaction
            2) You are using <read-only> in jboss.xml

            Don't use commit option B. I know it is the default configuration, but it is stupid.

            If you are not going to use a cache, use the "Instance per transaction" configuration
            and remove <read-only> from jboss.xml
            We have discussing making "Instance per transaction" the default configuration
            for a while, the only reason it has not been done is because somebody has to do the
            the spade work of checking the testsuite to reintroduce the current default configuration in
            the correct places.

            • 3. Re: each CMP Getter causes reload from storage
              vektom

              Adrian,

              Just for my information, *must* the <read-only> be removed?

              Another thing that may be related: if I use the Instance per transaction container the code of one of my applications breaks. The entity bridge that is used in that setting prohibits use of CMP getters in home methods (resulting in an appropriate exception), but the standard CMP 2.x container allows it. I wonder if that is not a bug ;)

              • 4. Re: each CMP Getter causes reload from storage
                vektom

                forgot to mention, we use 3.2.3