Padmanaba Prasad wrote:
Suggestions appreciated, currently i am
changing the MySQL config file.
Is there any better way to do this programatically
using hibernate/ hibernate settings ????
Suggestion: you could extend/re-engineer the MySQLInnodDBDialect.java file and override both/either:
public String appendLockHint(LockMode mode, String tableName)
public String transformSelectString(String select)
E.g. you could check wether the 'select' argument passed to the transform method has 'update' in it. When not, you could transform it so it has the suggested InnoDB specific select 'extension' as described in the reference you posted. I didn't do this myself, but if you want to avoid trouble in a multithreaded environment, this could be a route to explore.
See the Dialect.java base class for more info on these methods.
Don't forget to change the configuration dialect to your newly engineered dialect in the hibernate.cfg.xml config file!
Steven