I don't think there would be such functionality out of box. Sounds like you can setup an external process to monitor the status and then submit management commands to reconfigure the datasource and reload. Or maybe you can implement this using the clustering API (see https://github.com/wildfly/wildfly/blob/10.0.0.Final/clustering/api/src/main/java/org/wildfly/clustering/dispatcher/CommandDispatcher.java) to figure out what the datasource setting should be and react to it.
Which database do you use? Couldn't you utilize some HA solution of your DB? For example PostgreSQL:
I shall have a look at the API.
I am using Postgresql 9.4, but the 2ndQuadrant BDR extension (MultiMaster Replication)
For some reason I am being restricted from implementing an external HA Load Balancer (or Virtual IP as this is on a LInux Box), and was tasked to find a solution to this.