2 Replies Latest reply: Jul 12, 2013 8:28 AM by Dimitar Dimitrov RSS

    Issues with Nested AM Transaction

    913642

      Hi All,

       

      I am using JDev  11.1.1.6 and WLS 10.3.6

      I am developing an application that contains a number of AMs(Application Module) . Now I clubbed  all the AMs under a root AM.by modifying  the databindings.cpx and all the necessary pagedefs.

      Now I need a mechanism so that any individual AM can be committed at a time.

      I am explaining the scenario with an example

      •      I have two regions in UI that uses two different jsff(having different taskFlows). Each jsff have different AM that is now clubbed under a single root AM.
      •      I made changes in both the regions.
      •      For saving the changes I have two separate buttons that calls the commit operation and which in turn calls the overridden doDML method in respective EOImpl class.
      •      Now when I click one button,this results in saving both the regions.

      I want to avoid this scenario and want that, click on one save button should affect the respective region.

      How to achieve this please suggest.

        • 1. Re: Issues with Nested AM Transaction
          Dimitar Dimitrov

          Nested AMs do not have their own DB connection and a transaction object but they use (i.e. share) the connection and the transaction object of the root AM. When you commit/rollback a nested AM instance, you in fact commit/rollback the root AM together with all its nested AM instances.

           

          If you want to commit the regions separately, you must not use nested AMs (in one and same root AM) but separate root AMs instead.

           

          Dimitar

          • 2. Re: Issues with Nested AM Transaction
            Dimitar Dimitrov

            As an alternative, you can configure the bounded taskflows of the regions not to share DataControls with the parent taskflow (if this suits your use case), so the framework will create separate DataControl frames for the regions and they will be given separate AM instances from each other and from the parent page (with separate connections and transaction objects).

             

            Dimitar