JBoss Community

Re: xa-datasource is not registered correctly

created by Gytis Trikleris in IronJacamar - View the full discussion

I did some debugging and there seems to be a problem in the xa-datasource parsing... XAManagedConnectionFactory.setXADataSourceProperties method (see: http://tinyurl.com/d45bvlz) takes data source properties as a semicolon separated string like this:


DatabaseName=IronJacamarTryout;User=postgres;ServerName=127.0.0.1;PortNumber=5432;Password=postgres;

 

 

However, Properties.load method used in XAManagedConnectionFactory.setXADataSourceProperties requires properties to be separated by a new line character (e.g. “\n”). Therefore, above string is loaded as one property instead of five.

 

I've modified XAManagedConnectionFactory locally and added following line at the beginning of setXADataSourceProperties method and it solved my problem:


xaDataSourceProperties = xaDataSourceProperties.replaceAll(";", "\n");

 

Reply to this message by going to Community

Start a new discussion in IronJacamar at Community