Oracle jdeveloper develops J2EE applications based on the ADF frameworkProgramThe configuration of the data source must be involved. After exploration, we finally figured out how to configure the data source in jdeveloper and how to configure the data source after deploying it to the application server.
Due to the use of a variety of development technologies in the ADF framework, such as toplink and ADF business component, different development technologies are used, and the data source configuration methods are also different, I have summarized the data source configuration methods when using the toplink and ADF BC components. First, you must create a database connection. You can use the database connection wizard to set the JDBC connection string, user name, and password for accessing the database.
I. Oracle toplink
Mainly involves sessions. xml and data-sources.xml files,
Sessions. XML is a file that comes with toplink. It is used to configure the name of the data source used in the program and set the username and password for accessing the database; if you have updated the authentication information for connecting to the database or changed the name of the data source used by the program, you must modify the file. It is stored in the model layer.
The data-sources.xml is manually created and generated through the maid,
Ii. ADF BC
Mainly involves bc4j. xcfg and data-sources.xml files
Among them, bc4j. xcfg is a unique file of the adf bc. It is used to configure the data source name used in the program and set the user name and password for accessing the database; if you have updated the authentication information for connecting to the database or changed the name of the data source used by the program, you must modify the file. It is stored in the viewcontroller layer.
The data-sources.xml is manually created and generated through the maid,
You can see that there is a data-sources.xml file that serves to deploy the application to the application server, which reads data source information from the data-sources.xml as the data source configuration information for the application server, the content is automatically generated as follows:
In the "Tools" menu, select "embedded productname server Preferences ",
Click Refresh now to update the database connection information created in Database Connection Wizard to the data-sources.xml file.