Author: vyemialyanchyk
Date: 2011-01-19 14:08:40 -0500 (Wed, 19 Jan 2011)
New Revision: 28406
Modified:
branches/jbosstools-3.2.0.CR1/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/workbench/LazyDatabaseSchemaWorkbenchAdapter.java
Log:
https://issues.jboss.org/browse/JBIDE-8155 - fixed
Modified:
branches/jbosstools-3.2.0.CR1/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/workbench/LazyDatabaseSchemaWorkbenchAdapter.java
===================================================================
---
branches/jbosstools-3.2.0.CR1/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/workbench/LazyDatabaseSchemaWorkbenchAdapter.java 2011-01-19
19:04:24 UTC (rev 28405)
+++
branches/jbosstools-3.2.0.CR1/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/workbench/LazyDatabaseSchemaWorkbenchAdapter.java 2011-01-19
19:08:40 UTC (rev 28406)
@@ -56,7 +56,9 @@
@SuppressWarnings("unchecked")
public synchronized Object[] getChildren(Object o, final IProgressMonitor monitor) {
LazyDatabaseSchema dbs = getLazyDatabaseSchema( o );
+
ConsoleConfiguration consoleConfiguration = dbs.getConsoleConfiguration();
+
try{
DefaultDatabaseCollector db = readDatabaseSchema(monitor, consoleConfiguration,
dbs.getReverseEngineeringStrategy());
@@ -113,16 +115,15 @@
JDBCReader reader = JDBCReaderFactory.newJDBCReader(configuration.getProperties(),
settings, strategy);
db = new DefaultDatabaseCollector(reader.getMetaDataDialect());
reader.readDatabaseSchema(db, settings.getDefaultCatalogName(),
settings.getDefaultSchemaName(), new ProgressListenerMonitor(monitor));
- return db;
} catch(HibernateException he) {
- HibernateConsolePlugin.getDefault().logErrorMessage(HibernateConsoleMessages.LazyDatabaseSchemaWorkbenchAdapter_problem_while_reading_database_schema,
he);
+ throw he;
}
finally {
if (connectionProvider!=null) {
connectionProvider.close();
}
}
- return null;
+ return db;
}
});
}