This would require that you be able to set two connection URLs for a single datasource, and mark one to be used for reads and the other for updates. Such a thing is not possible at this time. The only option is to define two different data sources, configuring one to open the database in read-only mode if the database supports such a thing, and have your code select the data source it wants based on its needs.
The datasources are used for persistence, so the workaround that I did was similar to the post i mentioned.
1 - mysql: grant select only on RO nodes, and insert / update / etc on RW nodes
2 - create 2 datasources, to ro and rw nodes
3 - create 2 persistence units, each one using a different datasource
4 - set persistencecontext / unit in the bean. implement all database writes in a different bean, using the rw persistence unit.