Home > clusterware > Setup a JDBC Thin Application to test Fast Connection Failover

Setup a JDBC Thin Application to test Fast Connection Failover

December 17, 2009 Leave a comment Go to comments

1. Software Requirments

  • java 1.5 or above
  • ojdbc14.jar and ons.jar
  • FCFExample.zip (From ID 433827.1 on metalink)

2. Hardware Configuration

  • Two Linux Server form RAC cluster nodes: vmrac1,vmrac2
  • A window XP machine acts as testing machine

Configuration on Testing Server 

3. Install the java binary on the XP machine.

D:\jdk1.5.0_07

4. Unzip FCFExample.zip to D:\FCF

5. Edit the fcfcache.properties as the following

# properties required for test
username=scott
password=tiger
InitialLimit=10
MinLimit=10
MaxLimit=20
onsconfig=nodes=vmrac1-vip:6200,vmrac2-vip:6200 <– ONS configuration on the RAC cluster
url=jdbc:oracle:thin:@(DESCRIPTION= \
    (LOAD_BALANCE=yes) \
       (ADDRESS=(PROTOCOL=TCP)(HOST=vmrac1-vip)(PORT=1521)) \ <— Cluster Node1 VIP
       (ADDRESS=(PROTOCOL=TCP)(HOST=vmrac2-vip)(PORT=1521)) \<— Cluster Node2 VIP 
       (CONNECT_DATA=(service_name=vstbdev)))

6. Put ojdbc14.jar and ons.jar onto D:\FCF

7. Compile the  FCFConnectionCacheExample.java

set CLASSPATH=ojdbc14.jar;ons.jar;. <-- Set the CLASSPATH
javac -cp %CLASSPATH% FCFConnectionCacheExample.java <-- Compile the source
 
 
 

Check ONS Configuration on Cluster Servers

8. Check ONS ports

[oracle@vmrac2 ~]$ $CRS_HOME/bin/onsctl ping
Number of onsconfiguration retrieved, numcfg = 2
onscfg[0]
   {node = vmrac1, port = 6200}
Adding remote host vmrac1:6200 <– ONS listening port on Cluster Node 1
onscfg[1]
   {node = vmrac2, port = 6200}
Setting remote port from OCR repository to 6200
Adding remote host vmrac2:6200<– ONS listening port on Cluster Node 2

ons is running … <– It is runing

9. Run the FCFConnectionCacheExample

D:\jdk1.5.0_07\bin\java -cp %CLASSPATH% FCFConnectionCacheExample.

Advertisements
Categories: clusterware
  1. July 28, 2013 at 11:41 am

    I also believe that mesothelioma is a unusual form of cancer
    malignancy that is normally found in individuals previously
    familiar with asbestos. Cancerous tissues form in the mesothelium, which is a protecting lining that covers
    most of the body’s bodily organs. These cells usually form inside the lining with the lungs, mid-section, or the sac that encircles one’s heart.
    Thanks for revealing your ideas.

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: