1. Go to Application Server Control for your Middle-Tier
  2. In the Applications section, click on "default"
  3. Select Administration
  4. Select JDBC Resources
  5. Under Connection Pools, click Create
  6. Select New Connection Pool from Existing Connection Pool
  7. Select "Example Connection Pool" from the dropdown list
  8. Click Continue
  9. As Name, enter MyappCP
  10. as JDBC URL, enter jdbc:oracle:thin:@localhost:1521:ORCL (if your database listener port and SID is not 1521 and ORCL (respectively), then modify the JDBC URL accordingly)
  11. In the Credentials section, enter username (e.g. MYAPP_POOL) and password (e.g. ORACLE4)
  12. Click Finish
  13. Under Data Sources, click Create
  14. Under Data Source Type, select New Data Source from Existing Data Source
  15. Select "OracleDS" from the dropdown list
  16. Click Continue

  17. Create Data Source - Managed Data Source:

  18. Click Finish
  19. Click Test Connection
  20. Click Test

  21. Your data-sources.xml file in the D:\ora10133oc4j\j2ee\home\config folder should now look something like this:
    <?xml version = '1.0' encoding = 'UTF-8'?>
    <data-sources
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:noNamespaceSchemaLocation="http://xmlns.oracle.com/oracleas/schema/data-sources-10_1.xsd"
      schema-major-version="10"
      schema-minor-version="1">
      <managed-data-source
        connection-pool-name="Example Connection Pool"
        jndi-name="jdbc/OracleDS"
        name="OracleDS"/>
      <managed-data-source
        connection-pool-name="MyappCP"
        jndi-name="jdbc/MyappDS"
        name="MyappDS"/>
      <connection-pool name="Example Connection Pool">
        <connection-factory
          factory-class="oracle.jdbc.pool.OracleDataSource"
          user="scott"
          password="tiger"
          url="jdbc:oracle:thin:@localhost:1521:orcl"
          commit-record-table-name=""/>
      </connection-pool>
      <connection-pool name="MyappCP">
        <connection-factory
          factory-class="oracle.jdbc.pool.OracleDataSource"
          user="myapp_pool"
          password="oracle4"
          url="jdbc:oracle:thin:@localhost:1521:orcl"
          commit-record-table-name=""/>
      </connection-pool>
    </data-sources>