Author: vyemialyanchyk
Date: 2010-05-17 11:58:03 -0400 (Mon, 17 May 2010)
New Revision: 22125
Modified:
branches/jbosstools-3.1.x/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/ConsoleConfiguration.java
Log:
https://jira.jboss.org/browse/JBIDE-5997 - (and JBIDE-5839) fix in simplest manner
Modified:
branches/jbosstools-3.1.x/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/ConsoleConfiguration.java
===================================================================
---
branches/jbosstools-3.1.x/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/ConsoleConfiguration.java 2010-05-17
15:28:59 UTC (rev 22124)
+++
branches/jbosstools-3.1.x/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/ConsoleConfiguration.java 2010-05-17
15:58:03 UTC (rev 22125)
@@ -325,11 +325,6 @@
Properties properties = prefs.getProperties();
if(properties!=null) {
- // to fix: JBIDE-5839 - setup this property: false is default value
- // to make hibernate tools diff hibernate versions compatible
- if (properties.getProperty("hibernate.search.autoregister_listeners") ==
null) { //$NON-NLS-1$
- properties.setProperty("hibernate.search.autoregister_listeners",
"false"); //$NON-NLS-1$ //$NON-NLS-2$
- }
// in case the transaction manager is empty then we need to inject a faketm since
hibernate will still try and instantiate it.
String str = properties.getProperty(
"hibernate.transaction.manager_lookup_class" ); //$NON-NLS-1$
if(str != null && StringHelper.isEmpty( str )) {
@@ -365,6 +360,12 @@
// TODO: HBX-
localCfg.setProperty( "hibernate.temp.use_jdbc_metadata_defaults",
"false" ); //$NON-NLS-1$//$NON-NLS-2$
localCfg.setProperty( Environment.HBM2DDL_AUTO, "false" ); //$NON-NLS-1$
+ // to fix: JBIDE-5839 & JBIDE-5997 - setup this property: false is default value
+ // to make hibernate tools diff hibernate versions compatible:
+ // if the property not set get NoSuchMethodError with FullTextIndexEventListener
+ if (localCfg.getProperty("hibernate.search.autoregister_listeners") ==
null) { //$NON-NLS-1$
+ localCfg.setProperty("hibernate.search.autoregister_listeners",
"false"); //$NON-NLS-1$ //$NON-NLS-2$
+ }
return localCfg;
}