This content has been marked as final.
Show 8 replies
-
1. Re: Oracle Failover connection url
born_free_77 Oct 13, 2009 8:23 PM (in response to born_free_77)I do have
<url-property>URL</url-property> <url-delimeter>|</url-delimeter>
-
2. Re: Oracle Failover connection url
born_free_77 Oct 13, 2009 8:32 PM (in response to born_free_77)Just want to add that I do have
url-delimiter correctly defined in ds file -
3. Re: Oracle Failover connection url
born_free_77 Oct 13, 2009 9:45 PM (in response to born_free_77)I was able to start the jboss up and running and I was able to navigate the app also. Now if I bring down the node 1 of oracle rac the failover to next node (as mentioned in connection url) does not happens and jboss throws lots of exception.
Now I bring the node 1 backup again and app seems to work fine. Looks like fail over is not working. -
4. Re: Oracle Failover connection url
vickyk Oct 14, 2009 6:03 AM (in response to born_free_77)"born_free_77" wrote:
Any idea what I am missing, Does any one has sample ds files?
Check this
http://anonsvn.jboss.org/repos/jbossas/branches/JBPAPP_4_2/testsuite/src/resources/jca/ha/test-ha-ds.xml
http://anonsvn.jboss.org/repos/jbossas/branches/JBPAPP_4_2/testsuite/src/resources/jca/ha/test-ha-xa-ds.xml
Also using oracle RAC and configuring ha-datasource should be done exclusively, I have not seen people combining it but it looks possible.
Anyway the right connection-url for oracle-RAC should be like this<connection-url>jdbc:oracle:thin:@(description=(address_list=(load_balance=on)(failover=on)(address=(protocol=tcp)(host=xxxxhost1)(port=1521))(address=(protocol=tcp)(host=xxxxhost2)(port=1521)))(connect_data=(service_name=xxxxsid)(failover_mode=(type=select)(method=basic))))</connection-url>
You can find more details here
http://www.jboss.org/community/wiki/SetupAOracleDataSource -
5. Re: Oracle Failover connection url
born_free_77 Oct 14, 2009 8:01 AM (in response to born_free_77)Hey Vickyk,
Thanks for the response. I am using the same xml files and I did see the test-ha-ds.xml files.
Initially I was using <connection-url> like this<connection-url>jdbc:oracle:thin@xxxxx:1521@sid|jdbc:oracle:thin@xxxxx:1521@sid</connection-url>
if I use<connection-url>jdbc:oracle:thin:@(description=(address_list=(load_balance=on)(failover=on)(address=(protocol=tcp)(h ost=xxxxhost1)(port=1521))(address=(protocol=tcp)(host=xxxxhost2)(port=1521)))(connect_data=(service _name=xxxxsid)(failover_mode=(type=select)(method=basic))))</connection-url>
then jboss complains that url-delimiter is not povided. I did use the same url when using </local-tx-datasource> but this still does not gives me failover.
Whats the difference between <local-tx-datasource> and <ha-local-tx-datasource>? -
6. Re: Oracle Failover connection url
vickyk Oct 14, 2009 9:20 AM (in response to born_free_77)"born_free_77" wrote:
if I use<connection-url>jdbc:oracle:thin:@(description=(address_list=(load_balance=on)(failover=on)(address=(protocol=tcp)(h ost=xxxxhost1)(port=1521))(address=(protocol=tcp)(host=xxxxhost2)(port=1521)))(connect_data=(service _name=xxxxsid)(failover_mode=(type=select)(method=basic))))</connection-url>
then jboss complains that url-delimiter is not povided. I did use the same url when using </local-tx-datasource> but this still does not gives me failover.
You have not defined the delimiter and if you using this in ha datasource type configuration things will not move as the configuration is wrong.
Just use non ha datasource and with this url, that is the way to go and it seems to be working for you.
Whats the difference between <local-tx-datasource> and <ha-local-tx-datasource>?
Read this
http://docs.jboss.org/jbossas/jboss4guide/r5/html/ch7.chapt.html -
7. Re: Oracle Failover connection url
born_free_77 Oct 14, 2009 9:25 AM (in response to born_free_77)Let me try this again
<connection-url>jdbc:oracle:thin:@(description=(address_list=(load_balance=on)(failover=on)(address=(protocol=tcp)(h ost=xxxxhost1)(port=1521))(address=(protocol=tcp)(host=xxxxhost2)(port=1521)))(connect_data=(service _name=xxxxsid)(failover_mode=(type=select)(method=basic))))</connection-url>
Also if I want to use HA config what would be the url
I did try this in HA<connection-url>jdbc:oracle:thin:@db1:1521:db1|jdbc:oracle:thin:@db2:1521:db2</connection-url>
and it worked for me -
8. Re: Oracle Failover connection url
born_free_77 Oct 15, 2009 8:45 PM (in response to born_free_77)Tried with non HA config and its working. Will do some more test.