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-clas开发者_JAVA百科s>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.
According to Mysql documentation there is no such properties like readOnly
:
Driver/Datasource Class Names, URL Syntax and Configuration Properties for Connector/J
And also I cannot find any information about such properties in Mysql JDBC Driver. You can check sources for properties interface here: ConnectionProperties.
精彩评论