Wednesday, October 2, 2013

How to Define Nested Application Module In ADF

This blog explains about very cool feature about defining Nested Application Module In ADF

Scenario : I have two different ADF Model projects, Two model projects have two different application modules, and each application module connected to different database. You can nest first application module(eg : CustomerService) to second app module(eg : HistoryDataService), and can access all the capabilities of first application in second application module

Implementation

- In this example, I have two ADF Model projects, First one is CustomerModel and second one is Model project
- I want to nest CustomerServic App Module in 'HistoryDataService' App module part of 'Model' project


- Add the 'CustomerModel' project as dependent on 'Model' project as shown below

- Open Model.jpx file and import 'CustomerModel.jpx' file  as shown below , Click on '+' button to import
- After importing 'CustomerModel.jpx' , Model project will have access to 'CustomerService' App Module


- Open 'HistoryDemoService' Application Module, Expand ' Application Module Instances' section , Shuffle 'CustomerDataService' to right hand side as shown below

- Open 'HistoryDemoService' App module impl class, you will notice 'CustomerService' app module related getter and setter methods as shown below.


1 comment:

  1. Hi, when you said two different database, obviously it will be two different data sources. How can we have nested if the data sources are different ? It should be two different transactions because the transaction goes by data source right ? There is no question of sharing same database connection over here by nesting the application module. That's what my thought. Correct me if I am wrong

    ReplyDelete