Revision 56a74270
Added by Andreas Kohlbecker over 11 years ago
cdmlib-remote/src/main/java/eu/etaxonomy/cdm/remote/config/DataSourceConfigurer.java | ||
---|---|---|
23 | 23 |
|
24 | 24 |
import org.apache.commons.io.FilenameUtils; |
25 | 25 |
import org.apache.log4j.Logger; |
26 |
import org.hibernate.dialect.MySQL5MyISAMUtf8Dialect; |
|
26 | 27 |
import org.springframework.beans.BeansException; |
27 | 28 |
import org.springframework.beans.factory.xml.XmlBeanFactory; |
28 | 29 |
import org.springframework.context.annotation.Bean; |
... | ... | |
300 | 301 |
} |
301 | 302 |
|
302 | 303 |
if(url != null && url.contains("mysql")){ |
303 |
return "org.hibernate.dialect.MySQLDialect"; |
|
304 |
// TODO we should switch all databases to InnoDB ! |
|
305 |
// TODO open jdbc connection to check engine and choose between |
|
306 |
// MySQL5MyISAMUtf8Dialect and MySQL5MyISAMUtf8Dialect |
|
307 |
// see #3371 (switch cdm to MySQL InnoDB) |
|
308 |
return MySQL5MyISAMUtf8Dialect.class.getName(); |
|
304 | 309 |
} |
305 | 310 |
|
306 | 311 |
logger.error("hibernate dialect mapping for "+url+ " not jet implemented or unavailable"); |
Also available in: Unified diff
using custom hibernate mysql dialects in DataSourceConfigurer