Author: dgeraskov
Date: 2011-10-04 06:05:01 -0400 (Tue, 04 Oct 2011)
New Revision: 35317
Added:
branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.libs/src/org/hibernate/console/
branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.libs/src/org/hibernate/console/libs/
branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.libs/src/org/hibernate/eclipse/libs/FakeDelegatingDriver.java
Modified:
branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate3_5/src/org/jboss/tools/hibernate3_5/HibernateExtension3_5.java
Log:
Move FakeDelegatingDriver to the plugins with Libraries. This make it loaded by correct
plugin and DriverManager is happy
Added:
branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.libs/src/org/hibernate/eclipse/libs/FakeDelegatingDriver.java
===================================================================
---
branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.libs/src/org/hibernate/eclipse/libs/FakeDelegatingDriver.java
(rev 0)
+++
branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.libs/src/org/hibernate/eclipse/libs/FakeDelegatingDriver.java 2011-10-04
10:05:01 UTC (rev 35317)
@@ -0,0 +1,55 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.hibernate.eclipse.libs;
+
+import java.sql.Connection;
+import java.sql.Driver;
+import java.sql.DriverPropertyInfo;
+import java.sql.SQLException;
+import java.util.Properties;
+
+public class FakeDelegatingDriver implements Driver {
+ private Driver driver;
+
+ public FakeDelegatingDriver(Driver d) {
+ this.driver = d;
+ }
+ public boolean acceptsURL(String u) throws SQLException {
+ return this.driver.acceptsURL(u);
+ }
+ public Connection connect(String u, Properties p) throws SQLException {
+ return this.driver.connect(u, p);
+ }
+ public int getMajorVersion() {
+ return this.driver.getMajorVersion();
+ }
+ public int getMinorVersion() {
+ return this.driver.getMinorVersion();
+ }
+ public DriverPropertyInfo[] getPropertyInfo(String u, Properties p)
+ throws SQLException {
+ return this.driver.getPropertyInfo(u, p);
+ }
+ public boolean jdbcCompliant() {
+ return this.driver.jdbcCompliant();
+ }
+}
\ No newline at end of file
Modified:
branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate3_5/src/org/jboss/tools/hibernate3_5/HibernateExtension3_5.java
===================================================================
---
branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate3_5/src/org/jboss/tools/hibernate3_5/HibernateExtension3_5.java 2011-10-04
09:34:36 UTC (rev 35316)
+++
branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate3_5/src/org/jboss/tools/hibernate3_5/HibernateExtension3_5.java 2011-10-04
10:05:01 UTC (rev 35317)
@@ -19,7 +19,6 @@
import org.hibernate.console.ConsoleConfigClassLoader;
import org.hibernate.console.ConsoleMessages;
import org.hibernate.console.ConsoleQueryParameter;
-import org.hibernate.console.FakeDelegatingDriver;
import org.hibernate.console.QueryInputModel;
import org.hibernate.console.execution.DefaultExecutionContext;
import org.hibernate.console.execution.ExecutionContext;
@@ -30,6 +29,7 @@
import org.hibernate.console.ext.QueryResultImpl;
import org.hibernate.console.preferences.ConsoleConfigurationPreferences;
import org.hibernate.console.preferences.PreferencesClassPathUtils;
+import org.hibernate.eclipse.libs.FakeDelegatingDriver;
import org.hibernate.type.Type;
public class HibernateExtension3_5 implements HibernateExtension {