To deploy a java/ADF app on an Oracle Application Server (10.1.3.1) and handle the datasources from there:

After generating the ear and war files from within JDeveloper…

  1. Login to OAS
  2. Cluster Topology > OC4J-instance > Administration > JDBC Resources
  3. Firstly create the Connection Pools:
    • Connection Pools > Create (for “native” pool)
    • Application: Default
    • select “New Connection Pool“:
      • Name: jdev-connection-native-appname
      • Connection Factory Class: oracle.jdbc.pool.OracleDataSource
      • JDBC URL: jdbc:oracle:thin:@//192.168.10.230:1521/serviceID
      • provide Username and Password
      • Test Connection
    • Connection Pools > Create (for “managed” pool)
    • Application: Default
    • select “New Connection Pool
      • Name: jdev-connection-managed-appname
      • Connection Factory Class: oracle.jdbc.pool.OracleDataSource
      • JDBC URL: jdbc:oracle:thin:@//192.168.10.230:1521/serviceID
      • provide Username and Password
      • Test Connection
  4. Secondly create the Data Sources:
    • Data Sources > Create
    • Application: Default
    • select “Managed Data Source
      • Name: appnameDS
      • JNDI Location: jdbc/appnameDS
      • Transaction Level: Global & Local Transactions
      • Connection Pool: jdev-connection-managed-appname
      • provide Username and Password (credentials)
      • Test Connection
    • Data Sources > Create
    • Application: Default
    • select “New Data Source from Existing Data Source” (select appnameDS)
      • Name: appnameCoreDS
      • JNDI Location: jdbc/appnameCoreDS
      • Transaction Level: Global & Local Transactions
      • Connection Pool: jdev-connection-native-appname
      • provide Username and Password (credentials)
      • Test Connection
  5. Restart the relevant OC4J-instance
  6. Deploy/Redeploy the application (appname)
  7. On AS, set the “Context-root” (this is document root of web-app/site)

Notes:

  • Set the Context-root to create test-version apps (if multiple oc4j’s exist)
  • Create the descriptors/pools under “Default” application as all other application profiles inherit from it. This will help avoiding to delete descriptors created under some “new app” profile.
  • The “Default” app also has 2 demos, a descriptor and a pool -these can be removed as they are only for example