Thursday, August 8, 2013

Weblogic Datasources

There are 3 types of data sources in 10.3.5
  •  Generic data source
  •  Grid Link datasource
  •  Mutli datasource
Datasource: contains pool of database connections that are created when datasource instance is created i.e.
A JDBC data source is an object bound to the JNDI tree that provides database connectivity through a pool of JDBC connections. Applications can look up a data source on the JNDI tree and then borrow a database connection from a data source.

  •  When it is deployed or targeted
  •  Server start-up
Multi Datasource: Abstraction around data source to provide load balancing or failover for datasource which are part of Multi Datasource
We can create the datasource as follows
  •  By Admin Console
  •  By WLST Script
  • 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.

<jdbc-system-resource>
    <name>JDBC Data Source-test</name>
    <target>weblogiccluster</target>
    <descriptor-file-name>jdbc/JDBC_Data_Source-test-0556-jdbc.xml</descriptor-file-name>
  </jdbc-system-resource>

Note:If we create the data source  related xml file will be created in conf/jdbc folder .Xml file contains the all information like connection pools,username, passwords and targets .... etc.


Grid Link datasource
A single GridLink data source provides connectivity between WebLogic Server and an Oracle Database service targeted to an Oracle RAC cluster. It uses the Oracle Notification Service (ONS) to adaptively respond to state changes in an Oracle RAC instance
A GridLink data source includes the features of generic data sources plus the following support for Oracle RAC:

  •  "Fast Connection Failover"
  • "Runtime Connection Load Balancing"
  •  "Graceful Handling for Oracle RAC Outages"
  •  "XA Affinity"
  • "SCAN Addresses"
  • "Secure Communication using Oracle Wallet."

19 comments:

  1. doesn't the Multi Data Source support transaction (XA) affinity as well?
    and would the MDS not support adding and removing RAC instances w/o restart?
    would the application notice any RAC failover w/ MDS?
    doesn't the MDS poll and test where the GridLink DS is notified?
    wouldn't you need a WebLogic Suite or ExaLogic Elastic Cloud license to use Active GridLink for RAC?

    ReplyDelete
  2. Can we use Grid Link active DS for Oracle Data Guard env. We have the DG oracle 12c and we wanted to achieve fail over in terms for DS. here in Oracle DG we have 2 node and at a time only one node is active and another node is getting syn using log from primary node.

    my jdbc URL will be like below: dsURL=jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS_LIST=(LOAD_BALANCE=off)(FAILOVER=on)(ADDRESS=(PROTOCOL=TCP)(HOST=10.0.0.145)(PORT=1521))(ADDRESS=(PROTOCOL=TCP)(HOST=10.0.0.140)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=PDB)))


    Here we have 2 host name.. its means we have mention Primary and standby node host in URL for failover.

    Please check the same and share the suggestion and details if any.

    Thanks you so much for blogs and details.


    Regards,
    Raj Gupta

    ReplyDelete
  3. Sorry to say but content is simply copied from other sources....not clear explanation

    ReplyDelete