Chapter 4. Integrated and External Services

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

JDBC services have been enhanced significantly, with focus on availability and load balancing. We will dive into the new features supported in this release.

Active GridLink and RAC integration

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:

Active GridLink and RAC integration

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.

Fan enabling

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.

Fan enabling

New JDBC features for WebLogic 12c

This release includes the following new and changed features:

  • The Capacity Increment Attribute: WebLogic first uses the existing connections available in the pool when a connection request is issued. If there is no match, this parameter takes care of creating a new one.
  • The MinCapacity Attribute: The 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.
  • Define Fatal Error Codes: To indicate that the backend database is unavailable or unreachable on a connection, you can work with fatal error. The connection will be marked as invalid and taken out of the pool. The errors may include deployment errors that cause a server boot to fail, and connection errors.

    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:

    • 3113 — end-of-file on communication channel
    • 3114 — not connected to Oracle
    • 1033 — Oracle initialization or shutdown in progress
    • 1034 — Oracle not available
    • 1089 — immediate shutdown in progress - no operations are permitted
    • 1090 — shutdown in progress - connection is not permitted
    • 17002 — I/O exception
  • Data Source Profile Logging: In previous versions, data source events were recorded as WLDF events. For better usability and performance, WebLogic Server now uses a data source profile log to store events. The profile log has log-rotation — the ability to configure, rotate, and retire old data.

    You can see where to set your data source logging profile in the following screenshot:

    New JDBC features for WebLogic 12c
  • Application-Scoped Drivers: It is now possible to include a database driver in the EAR/WAR file that contains an application-scoped data source. You do not have to update the classpath of the manifest file to include the driver location.

    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.

    New JDBC features for WebLogic 12c
  • Keep Connection After Global Transaction: This new feature enables WebLogic Server to keep a physical connection associated with a logical connection when committing or rolling back a global transaction. Defined as KeepConnAfterGlobalTx in JDBCXAParamsBean.
  • Session Affinity Policy: Web applications where a user session has back-to-back OLTP should have better performance. In some cases, repeated operations against the same data sets are being processed at the same RAC instance. A GridLink data source uses the session affinity policy to improve performance by directing the database operations of a servlet session to the same RAC instance in an RAC cluster. A GridLink data source monitors RAC load balancing advisories (LBAs) using the 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.
  • Connection Labeling: Applications often initialize or re-initialize a connection, but with Connection Labeling, an application requests a connection with the desired label from the connection pool. By associating particular labels with particular connection states, an application can retrieve an already initialized connection from the pool without re-initialization. The 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.
  • New Debug Scopes: Some new debug options are available like:
    • 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.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.145.39.60