How to configure a JNDI data source in WebLogic?

Configuring a JNDI datasource in WebLogic requires the following steps:

  1. Log in to the management console of the WebLogic server.
  2. Expand the “Domain Configuration” in the left navigation bar and select “JDBC”.
  3. Select the “Data Source” tab in the right panel.
  4. Click on the “Create New” button to build a new data source.
  5. On the data source configuration page, enter the name and JNDI name of the data source. The JNDI name is a unique identifier used in the application to retrieve the data source.
  6. Choose the appropriate database type and driver, then configure the database connection properties such as URL, username, and password.
  7. Configure pool settings, such as minimum and maximum connection numbers, idle connection timeout, etc.
  8. Set up advanced configurations such as the SQL statement used for testing connectivity and connection leak recovery.
  9. Click on the “OK” button to save the data source configuration.
  10. Get the data source using the JNDI name in the application and use it for database operations.

After completing the above steps, you have successfully configured a JNDI data source in WebLogic. Your application can now access the data source using the JNDI name and perform database operations with it.

bannerAds