In the previous chapters, we've seen WebLogic 12c's Java EE 6 readiness, we've seen how and what tools we can use to deploy our applications on WebLogic 12c, but now we have to dive into WebLogic Server itself to discover the exciting features it has in it.
At server side, WebLogic serves you a lot of interfaces to process the data. We will discuss them in this chapter, but also which new features a typical administrator should know before starting to use or upgrade to WebLogic 12c.
JDBC services have been enhanced significantly, with focus on availability and load balancing. We will dive into the new features supported in this release.
Already available since version 10.3.4, a new feature for connection to RAC databases is Active GridLink for RAC. As you might know, RAC stands for Real Application Clusters and is a high-availability solution for Oracle databases. The database provides high availability in a cluster of RAC instances. Active GridLink for RAC and use of GridLink data sources are also available in this version as part of WebLogic Suite. This feature uses Oracle Notification Service (ONS) to detect states and changes of an Oracle RAC instance. This makes GridLink very scalable because the number of services in the cluster can be dynamically increased.
The following screenshot shows how to test a GridLink Datasource:
Already in WebLogic 9.2, RAC was supported with Oracle 9i RAC, but was called a Multi Datasource configuration and didn't include all the features of Oracle RAC service configurations, you will need to create a separate multidata source for each defined service. The configuration is pretty static and needs manual intervention for adding or removing new Datasources.
When creating a GridLink Datasource, you'll see the FAN enabled checkbox and a place to enter the ONS details. FAN is Fast Application Notification, which acts on certain application events in the database which will be used to balance the load. If FAN is not enabled, the default Round-Robin algorithm will be used.
This is enabled by default and the UI makes sure you enter at least one ONS server (of course, as FAN is not going to work otherwise). You'll also notice the wallet parameters which allow the ONS messages to be sent over SSL — usually recommended in production. A wallet is used for storing SSL Certificates.
This release includes the following new and changed features:
MinCapacity
attribute sets the minimum number of physical connections that a connection pool can contain after it's initialized. The initial capacity that previously handled both the initial and minimum capacity for the pool has been split into two attributes:MinCapacity
defaults to InitialCapacity
if not set; InitialCapacity
continues to default to 1
.MinCapacity
is only used for shrinking calculations. If you don't set MinCapacity, InitialCapacity
is used.You can specify this with an exception code within a SQLException
(by sqlException.getErrorCode()
), which indicates that a fatal error has occurred and the connection is no longer healthy and is to be removed from the connection pool. For Oracle databases, the following fatal error codes are already available within WLS and you don't have to configure them:
You can see where to set your data source logging profile in the following screenshot:
Oracle BI Server Support: Just select Oracle BI Server as Database Type when creating a new generic data source to interoperate with the Oracle BI Server.
KeepConnAfterGlobalTx
in JDBCXAParamsBean
. AffEnabled
attribute to determine if RAC affinity is enabled for an RAC cluster. The first connection request is load balanced using Runtime Connection Load-Balancing (RCLB) and is assigned an Affinity context. All the next connection requests will be transferred to the same Oracle RAC instance using the Affinity context of the first connection until the session ends or the transaction completes. oracle.ucp.jdbc.LabelableConnection
interface is used to apply and remove connection labels, as well as retrieve labels that have been set on a connection. The oracle.ucp.ConnectionLabelingCallback
interface will act when a labeled connection is requested but there are no connections in the pool that matche already existing labeled connections.weblogic.jdbc.rac.DebugJDBCUCP
— low-level UCP debugging. This includes both required and optional callback interfaces that are used to implement connection pool features, like the ConnectionAffinityCallback
interface. This is used to create a callback that enables or disables connection affinity and can also be used to customize connection affinity behavior. You can set UCP debugging directly using:oracle.ucp.level = FINEST; oracle.ucp.jdbc.PoolDataSource = WARNING;
weblogic.jdbc.rac.DebugJDBCREPLAY
— REPLAY debugging.weblogic.jdbc.transaction.DebugJTAJDBC
— transaction debugging. To get this level of tracing for Oracle, you need to use ojdbc6_g.jar
instead of ojdbc6.jar
.weblogic.jdbc.rac.DebugJDBCONS
— low-level ONS debugging. A GridLink data source provides connectivity between WebLogic Server and an Oracle Database service, which may include multiple Oracle RAC clusters. It uses the Oracle Notification Service (ONS) to adaptively respond to state changes in an Oracle RAC instance, so with this sort of debugging you can identify problems with the ONS Client.weblogic.jdbc.rac.DebugJDBCRAC
— RAC debugging.3.145.39.60