Search code examples
mysqljbossreadonlyxa

How to make a readonly xa datasource connection to mysql server on jboss


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>

Solution

  • You should define access privileges on the database level, not in datasource.