-
1. Re: Setting up XA datasource with oranxo driver and RAC
vickyk Nov 12, 2008 2:45 PM (in response to jplater)Can you try setting URL property?
<xa-datasource-property name="URL">jdbc:oracle:oci8:@tc</xa-datasource-property>
And in the URL you can set what is explained in the docs for connection-url<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>
Judging by the oranxo documentation it looks like I should do something like:
Where is the oranxo documentation available, pass the link over here? -
2. Re: Setting up XA datasource with oranxo driver and RAC
jplater Nov 12, 2008 2:51 PM (in response to jplater)I tried that the other day but oranxo doesn't support the URL property. Here is the link to the oranxo documentation.
http://www.inetsoftware.de/products/jdbc/oracle/manual.asp -
3. Re: Setting up XA datasource with oranxo driver and RAC
vickyk Nov 12, 2008 3:18 PM (in response to jplater)Well host2 property will not work as setHost2 is not here
http://www.inetsoftware.de/products/jdbc/oracle/doc/com/inet/ora/OraDataSource.html
Try setting
<xa-datasource-property name="Properties">host1=host1name,port1=port1val,host2=host2name,port2=port2val</xa-datasource-property>
http://www.inetsoftware.de/products/jdbc/oracle/doc/com/inet/ora/XDataSource.html
If this does not work attach your complete -ds,xml, I will have a look at it later.
Have you asked the help from the driver vendor? -
4. Re: Setting up XA datasource with oranxo driver and RAC
jplater Nov 13, 2008 3:11 PM (in response to jplater)I found a way to get this working. Since oranxo doesn't have an api for setting host2 and port2, I added a wrapper class that exposed setHost2() and setPort2(). These methods just called setProperty("host2", ) and setProperty("port2", ) . Then I setup my ds file like the one I listed above and added <xa-datasource-class> which I set to my wrapper class. Thanks for your help.
<?xml version="1.0"?> <datasources> <xa-datasource> <jndi-name>JNDI_NAME</jndi-name> ... <xa-datasource-class>WRAPPER_CLASS</xa-datasource-class> <xa-datasource-property name="User">USERNAME</xa-datasource-property> <xa-datasource-property name="Password">PASSWORD</xa-datasource-property> <xa-datasource-property name="Host">HOST</xa-datasource-property> <xa-datasource-property name="Port">PORT</xa-datasource-property> <xa-datasource-property name="Service">SERVICENAME</xa-datasource-property> <xa-datasource-property name="Failover">True</xa-datasource-property> <xa-datasource-property name="Host1">HOST1</xa-datasource-property> <xa-datasource-property name="Port1">PORT1</xa-datasource-property> <xa-datasource-property name="Host2">HOST2</xa-datasource-property> <xa-datasource-property name="Port2">PORT2</xa-datasource-property> ... </xa-datasource> </datasources>
-
5. Re: Setting up XA datasource with oranxo driver and RAC
vickyk Nov 13, 2008 3:16 PM (in response to jplater)I think setting properties is easy that having a wrapper, btw did you tried to setting the properties also?
-
6. Re: Setting up XA datasource with oranxo driver and RAC
jplater Nov 14, 2008 11:35 AM (in response to jplater)I did try setting properties. It didn't work, it resulted in host1 being set to 'host1name,port1=port1val,host2=host2name,port2=port2'. I looked at the jboss source code and determined that there wasn't a way to set host2 and port2 without creating a wrapper class.