Creating data-sources.xml

If you need to control the contents of the data-sources.xml file when running in the embedded OC4J server, you can create a distinct data-sources.xml which applies to a particular application and JDeveloper project. This file defines deployment-specific information before you deploy the Enterprise Archive (EAR) profile to the embedded OC4J server.

The data-sources.xml file specific to the application is created in the following location:

<jdev_install>/jdev/system/oc4j-config/data-sources.xml

When you are ready to deploy a WAR or EJB to the Oracle Application Server, this data-sources.xml file is automatically packaged and deployed with the Enterprise Archive (EAR) file as part of the global data-sources.xml file which contains the all data sources for all applications. See About OC4J Data Sources for more information.

To create an data-sources.xml for the selected project:

  1. In the Navigator, select the project_icon <projectname>.jpr in which you want to create the data-sources.xml.
  2. Choose File | New to open the New Gallery.
  3. In the Categories tree, expand General and select Deployment Descriptors.
  4. In the Items list, double-click Data Sources Descriptor for OC4J (data-sources.xml).
  5. Click OK.
  6. The newly created data-sources.xml is opened in the Code Editor. Edit this file as appropriate.

See also: "Oracle Application Server Containers for J2EE User's Guide" for more information about creating this file.


Related topics
About OC4J Data Sources