[jboss-user] [IronJacamar] - Re: xa-datasource is not registered correctly

Gytis Trikleris do-not-reply at jboss.com
Mon Mar 18 13:25:07 EDT 2013


Gytis Trikleris [https://community.jboss.org/people/gytis] created the discussion

"Re: xa-datasource is not registered correctly"

To view the discussion, visit: https://community.jboss.org/message/803309#803309

--------------------------------------------------------------
I did some debugging and there seems to be a problem in the xa-datasource parsing... XAManagedConnectionFactory.setXADataSourceProperties method (see:  http://tinyurl.com/d45bvlz 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
[https://community.jboss.org/message/803309#803309]

Start a new discussion in IronJacamar at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2098]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20130318/4667daa3/attachment.html 


More information about the jboss-user mailing list