1 Reply Latest reply on Dec 17, 2002 11:23 AM by Adrian Brock

    Different <commit-option> to different entity-beans

    Bernhard Löwenstein Newbie

      Hello!

      Is it possible to define different <commit-option> to different entity-beans?

      [I have to every table in my database an own entity-bean. The most entity-beans have exclusive access to their table (no foreign access). But some tables will be manipulated directly by a database tool (foreign access).

      I know that I can change the <commit-option> to B/C for all my entity-beans (in standardjboss.xml). But my app runs faster if I change just the <commit-option> to B/C of the entity-beans with foreign access and let the <commit-option> on A of the entity-beans with no foreign access.]

      Best regards, Bernhard.

        • 1. Re: Different <commit-option> to different entity-beans
          Adrian Brock Master

          jboss.xml



          <container-configurations>

          <!-- Exclusive Access -->
          <container-configuration extends="Standard CMP 2.x EntityBean">
          <container-name>Commit A CMP</container-name>
          <commit-option>A</commit-option>
          </container-configuration>

          <!-- Reload the data for every transaction -->
          <container-configuration extends="Standard CMP 2.x EntityBean">
          <container-name>Commit B CMP</container-name>
          <commit-option>B</commit-option>
          </container-configuration>

          <!-- Get a new bean from the pool for every transaction,
          includes a date reload -->
          <container-configuration extends="Standard CMP 2.x EntityBean">
          <container-name>Commit C CMP</container-name>
          <commit-option>C</commit-option>
          </container-configuration>

          <!-- Data can be 30 seconds out of date, but thats ok -->
          <container-configuration extends="Standard CMP 2.x EntityBean">
          <container-name>Commit D 30 secs CMP</container-name>
          <commit-option>D</commit-option>
          <optiond-refresh-rate>30</optiond-refresh-rate>
          </container-configuration>

          </container-configurations>

          <enterprise-beans>


          <ejb-name>Entity1</ejb-name>
          <configuration-name>Commit A CMP</configuration-name>



          <ejb-name>Entity2</ejb-name>
          <configuration-name>Commit A CMP</configuration-name>



          <ejb-name>Entity3</ejb-name>
          <configuration-name>Commit B CMP</configuration-name>


          </enterprise-beans>



          Regards,
          Adrian