4 total views, 2 views today

How to create a WebLogic Data Source 

In this section, we walk through how to create a Generic WebLogic data source in WebLogic Server with some examples.

  • The generic Data source provides database access and connection management to the client code, Java or web app.
  • WebLogic creates a connection pool when the server startup and close the pool when the server shutdown
  • Using the WebLogic data source, you can skip referring the database connection details in the code by lookup the JNDI name

 

Create a Generic Data Source in WebLogic

1. Login into WebLogic Console. The default URL is http://<HOSTNAME>:<PORT>/console

 

031517_0146_Howtocreate1 How to create WebLogic Data Source

 

2. Click Data Sources under services, Click New and select Generic Data Source

 

031517_0146_Howtocreate2 How to create WebLogic Data Source

 

3. Input a Name, Scope as Global, JNDI Name for your code to lookup, and Database Type (Oracle, My SQL, etc.,)

 

031517_0146_Howtocreate3 How to create WebLogic Data Source

 

4. Accept the default and click Next

 

031517_0146_Howtocreate4 How to create WebLogic Data Source

 

5. Click Next

 

031517_0146_Howtocreate5 How to create WebLogic Data Source

 

6. Input your database connection string

 

031517_0146_Howtocreate6 How to create WebLogic Data Source

 

7. Click on the Test Connection button to test the database connection. Click Next

 

031517_0146_Howtocreate7 How to create WebLogic Data Source

 

8. Select the servers where you want the data source is available. This step is important; The JNDI is only available on the servers that you are selecting here. Click Finish

 

031517_0146_Howtocreate8 How to create WebLogic Data Source

 

9. The created data source will be listed in the Data Sources

 

031517_0146_Howtocreate9 How to create WebLogic Data Source

 

Some Examples:

 

1. Create a Web Service from a Database Table with JNDI Lookup

2. Create a Java class that look up JNDI Data source in WebLogic

govindan How to create WebLogic Data Source
Connect me

Govind

Thank you for visiting my personal blog. Myself Govindan, Software Developer by profession since 2006 and hence I started this blog early in 2016 and ever since I've been writing about technologies experienced and learnings of everyday life.

The views expressed on this blog are my personal views and do not necessarily reflect the views of my employer.

Please feeling free to reach me on any comments and feedbacks you have. Would be more than glad to listen and reply šŸ™‚
govindan How to create WebLogic Data Source
Connect me
By | 2017-03-14T20:56:48+00:00 March 14th, 2017|Categories: WebLogic|Tags: , , |0 Comments
Like us on Facebook.
Connect!