3 Replies Latest reply on Nov 17, 2011 11:06 AM by maeste

    problems with xa datasource

    morphy

      Hi people,

       

      i'm trying to configure a mysql xa datasource using jb 7.1.0-alpha2-snapshot (last succesfull build) in a domain configuration

       

      this is the configuration

       

       

                         <xa-datasource jndi-name="java:jboss/datasources/dragonDS" pool-name="DragonDSPool" enabled="true">
                              <xa-datasource-property name="ServerName">
                                  localhost
                              </xa-datasource-property>
                              <xa-datasource-property name="DatabaseName">
                                  drgmgrnew01
                              </xa-datasource-property>
                              <xa-datasource-property name="User">
                                  drgmgrnew01
                              </xa-datasource-property>
                              <xa-datasource-property name="Password">
                                  drgmgrnew01
                              </xa-datasource-property>
                              <xa-datasource-class>
                                  com.mysql.jdbc.jdbc2.optional.MysqlXADataSource
                              </xa-datasource-class>
                              <driver>
                                  com.mysql
                              </driver>
                              <transaction-isolation>
                                  TRANSACTION_READ_COMMITTED
                              </transaction-isolation>
                              <xa-pool>
                                  <min-pool-size>
                                      10
                                  </min-pool-size>
                                  <max-pool-size>
                                      50
                                  </max-pool-size>
                                  <prefill>
                                      true
                                  </prefill>
                                  <pad-xid>
                                      true
                                  </pad-xid>
                              </xa-pool>
                              <security>
                                  <user-name>
                                      drgmgrnew01
                                  </user-name>
                                  <password>
                                      drgmgrnew01
                                  </password>
                              </security>
                          </xa-datasource>
      
      

       

      but i get the following error:

       

       

      [Server:dragonManager] Caused by: java.net.UnknownHostException: {"value" => "localhost"}
      [Server:dragonManager]  at java.net.Inet4AddressImpl.lookupAllHostAddr(Native Method) [:1.6.0_27]
      [Server:dragonManager]  at java.net.InetAddress$1.lookupAllHostAddr(InetAddress.java:849) [:1.6.0_27]
      [Server:dragonManager]  at java.net.InetAddress.getAddressFromNameService(InetAddress.java:1202) [:1.6.0_27]
      [Server:dragonManager]  at java.net.InetAddress.getAllByName0(InetAddress.java:1153) [:1.6.0_27]
      [Server:dragonManager]  at java.net.InetAddress.getAllByName(InetAddress.java:1083) [:1.6.0_27]
      [Server:dragonManager]  at java.net.InetAddress.getAllByName(InetAddress.java:1019) [:1.6.0_27]
      [Server:dragonManager]  at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:244)
      [Server:dragonManager]  at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:295)
      [Server:dragonManager]  ... 41 more
      
      

       

      the xa URL property instead rises a NullPointer -_-

       

      if i change the connection to non-xa everything works properly.... jdbc driver is 5.1.15

       

      any idea? my fear is that jb  passes to jdbc the entire string {"value" => "localhost"} instead of localhost

       

      thank you in advance

      bye

       

      Riccardo