it is clear in the title, I would be great if you share your experience about it.
I tried that but didn't work..
...
<xa-datasource>
<jndi-name>DSReadOnly</jndi-name>
<xa-datasource-class>com.mysql.jdbc.jdbc2.optional.MysqlXADataSource</xa-datasource-class>
.
..
<xa-datasource-property name="readOnly">true</xa-datasource-property>
..
.
</xa-datasource>
You should define access privileges on the database level, not in datasource.