首先,這裏是我的環境:
- 的Java 1.7
- 的Tomcat 7
- 甲骨文UCP連接池
- 瘦JDBC驅動程序
- 的Oracle 10g數據庫RAC和SCAN(some information)
我需要配置Oracle FCF功能。有幾篇文章關於它的配置:Spring documentation (1),complete example (2) ...
我執行的文章(1)中描述的所有步驟,並且我也配置了UCP記錄在那裏我可以看到,FCF實際上是啓用。
什麼是混淆對我來說是下面的語句來回回的第二篇文章:
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
...
問:
我的Oracle數據庫(RAC)位於遠程服務器,我用一個薄JDBC驅動程序,因此我應該在這裏做什麼(我真的需要設置這個參數,如果是的話,比如何)?在第一篇文章中沒有關於配置這樣一個JVM參數的意見,只是說我需要設置一個數據源的'ONSConfiguration'參數,我應該列出所有的RAC節點...
UPDATE 1:
從第二物品另外:
CLIENT-SIDE ONS CONFIGURATION
...
(2) ONS daemon on the client side
Example ons.config file for a client:
...
在本文的開頭據說「客戶端」是基於Java的應用程序,而「服務器端」是一個數據庫(RAC)。在使用瘦JDBC驅動程序的情況下,真的需要在基於Java的應用程序端創建'ons.config'文件?
UDPADE 2: 從Oracle documentation:
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 ...
但我怎麼能設置ORACLE_HOME變量時,我有Oracle數據庫中沒有本地安裝,這是Thin驅動程序是什麼,對吧?
非常感謝! – Dmitry 2015-01-14 10:41:11