I got asked the other day a question about how well WebSphere Application Server works with the Oracle database. Specifically, i got asked if WebSphere Application Server works with things like Oracle Real Application Cluster (RAC), Fast Connection Failover (FCF), Oracle Notification Service (ONS), Single Client Access Name (SCAN). The short answer is “yes” to all of them. The long answer is:
Oracle Real Application Cluster (RAC):
RAC is the Oracle database cluster solution as the name states. RAC is supported by WebSphere Application Server and has been for a long time. RAC is supported both in a failover mode (active passive) and in a loadbalancing mode (i.e. active active). There were some limitations that existed in Oracle 10g and earlier that would have prevented a seamless failover in some two-phase commit scenarios, but as far as i know, Oracle 11g resolved them. For more details on that limitation and how to workaround them in WebSphere Application Server, take a look at this article: http://www.ibm.com/developerworks/websphere/techjournal/0710_barghouthi/0710_barghouthi.html
FCF and ONS:
I am going to assume the reader is aware of what those features do and I am not going to explain them. What I am going to explain, however, is that WebSphere Application Sever does offer “Fast Connection Failover” equivalent capability and has been for a very very long time. There are two main cases that Fast Connection Failover and ONS are great for:
1) Down scenario. Meaning one of the Oracle cluster members (i.e. nodes) go down.
2) Up scenario: meaning the down Oracle cluster member comes back up.
In the down case and the connection is detected to be stale (say an exception is received on a query execution which Websphere determine its a bad connection error), the application server will purge its connection pool (assuming default connection pool pure policy of entire pool) and will get fresh new connections on the next connection request. That will result in connections getting directed to the working Oracle node and none going to the down Oracle node. Please note that in WebSphere Application Server V6.1 and above, if the connection pool purge policy is set to “failing connections only”, the WebSphere Application Sever will automatically pretest the existing connections in the pool to see if they are stale in the event that a stale connection is detected. This is a one time test and thus, will not be done on newly created connections.
In the up event case, connections in the connection pools need to be re-balanced to point to the other Oracle nodes. In WebSphere Application Server, there are two ways of doing that. I talked about this in the following technote: http://www-01.ibm.com/support/docview.wss?rs=180&uid=swg21229847
That said, there are situations where the above solutions may not be good enough. For example, the application can’t wait for a connection to be used and receive an exception that the database is down before WAS is notified. Or, the database node goes down in a way that for the connection to receive an exception on its usage, the TCP/IP timeout has to occur which might be set to a long time. In those cases, and assuming the Oracle LoginTimeout is not desirable, one can enable Oracle Notification Service feature (ONS). You can configure WebSphere Application Server (WAS) to use ONS by configuring enabling WAS to use Oracle connection pooling instead of WAS’s own connection pooling. To do that, follow the instructions in the following technotes:
1) Enabling the old Oracle connection pool (implicit pool): http://www-01.ibm.com/support/docview.wss?rs=180&uid=swg21282204 (applies to all releases of WebSphere)
2) Enabling the new Oracle Universal Connection Pool (UCP): http://www-01.ibm.com/support/docview.wss?uid=swg21498877 (need WebSphere V8.0 or above)
ONS can then be configured using the Oracle documentation by simply setting the ONS properties on datasource and the UCP or Oracle connection pool.
Single Client Access Name (SCAN)
This feature is independent of the application server and doesn’t need any changes in the WebSphere Application Server for it to work. You can read more about it here: http://www.oracle.com/technetwork/products/clustering/overview/scan-129069.pdf