[jboss-cvs] jbosside/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console ...
Max Rydahl Andersen
mandersen at jboss.com
Tue Feb 20 08:09:43 EST 2007
User: mandersen
Date: 07/02/20 08:09:43
Modified: hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console
ConsoleConfiguration.java
Log:
HBX-887 Do not auto run schemaexport and databasemetadata introspection
Revision Changes Path
1.17 +30 -5 jbosside/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/ConsoleConfiguration.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: ConsoleConfiguration.java
===================================================================
RCS file: /cvsroot/jboss/jbosside/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/ConsoleConfiguration.java,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -b -r1.16 -r1.17
--- ConsoleConfiguration.java 15 Jan 2007 08:17:10 -0000 1.16
+++ ConsoleConfiguration.java 20 Feb 2007 13:09:43 -0000 1.17
@@ -74,8 +74,6 @@
private Configuration configuration;
private SessionFactory sessionFactory;
-
-
/** Unique name for this configuration */
public String getName() {
return prefs.getName();
@@ -136,7 +134,7 @@
}
method = clazz.getMethod("getHibernateConfiguration", new Class[0]);
- Configuration invoke = (Configuration) method.invoke(ejb3cfg, null);
+ Configuration invoke = (Configuration) method.invoke(ejb3cfg, (Object[])null);
return invoke;
}
catch (Exception e) {
@@ -156,7 +154,31 @@
*/
public Configuration buildWith(final Configuration cfg, final boolean includeMappings) {
URL[] customClassPathURLS = prefs.getCustomClassPathURLS();
- executionContext = new DefaultExecutionContext( getName(), new URLClassLoader( customClassPathURLS, getParentClassLoader() ) );
+ executionContext = new DefaultExecutionContext( getName(), new URLClassLoader( customClassPathURLS, getParentClassLoader() ) {
+ protected Class findClass(String name) throws ClassNotFoundException {
+ try {
+ return super.findClass( name );
+ } catch(ClassNotFoundException cnfe) {
+ throw cnfe;
+ }
+ }
+
+ protected synchronized Class loadClass(String name, boolean resolve) throws ClassNotFoundException {
+ try {
+ return super.loadClass( name, resolve );
+ } catch(ClassNotFoundException cnfe) {
+ throw cnfe;
+ }
+ }
+
+ public Class loadClass(String name) throws ClassNotFoundException {
+ try {
+ return super.loadClass( name );
+ } catch(ClassNotFoundException cnfe) {
+ throw cnfe;
+ }
+ }
+ });
Configuration result = (Configuration) executionContext.execute(new ExecutionContext.Command() {
@@ -184,6 +206,9 @@
localCfg = localCfg.addFile(hbm);
}
}
+ // TODO: HBX-
+ localCfg.setProperty( "hibernate.temp.use_jdbc_metadata_defaults", "false" );
+ localCfg.setProperty( Environment.HBM2DDL_AUTO, "false" );
return localCfg;
}
More information about the jboss-cvs-commits
mailing list