title: Oracle FCF OSN Client Side Configuration
body: <p>Good time!</p>
  
  <p>First of all, here is my environment:</p>
  
  <ul>
  <li>Java 1.7</li>
  <li>Tomcat 7</li>
  <li>Oracle UCP connection pool</li>
  <li><strong>Thin JDBC driver</strong></li>
  <li>Oracle 10g database with RAC and SCAN (<a href="http://dnccfg.blogspot.de/2012/09/single-client-access-name-scan-in.html" rel="nofollow">some information</a>)</li>
  </ul>
  
  <p>I need to configure the Oracle FCF feature. There are several articles about it's configuration: <a href="http://docs.spring.io/spring-data/data-jdbc/docs/current/reference/html/orcl.failover.html" rel="nofollow">Spring documentation (1)</a>, <a href="http://www.idevelopment.info/data/Programming/java/jdbc/High_Availability/FastConnectionFailoverExampleThin.java" rel="nofollow">complete example (2)</a>, ...</p>
  
  <p>I've performed all the steps described in the article (1) and I've also configured a UCP logging where I can see that FCF is actually enabled.</p>
  
  <p>What is confusing for me is the following statement fro the second article:</p>
  
  <pre><code>FAST CONNECTION FAILOVER PREREQUISITES
  ...
  
   5.) The JVM in which your JDBC instance is running must have
   * oracle.ons.oraclehome set to point to your ORACLE_HOME. For example:
   * 
   * -Doracle.ons.oraclehome=C:\oracle\product\10.2.0\db_1
  
  ...
  </code></pre>
  
  <p><strong>Question:</strong></p>
  
  <p>My Oracle database (RAC) is located at a remote server and I use a thin JDBC driver, thus what should I do here (Do I really need to set uop this parameter, and, if yes, than how)? There is no point in the first article about configuring such a JVM parameter, it is only said that I need to set up the 'ONSConfiguration' parameter of a datasource where I should list all the RAC nodes... </p>
  
  <p><strong>UPDATE 1:</strong></p>
  
  <p>Also from the second article:</p>
  
  <pre><code>CLIENT-SIDE ONS CONFIGURATION
  ...
  (2) ONS daemon on the client side
  Example ons.config file for a client:
  ...
  </code></pre>
  
  <p>At the beginning of this article it is said that the 'client-side' is a java-based application, while the 'server-side' is a database (RAC). It is really required to creare the 'ons.config' file on a java-based-application-side in case of using a thin JDBC driver?</p>
  
  <p><strong>UDPADE 2</strong>:
  From the <a href="http://docs.oracle.com/cd/E11882_01/java.112/e12265/rac.htm#JJUCP08100" rel="nofollow">Oracle documentation</a>:</p>
  
  <pre><code>Remote Configuration
  
  UCP for JDBC supports remote configuration of ONS through the SetONSConfiguration pool property.    The ONS property value is a string that closely resembles the content of an ons.config file. The string contains a list of name=value pairs separated by a new line character (\n). The name can be: nodes, walletfile, or walletpassword. The parameter string should at least specify the ONS configuration nodes attribute as a list of host:port pairs separated by a comma. SSL would be used when the walletfile attribute is specified as an Oracle wallet file.
  
  Applications that use remote configuration must set the oracle.ons.oraclehome system property to the location of ORACLE_HOME before starting the application. For example: java -Doracle.ons.oraclehome=$ORACLE_HOME ...
  </code></pre>
  
  <p>But how can I set the ORACLE_HOME variable when I have no local installation of Oracle database, that is what the thin driver is about, right?</p>