JDBC (Java DataBase Connectivity ) in Oracle WebLogic – Overview

This post covers overview of connecting WebLogic Server to Database using JDBC.

How to connect to Database from Oracle WebLogic Server :
You first create JDBC Datasource (or multi data sources) and then deploy this JDBC datasource (or multi datasource) to WebLogic Server (or cluster) in Domain.

Datasource: contains pool of database connections that are created when datasource instance is created i.e.
a) When it is deployed or targeted
or
b) Server start-up

Multi Datasource : Abstraction around data source to provide load balancing or failover for datasource which are part of Multi Datasource.

.
Who can create JDBC Resource – Administrator or Programmer

How a JDBC resource is created – Using
i) Administration Console (by Administrator)
ii) WLST (WebLogic Scripting Tool)  (by Administrator)
iii) by Programmatically using JMX API (by Developer)

System v/s Application JDBC Module – JDBC Modules created by Administrator using Console or WLST are called as System JDBC module where as JDBC module created by developer using WebLogic Workshop, other IDE (Integrated Development Environment) or XML editor are called as Application JDBC Module.

How JDBC Datasource is stored on server – as XML File under $DOMAIN/config/jdbc directory. i.e. $WEBLOGIC_HOME/ user_projects/ domains/ [domain_name]/ config/ jdbc/

config.xml file in “$WEBLOGIC_HOME/user_projects/domains/[domain_name]/config” points to JDBC datasource configuration file via parameter jdbc-system-resource

sample entry in config.xml

  <jdbc-system-resource>
    <name>JDBC1</name>
    <target>AdminServer</target>
    <descriptor-file-name>jdbc/JDBC1-1894-jdbc.xml</descriptor-file-name>
  </jdbc-system-resource>

which means JDBC configuration file is at “$WEBLOGIC_HOME/ user_projects/ domains/ [domain_name]/ config/ jdbc/ JDBC1-1894-jdbc.xml

.

Step by Step JDBC resource creation (for database connectivity) in WebLogic Server using Administration Console coming next …

About the Author Masroof Ahmad

Leave a Comment:

5 comments
» WebLogic Server JDBC for Database connection : Step by Step Online Apps DBA: One Stop Shop for Apps DBA’s says November 6, 2008

[…] Post This is in continuation of my last post on Database Connectivity (JDBC) in WebLogic Server here , In today’s post I am going to cover step by step JDBC configuration using Administration […]

Reply
» Oracle Internet Directory (OID) and Real Application Cluster (RAC) database : Things you must know Online Apps DBA: One Stop Shop for Apps DBA’s says January 19, 2011

[…] for the Oracle RAC back end. To know more about data source & multi data sources click here and […]

Reply
srinivasan says March 24, 2011

Hi,
Is there a way i can change the log paths of weblogic during domain creation itself using WLST. Like ServerLog,Accesslog,..etc

Thanks
Srinivasan

Reply
Atul Kumar says March 28, 2011

@ Srinivasan,
I don’t think you can change log location during installation however you can change it after installation using WLST or weblogic console.

Reply
tanaji says September 12, 2011

oracle connectivity

Reply
Add Your Reply