Friday, March 25, 2011

ADF with DB2 SQL Server Oracle


If we want to use one ADF application with multiple database then we have to select SQL92 Flavor when building an application. This makes application portable to both Oracle DB and Non Oracle DB.

Explanation :-

When we create first business component for fusion web application.

Jdeveloper prompt the dialog for database connection that we can choose.

There are two more important selection that are

SQL Flavor

SQL flavor will be use by view objects  to formulate SQL statements. Although the default for an Oracle database connection is always the Oracle SQL flavor, other SQL flavors you can choose include OLite (for the Oracle Lite database), SQLServer for a Microsoft SQLServer database, DB2 for an IBM DB2 database, and SQL92 for any other supported SQL92- compliant database.


Once SQL Flavour is selected it cannot be changed later on using project properties, but can be overidden in adf-config.xml overiew.


When we overide it adds following lines in adf-config.xml

When Specified database type in the adf-config.xml file supports generating SQL statements during runtime which can require the actual database type



There is more imporant setting of Type Map that that data model project will use. If JDeveloper detects you are using an Oracle database driver, it defaults the Type Map setting to the Oracle type map and will use the optimized types in the oracle.jbo.domain package.

We can also change to use Java type map.

Also , One cannot change the type map after it is initialized a data model project.

No comments:

Post a Comment