Forum Stats

  • 3,759,524 Users
  • 2,251,560 Discussions
  • 7,870,692 Comments

Discussions

Can we have support on ADF framework to crate the two AMs with two different data sources?

Can we have support on ADF framework to crate the two AMs with two different data sources?

Like:

AM1 will hold the Datasource1

AM2 will hold the Datasource2

and referring AM2 using "AppModuleUsage" tag in "AppModule" section of AM1?

When I tried AM1 and AM2 are taking same data source. Does any one have any references or documents how to handle this?

Tagged:

Best Answers

  • Timo Hahn
    Timo Hahn Senior Principal Technical Consultant - Oracle ACE Director Member, Moderator Posts: 37,556 Red Diamond
    Accepted Answer

    User, tell us your exact JDev version, please!

    Each root application module holds its own connection to the DB.

    What do you mean by referring to AM2 in AM1?

    If you add AM2 to AM1, AM2 is not a root application module any longer, but it's stacked under AM1. Both now use the data source of AM1. You should look at https://www.youtube.com/watch?v=vdf13Y8Miik where this behavior is discussed.

    My question will be: why do you need access to AM2 from AM1?

    An AM should be a black box and a boundary of concern. If you need AM2 inside of AM1, the boundary is not a boundary any longer. This calls for a redesign.

    If you really need this access, you have to create a new root application module inside AM1 for AM2. But be careful to release the new root AM as you run out of resources quickly otherwise. And you have to do this housekeeping yourself! No help from the framework here.

    The other possible solution is to make the other DB available on the DB layer by either using synonyms or a DB link.


    Timo


    User_Z5PQB
  • dvohra21
    dvohra21 Member Posts: 14,229 Gold Crown
    Accepted Answer

    Has he blog ADF Application with multiple Data Sources or Database connections been referred?

    User_Z5PQB

Answers

  • Timo Hahn
    Timo Hahn Senior Principal Technical Consultant - Oracle ACE Director Member, Moderator Posts: 37,556 Red Diamond
    Accepted Answer

    User, tell us your exact JDev version, please!

    Each root application module holds its own connection to the DB.

    What do you mean by referring to AM2 in AM1?

    If you add AM2 to AM1, AM2 is not a root application module any longer, but it's stacked under AM1. Both now use the data source of AM1. You should look at https://www.youtube.com/watch?v=vdf13Y8Miik where this behavior is discussed.

    My question will be: why do you need access to AM2 from AM1?

    An AM should be a black box and a boundary of concern. If you need AM2 inside of AM1, the boundary is not a boundary any longer. This calls for a redesign.

    If you really need this access, you have to create a new root application module inside AM1 for AM2. But be careful to release the new root AM as you run out of resources quickly otherwise. And you have to do this housekeeping yourself! No help from the framework here.

    The other possible solution is to make the other DB available on the DB layer by either using synonyms or a DB link.


    Timo


    User_Z5PQB
  • dvohra21
    dvohra21 Member Posts: 14,229 Gold Crown
    Accepted Answer

    Has he blog ADF Application with multiple Data Sources or Database connections been referred?

    User_Z5PQB