1 Reply Latest reply on Jan 24, 2005 2:03 AM by Joachim Van der Auwera

    seeing CMP updates with jdbs select statements within the sa

    Irena Vinkovska Newbie

      Hi . We are migrating from oracle's oc4j AS to JBoss and we can't find an equivalent to oc4j delay-updates-until-commit flag for entity beans.
      This flag gave us ability to see changes of CMP bean when we executed plain select statements within the same transaction. so for example
      we start transaction find a bean with findByPrimaryKey , change some value, then later in the same transaction we do select on DB and the change that was applied to CMP above was coming through even though transaction is not over yet and changed of CMP bean were not committed at a time. Is there any way in JBoss to achieve the same behaviour?
      Thank you.

      P.S. there is a similar tag in Weblogic called delay-updates-until-end-of-tx

        • 1. Re: seeing CMP updates with jdbs select statements within th
          Joachim Van der Auwera Expert

          I think what you need is

          <sync-on-commit-only>true</sync-on-commit-only>

          which can be specified in the container configuration.

          However, that is what I would expect from the tag names, but it has nothing to do with your description. CMP should always see the entity beans with their current state in the transaction. It will (possibly, definately with the configuration above) not be the same as the database view, but should be consistent.

          When the database state needs to be the same, you should set the above flag to false, but your transaction isolation level will probably not let you see the changes anyway as they are not committed yet.

          Joachim