"REAL HIGH AVAILABILITY" - Java with RAC and OCI
Thinking about really securing your application, even to stay alive, when the DB-Server goes down? - Then give our RAC (Real Application Cluster) a try!
Yesterday, at one of my ct's, we connected a J2EE Application (built upon our BC4J framework) on iAS903 to ct's RAC for enabling the failover mechanism Oracle's RAC provides, and securing their application against downtimes.
So what to do, to use this feature too? (besides having a running RAC :-) )
The only configuration thing, that has to be done, consists of changing the connection String (in the application, or Datasource) to use OCI and use an existing TNS-Entry from TNSNAMES.ora - that is properly configured to do the failover .. (so when doing this on iAS, the shipped version is enough to be used!)
In the application:
jdbc:oracle:oci:@<yourName>
In TNSNAMES.ora of the used OracleClient:
#Configure a single clusterwide service with
# load-balance, failover and TAF enabled.
<yourName> =
(DESCRIPTION =
(ADDRESS_LIST =
(LOAD_BALANCE = yes)
(FAILOVER = on)
(ADDRESS = (PROTOCOL = TCP)(HOST = <your host for instance1>)(PORT = <yourPort>))
(ADDRESS = (PROTOCOL = TCP)(HOST = <your host for instance2>)(PORT = <yourPort>))
)
(CONNECT_DATA =
(SERVICE_NAME = <your service name>)
(FAILOVER_MODE = (TYPE = SELECT)(METHOD = BASIC)(RETRIES = 20)(DELAY = 20))
)
)
Without any (code) modifications to the application, we tested failover, and it worked perfectly, nearly no time, the Cluster Manager needed, to relink the existing DBConnection to the other running node. Just saying great ! :)
Having questions? Feedback me on this entry Clemens Utschig
0 Comments:
Post a Comment
<< Home