Re: Creating XA Datasource in JBoss 7.1.1 for MySQL Cluster : Connection Read Only Error
Posted by: Todd Farmer
Date: December 17, 2013 09:16AM

Hi Manjunatha,

The JDBC URL you provided indicates you are not using load-balancing (multi-master) support, actually. What you are using is failover, where connections are pegged to the first host, unless it is in a failure state, in which case connections are routed temporarily (until first host recovery is noticed) to the remaining hosts. To fix this, you'll probably want to use a JDBC URL starting with: "jdbc:mysql:loadbalance://...". For more tips on properly configuring a load-balanced deployment, you may want to reference these blog posts:

One interesting point to make is that XA transactions will almost certainly be problematic with load-balanced deployments. The load-balancing support hooks into Connection.commit() - e.g., for non-XA transactions - and you may find that load-balancing doesn't work when XA transactions are employed.

I was going to open a bug report regarding the ClassCastException, but it seems like there are already several open (and that you've already found them):

Hope that helps!

Todd Farmer
MySQL @ Oracle

Options: ReplyQuote

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.