Thursday, August 18, 2011

ADF 11g model project generic datasource

While creating a ADF model project in an ADF application, we define the connect string (hard coded) to connect to the database. However, while migrating the ADF application on to different environments, the connect string values might change and has to be referred dynamically from the data source created in the application server. To ensure that the ADF application points to the data source, we can define the configuration settings in the model project 'AppModule'.

Step 1: Right Click on the 'AppModule' and go to 'Configurations...'

Step 2: Under the 'Manage Configurations' dialog, edit the AppModuleLocal and AppModuleShared business components

Step 3: Under the 'Connection Type' panel, choose 'JDBC DataSource' and enter the data source name that is created on the application server

Step 4: Save and deploy the ADF application.

Now, we have ensured that the ADF application model refers to the application server data source. This will keep the ADF application generic as we have externalized the database connection details.

No comments:

Post a Comment