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…
- Login to OAS
- Cluster Topology > OC4J-instance > Administration > JDBC Resources
- 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
- 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
- Restart the relevant OC4J-instance
- Deploy/Redeploy the application (appname)
- 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
Thank you very much