Clustering and JDBC Connections
WebLogic Server supports clustered JDBC, which means that some of the JDBC objects are aware of the cluster and will behave differently in a cluster. For instance, a connection pool is not cluster-aware. Assigning a connection pool to a cluster is equivalent to assigning it individually to each server in the cluster, and thus, there is no change in its behavior. A data source, on the other hand, is cluster-aware. If you assign a data source to a cluster, it behaves differently from a data source that is targeted to each member of the cluster individually. In this case, it can distribute connection requests across all copies of the pool assigned to the different members of the cluster. A data source internally uses WebLogic’s RMI Driver to obtain a connection from the pool. The RMI Driver then directs the connection request to a pool on one of the clustered servers. The client is then “pinned” to that server for the duration of the database transaction, and until the connection is released.
Now, if we consider a data source that is targeted to a cluster, and each Managed Server in the cluster has a JDBC pool associated with the data source, WebLogic ensures the JDBC requests to the data source are handled uniformly by all members of the cluster. When an external client requests a connection from a data source assigned to the cluster, it obtains a replica-aware stub for the data source. The replica-aware stub maintains a list of all active servers ...
Get WebLogic: The Definitive Guide now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.