Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2013-01-15 05:33:34 -0500
committerEike Stepper2013-01-15 05:33:34 -0500
commitd3697c431c736e1a4357b9ec160910704cf04655 (patch)
tree4a3a8089564d6c9ee060cc37de863badf617f8cb
parent5e646b8541682882ee15ab0ace34fba692b80697 (diff)
downloadcdo-d3697c431c736e1a4357b9ec160910704cf04655.tar.gz
cdo-d3697c431c736e1a4357b9ec160910704cf04655.tar.xz
cdo-d3697c431c736e1a4357b9ec160910704cf04655.zip
[398167] [DB] Remove JDBC driver dependencies from DBAdapter bundles
https://bugs.eclipse.org/bugs/show_bug.cgi?id=398167
-rw-r--r--plugins/org.eclipse.net4j.db.db2/META-INF/MANIFEST.MF9
-rw-r--r--plugins/org.eclipse.net4j.db.db2/src/org/eclipse/net4j/db/db2/DB2Adapter.java10
-rw-r--r--plugins/org.eclipse.net4j.db.db2/src/org/eclipse/net4j/db/db2/DB2SchemaDataSource.java47
-rw-r--r--plugins/org.eclipse.net4j.db.derby/META-INF/MANIFEST.MF7
-rw-r--r--plugins/org.eclipse.net4j.db.derby/src/org/eclipse/net4j/db/derby/EmbeddedDerbyAdapter.java17
-rw-r--r--plugins/org.eclipse.net4j.db.h2/META-INF/MANIFEST.MF13
-rw-r--r--plugins/org.eclipse.net4j.db.h2/src/org/eclipse/net4j/db/h2/H2Adapter.java90
-rw-r--r--plugins/org.eclipse.net4j.db.hsqldb/META-INF/MANIFEST.MF6
-rw-r--r--plugins/org.eclipse.net4j.db.hsqldb/src/org/eclipse/net4j/db/hsqldb/HSQLDBAdapter.java16
-rw-r--r--plugins/org.eclipse.net4j.db.mysql/META-INF/MANIFEST.MF12
-rw-r--r--plugins/org.eclipse.net4j.db.mysql/src/org/eclipse/net4j/db/mysql/MYSQLAdapter.java23
-rw-r--r--plugins/org.eclipse.net4j.db.oracle/META-INF/MANIFEST.MF16
-rw-r--r--plugins/org.eclipse.net4j.db.oracle/src/org/eclipse/net4j/db/oracle/OracleAdapter.java21
-rw-r--r--plugins/org.eclipse.net4j.db.postgresql/META-INF/MANIFEST.MF9
-rw-r--r--plugins/org.eclipse.net4j.db.postgresql/src/org/eclipse/net4j/db/postgresql/PostgreSQLAdapter.java15
-rw-r--r--plugins/org.eclipse.net4j.db.tests/META-INF/MANIFEST.MF6
-rw-r--r--plugins/org.eclipse.net4j.db.tests/src/org/eclipse/net4j/db/tests/AbstractDBTest.java2
-rw-r--r--plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/db/IDBAdapter.java8
-rw-r--r--plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/spi/db/DBAdapter.java23
19 files changed, 73 insertions, 277 deletions
diff --git a/plugins/org.eclipse.net4j.db.db2/META-INF/MANIFEST.MF b/plugins/org.eclipse.net4j.db.db2/META-INF/MANIFEST.MF
index 8f081738df..3eeb800fb7 100644
--- a/plugins/org.eclipse.net4j.db.db2/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.net4j.db.db2/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.net4j.db.db2;singleton:=true
-Bundle-Version: 4.0.0.qualifier
+Bundle-Version: 4.1.0.qualifier
Bundle-Vendor: %providerName
Bundle-Localization: plugin
Bundle-RequiredExecutionEnvironment: J2SE-1.5
@@ -10,8 +10,7 @@ Bundle-ClassPath: .
Bundle-ActivationPolicy: lazy
Bundle-Activator: org.eclipse.net4j.db.internal.db2.bundle.OM$Activator
Require-Bundle: org.eclipse.net4j.db;bundle-version="[4.0.0,5.0.0)";visibility:=reexport
-Import-Package: com.ibm.db2.jcc;version="[9.0.0,10.0.0)",
- org.osgi.framework;version="[1.0.0,2.0.0)"
-Export-Package: org.eclipse.net4j.db.db2;version="4.0.0",
- org.eclipse.net4j.db.internal.db2.bundle;version="4.0.0";x-internal:=true
+Import-Package: org.osgi.framework;version="[1.0.0,2.0.0)"
+Export-Package: org.eclipse.net4j.db.db2;version="4.1.0",
+ org.eclipse.net4j.db.internal.db2.bundle;version="4.1.0";x-internal:=true
Eclipse-RegisterBuddy: org.eclipse.net4j.db
diff --git a/plugins/org.eclipse.net4j.db.db2/src/org/eclipse/net4j/db/db2/DB2Adapter.java b/plugins/org.eclipse.net4j.db.db2/src/org/eclipse/net4j/db/db2/DB2Adapter.java
index a6d74383ee..d07e8a30db 100644
--- a/plugins/org.eclipse.net4j.db.db2/src/org/eclipse/net4j/db/db2/DB2Adapter.java
+++ b/plugins/org.eclipse.net4j.db.db2/src/org/eclipse/net4j/db/db2/DB2Adapter.java
@@ -84,16 +84,6 @@ public class DB2Adapter extends DBAdapter
super(NAME, VERSION);
}
- public com.ibm.db2.jcc.DB2Driver getJDBCDriver()
- {
- return new com.ibm.db2.jcc.DB2Driver();
- }
-
- public com.ibm.db2.jcc.DB2SimpleDataSource createJDBCDataSource()
- {
- return new com.ibm.db2.jcc.DB2SimpleDataSource();
- }
-
@Override
public int getMaxTableNameLength()
{
diff --git a/plugins/org.eclipse.net4j.db.db2/src/org/eclipse/net4j/db/db2/DB2SchemaDataSource.java b/plugins/org.eclipse.net4j.db.db2/src/org/eclipse/net4j/db/db2/DB2SchemaDataSource.java
index 181806a7fc..d6f5b3c8c9 100644
--- a/plugins/org.eclipse.net4j.db.db2/src/org/eclipse/net4j/db/db2/DB2SchemaDataSource.java
+++ b/plugins/org.eclipse.net4j.db.db2/src/org/eclipse/net4j/db/db2/DB2SchemaDataSource.java
@@ -4,73 +4,44 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* Eike Stepper - initial API and implementation
*/
package org.eclipse.net4j.db.db2;
-import org.eclipse.net4j.db.DBUtil;
-
import java.sql.Connection;
import java.sql.SQLException;
-import java.sql.Statement;
/**
+ * @deprecated As of 4.2 no longer supported because of IP issues for external build dependencies (the vendor driver libs).
* @author Eike Stepper
*/
-public final class DB2SchemaDataSource extends com.ibm.db2.jcc.DB2SimpleDataSource
+@Deprecated
+public final class DB2SchemaDataSource
{
- private static final long serialVersionUID = 1L;
-
- private String schemaName;
-
public DB2SchemaDataSource(String schemaName)
{
- this.schemaName = schemaName;
+ throw new UnsupportedOperationException();
}
public String getSchemaName()
{
- return schemaName;
+ throw new UnsupportedOperationException();
}
- @Override
public Connection getConnection() throws SQLException
{
- Connection connection = super.getConnection();
- setSchema(connection);
- return connection;
+ throw new UnsupportedOperationException();
}
- @Override
public Connection getConnection(Object arg0) throws SQLException
{
- Connection connection = super.getConnection(arg0);
- setSchema(connection);
- return connection;
+ throw new UnsupportedOperationException();
}
- @Override
public Connection getConnection(String arg0, String arg1) throws SQLException
{
- Connection connection = super.getConnection(arg0, arg1);
- setSchema(connection);
- return connection;
- }
-
- private void setSchema(Connection connection) throws SQLException
- {
- Statement stmt = null;
-
- try
- {
- stmt = connection.createStatement();
- stmt.execute("SET CURRENT SCHEMA " + schemaName); //$NON-NLS-1$
- }
- finally
- {
- DBUtil.close(stmt);
- }
+ throw new UnsupportedOperationException();
}
}
diff --git a/plugins/org.eclipse.net4j.db.derby/META-INF/MANIFEST.MF b/plugins/org.eclipse.net4j.db.derby/META-INF/MANIFEST.MF
index 67ea148302..d3b6c17a83 100644
--- a/plugins/org.eclipse.net4j.db.derby/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.net4j.db.derby/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.net4j.db.derby;singleton:=true
-Bundle-Version: 4.0.200.qualifier
+Bundle-Version: 4.1.0.qualifier
Bundle-Vendor: %providerName
Bundle-Localization: plugin
Bundle-RequiredExecutionEnvironment: J2SE-1.5
@@ -11,7 +11,6 @@ Bundle-Activator: org.eclipse.net4j.db.internal.derby.bundle.OM$Activator
Bundle-ClassPath: .
Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.4.0,4.0.0)",
org.eclipse.net4j.db;bundle-version="[4.0.0,5.0.0)";visibility:=reexport
-Import-Package: org.apache.derby.jdbc;version="[10.0.0,11.0.0)"
-Export-Package: org.eclipse.net4j.db.derby;version="4.0.200",
- org.eclipse.net4j.db.internal.derby.bundle;version="4.0.200";x-internal:=true
+Export-Package: org.eclipse.net4j.db.derby;version="4.1.0",
+ org.eclipse.net4j.db.internal.derby.bundle;version="4.1.0";x-internal:=true
Eclipse-RegisterBuddy: org.eclipse.net4j.db
diff --git a/plugins/org.eclipse.net4j.db.derby/src/org/eclipse/net4j/db/derby/EmbeddedDerbyAdapter.java b/plugins/org.eclipse.net4j.db.derby/src/org/eclipse/net4j/db/derby/EmbeddedDerbyAdapter.java
index 0adb73aaf2..d8b81baa78 100644
--- a/plugins/org.eclipse.net4j.db.derby/src/org/eclipse/net4j/db/derby/EmbeddedDerbyAdapter.java
+++ b/plugins/org.eclipse.net4j.db.derby/src/org/eclipse/net4j/db/derby/EmbeddedDerbyAdapter.java
@@ -10,13 +10,6 @@
*/
package org.eclipse.net4j.db.derby;
-import org.apache.derby.jdbc.EmbeddedDataSource;
-import org.apache.derby.jdbc.EmbeddedDriver;
-
-import javax.sql.DataSource;
-
-import java.sql.Driver;
-
/**
* A {@link DerbyAdapter Derby adapter} for <a href="http://db.apache.org/derby/papers/DerbyTut/embedded_intro.html">embedded</a> databases.
*
@@ -31,14 +24,4 @@ public class EmbeddedDerbyAdapter extends DerbyAdapter
{
super(NAME);
}
-
- public Driver getJDBCDriver()
- {
- return new EmbeddedDriver();
- }
-
- public DataSource createJDBCDataSource()
- {
- return new EmbeddedDataSource();
- }
}
diff --git a/plugins/org.eclipse.net4j.db.h2/META-INF/MANIFEST.MF b/plugins/org.eclipse.net4j.db.h2/META-INF/MANIFEST.MF
index 43ce0a783e..6487d0d1e0 100644
--- a/plugins/org.eclipse.net4j.db.h2/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.net4j.db.h2/META-INF/MANIFEST.MF
@@ -2,22 +2,15 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.net4j.db.h2;singleton:=true
-Bundle-Version: 4.1.0.qualifier
+Bundle-Version: 4.2.0.qualifier
Bundle-Vendor: %providerName
Bundle-Localization: plugin
Bundle-ClassPath: .
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Bundle-ActivationPolicy: lazy
Bundle-Activator: org.eclipse.net4j.db.internal.h2.bundle.OM$Activator
-Import-Package: org.h2;version="[1.0.0,2.0.0)",
- org.h2.command;version="[1.0.0,2.0.0)";resolution:=optional,
- org.h2.expression;version="[1.0.0,2.0.0)";resolution:=optional,
- org.h2.jdbc;version="[1.0.0,2.0.0)";resolution:=optional,
- org.h2.jdbcx;version="[1.0.0,2.0.0)";resolution:=optional,
- org.h2.util;version="[1.0.0,2.0.0)";resolution:=optional,
- org.h2.value;version="[1.0.0,2.0.0)"
Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.4.0,4.0.0)",
org.eclipse.net4j.db;bundle-version="[4.0.0,5.0.0)";visibility:=reexport
-Export-Package: org.eclipse.net4j.db.h2;version="4.1.0",
- org.eclipse.net4j.db.internal.h2.bundle;version="4.1.0";x-internal:=true
+Export-Package: org.eclipse.net4j.db.h2;version="4.2.0",
+ org.eclipse.net4j.db.internal.h2.bundle;version="4.2.0";x-internal:=true
Eclipse-RegisterBuddy: org.eclipse.net4j.db
diff --git a/plugins/org.eclipse.net4j.db.h2/src/org/eclipse/net4j/db/h2/H2Adapter.java b/plugins/org.eclipse.net4j.db.h2/src/org/eclipse/net4j/db/h2/H2Adapter.java
index 032b0b8466..2557dc94fc 100644
--- a/plugins/org.eclipse.net4j.db.h2/src/org/eclipse/net4j/db/h2/H2Adapter.java
+++ b/plugins/org.eclipse.net4j.db.h2/src/org/eclipse/net4j/db/h2/H2Adapter.java
@@ -14,20 +14,7 @@ import org.eclipse.net4j.db.DBType;
import org.eclipse.net4j.db.IDBAdapter;
import org.eclipse.net4j.db.ddl.IDBField;
import org.eclipse.net4j.spi.db.DBAdapter;
-import org.eclipse.net4j.util.ReflectUtil;
-import org.h2.command.CommandInterface;
-import org.h2.expression.ParameterInterface;
-import org.h2.jdbc.JdbcPreparedStatement;
-import org.h2.jdbcx.JdbcDataSource;
-import org.h2.util.ObjectArray;
-import org.h2.value.Value;
-
-import javax.sql.DataSource;
-
-import java.lang.reflect.Field;
-import java.sql.Driver;
-import java.sql.PreparedStatement;
import java.sql.SQLException;
/**
@@ -42,25 +29,11 @@ public class H2Adapter extends DBAdapter
public static final String VERSION = "1.1.114"; //$NON-NLS-1$
- private static final Field SQL_FIELD = ReflectUtil.getField(JdbcPreparedStatement.class, "sql");
-
- private static final Field COMMAND_FIELD = ReflectUtil.getField(JdbcPreparedStatement.class, "command");
-
public H2Adapter()
{
super(NAME, VERSION);
}
- public Driver getJDBCDriver()
- {
- return new org.h2.Driver();
- }
-
- public DataSource createJDBCDataSource()
- {
- return new JdbcDataSource();
- }
-
@Override
protected String getTypeName(IDBField field)
{
@@ -104,67 +77,4 @@ public class H2Adapter extends DBAdapter
{
return "ALTER TABLE " + field.getTable() + " ALTER COLUMN " + oldName + " RENAME TO " + field;
}
-
- /**
- * @since 4.1
- */
- @Override
- public String format(PreparedStatement stmt)
- {
- try
- {
- if (stmt instanceof JdbcPreparedStatement)
- {
- String sql = (String)ReflectUtil.getValue(SQL_FIELD, stmt);
-
- boolean insert = false;
- if (sql.toUpperCase().startsWith("INSERT INTO"))
- {
- int pos = sql.indexOf("(");
- sql = sql.substring(0, pos) + "SET " + sql.substring(pos + 1);
- sql = sql.substring(0, sql.indexOf(" VALUES"));
- insert = true;
- }
-
- CommandInterface command = (CommandInterface)ReflectUtil.getValue(COMMAND_FIELD, stmt);
- ObjectArray<? extends ParameterInterface> parameters = command.getParameters();
-
- int pos = 0;
- for (int i = 0; i < parameters.size(); i++)
- {
- ParameterInterface parameter = parameters.get(i);
- Value value = parameter.getParamValue();
-
- if (insert)
- {
- String string = "=" + value;
-
- pos = sql.indexOf(',', pos);
- if (pos == -1)
- {
- pos = sql.indexOf(')');
- sql = sql.substring(0, pos) + string;
- break;
- }
-
- sql = sql.substring(0, pos) + string + sql.substring(pos);
- pos += string.length() + 1;
- }
- else
- {
- pos = sql.indexOf('?');
- sql = sql.substring(0, pos) + value + sql.substring(pos + 1);
- }
- }
-
- return sql;
- }
- }
- catch (Throwable t)
- {
- //$FALL-THROUGH$
- }
-
- return super.format(stmt);
- }
}
diff --git a/plugins/org.eclipse.net4j.db.hsqldb/META-INF/MANIFEST.MF b/plugins/org.eclipse.net4j.db.hsqldb/META-INF/MANIFEST.MF
index b720870467..86877cca90 100644
--- a/plugins/org.eclipse.net4j.db.hsqldb/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.net4j.db.hsqldb/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.net4j.db.hsqldb;singleton:=true
-Bundle-Version: 4.1.0.qualifier
+Bundle-Version: 4.2.0.qualifier
Bundle-Vendor: %providerName
Bundle-Localization: plugin
Bundle-ActivationPolicy: lazy
@@ -13,6 +13,6 @@ Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.4.0,4.0.0)",
org.eclipse.net4j.db;bundle-version="[4.0.0,5.0.0)";visibility:=reexport
Import-Package: org.hsqldb;version="[2.0.0,3.0.0)",
org.hsqldb.jdbc;version="[2.0.0,3.0.0)"
-Export-Package: org.eclipse.net4j.db.hsqldb;version="4.1.0",
- org.eclipse.net4j.db.internal.hsqldb.bundle;version="4.1.0";x-internal:=true
+Export-Package: org.eclipse.net4j.db.hsqldb;version="4.2.0",
+ org.eclipse.net4j.db.internal.hsqldb.bundle;version="4.2.0";x-internal:=true
Eclipse-RegisterBuddy: org.eclipse.net4j.db
diff --git a/plugins/org.eclipse.net4j.db.hsqldb/src/org/eclipse/net4j/db/hsqldb/HSQLDBAdapter.java b/plugins/org.eclipse.net4j.db.hsqldb/src/org/eclipse/net4j/db/hsqldb/HSQLDBAdapter.java
index 24ecbcd499..ca1b5de2e2 100644
--- a/plugins/org.eclipse.net4j.db.hsqldb/src/org/eclipse/net4j/db/hsqldb/HSQLDBAdapter.java
+++ b/plugins/org.eclipse.net4j.db.hsqldb/src/org/eclipse/net4j/db/hsqldb/HSQLDBAdapter.java
@@ -15,12 +15,6 @@ import org.eclipse.net4j.db.IDBAdapter;
import org.eclipse.net4j.db.ddl.IDBField;
import org.eclipse.net4j.spi.db.DBAdapter;
-import org.hsqldb.jdbcDriver;
-
-import javax.sql.DataSource;
-
-import java.sql.Driver;
-
/**
* A {@link IDBAdapter DB adapter} for <a href="http://hsqldb.org/">HyperSQL</a> databases.
*
@@ -38,16 +32,6 @@ public class HSQLDBAdapter extends DBAdapter
super(NAME, VERSION);
}
- public Driver getJDBCDriver()
- {
- return new jdbcDriver();
- }
-
- public DataSource createJDBCDataSource()
- {
- return new HSQLDBDataSource();
- }
-
@Override
protected String getTypeName(IDBField field)
{
diff --git a/plugins/org.eclipse.net4j.db.mysql/META-INF/MANIFEST.MF b/plugins/org.eclipse.net4j.db.mysql/META-INF/MANIFEST.MF
index 4008361af1..6a311add55 100644
--- a/plugins/org.eclipse.net4j.db.mysql/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.net4j.db.mysql/META-INF/MANIFEST.MF
@@ -1,8 +1,8 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.net4j.db.mysql;singleton:=true
-Bundle-Version: 4.1.0.qualifier
+Bundle-Version: 4.2.0.qualifier
+Bundle-Name: %pluginName
Bundle-Vendor: %providerName
Bundle-Localization: plugin
Bundle-RequiredExecutionEnvironment: J2SE-1.5
@@ -10,9 +10,7 @@ Bundle-ClassPath: .
Bundle-ActivationPolicy: lazy
Bundle-Activator: org.eclipse.net4j.db.internal.mysql.bundle.OM$Activator
Require-Bundle: org.eclipse.net4j.db;bundle-version="[4.0.0,5.0.0)";visibility:=reexport
-Import-Package: com.mysql.jdbc;version="[5.0.0,6.0.0)",
- com.mysql.jdbc.jdbc2.optional;version="[5.0.0,6.0.0)",
- org.osgi.framework;version="[1.0.0,2.0.0)"
-Export-Package: org.eclipse.net4j.db.internal.mysql.bundle;version="4.1.0";x-internal:=true,
- org.eclipse.net4j.db.mysql;version="4.1.0"
+Import-Package: org.osgi.framework;version="[1.0.0,2.0.0)"
+Export-Package: org.eclipse.net4j.db.internal.mysql.bundle;version="4.2.0";x-internal:=true,
+ org.eclipse.net4j.db.mysql;version="4.2.0"
Eclipse-RegisterBuddy: org.eclipse.net4j.db
diff --git a/plugins/org.eclipse.net4j.db.mysql/src/org/eclipse/net4j/db/mysql/MYSQLAdapter.java b/plugins/org.eclipse.net4j.db.mysql/src/org/eclipse/net4j/db/mysql/MYSQLAdapter.java
index 7810a35c45..670d37af34 100644
--- a/plugins/org.eclipse.net4j.db.mysql/src/org/eclipse/net4j/db/mysql/MYSQLAdapter.java
+++ b/plugins/org.eclipse.net4j.db.mysql/src/org/eclipse/net4j/db/mysql/MYSQLAdapter.java
@@ -10,17 +10,11 @@
*/
package org.eclipse.net4j.db.mysql;
-import org.eclipse.net4j.db.DBException;
import org.eclipse.net4j.db.DBType;
import org.eclipse.net4j.db.IDBAdapter;
import org.eclipse.net4j.db.ddl.IDBField;
import org.eclipse.net4j.spi.db.DBAdapter;
-import com.mysql.jdbc.jdbc2.optional.MysqlDataSource;
-
-import javax.sql.DataSource;
-
-import java.sql.Driver;
import java.sql.SQLException;
/**
@@ -74,23 +68,6 @@ public class MYSQLAdapter extends DBAdapter
super(NAME, VERSION);
}
- public Driver getJDBCDriver()
- {
- try
- {
- return new com.mysql.jdbc.Driver();
- }
- catch (SQLException ex)
- {
- throw new DBException(ex);
- }
- }
-
- public DataSource createJDBCDataSource()
- {
- return new MysqlDataSource();
- }
-
/**
* @since 2.0
*/
diff --git a/plugins/org.eclipse.net4j.db.oracle/META-INF/MANIFEST.MF b/plugins/org.eclipse.net4j.db.oracle/META-INF/MANIFEST.MF
index 978a4d87f6..24ea2e6dc2 100644
--- a/plugins/org.eclipse.net4j.db.oracle/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.net4j.db.oracle/META-INF/MANIFEST.MF
@@ -1,17 +1,15 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
-Bundle-Name: Oracle DB Adapter
Bundle-SymbolicName: org.eclipse.net4j.db.oracle;singleton:=true
Bundle-Version: 1.0.0.qualifier
+Bundle-Name: %pluginName
+Bundle-Vendor: %providerName
Bundle-RequiredExecutionEnvironment: J2SE-1.5
-Require-Bundle: org.eclipse.net4j.db;bundle-version="[4.0.0,5.0.0)";visibility:=reexport
-Import-Package: oracle.jdbc,
- oracle.jdbc.driver,
- oracle.jdbc.pool,
- org.osgi.framework;version="[1.0.0,2.0.0)"
+Bundle-Activator: org.eclipse.net4j.db.oracle.internal.bundle.OM$Activator
Bundle-ActivationPolicy: lazy
-Eclipse-RegisterBuddy: org.eclipse.net4j.db
+Bundle-ClassPath: .
+Require-Bundle: org.eclipse.net4j.db;bundle-version="[4.0.0,5.0.0)";visibility:=reexport
+Import-Package: org.osgi.framework;version="[1.0.0,2.0.0)"
Export-Package: org.eclipse.net4j.db.oracle;version="1.0.0",
org.eclipse.net4j.db.oracle.internal.bundle;version="1.0.0";x-internal:=true
-Bundle-ClassPath: .
-Bundle-Activator: org.eclipse.net4j.db.oracle.internal.bundle.OM$Activator
+Eclipse-RegisterBuddy: org.eclipse.net4j.db
diff --git a/plugins/org.eclipse.net4j.db.oracle/src/org/eclipse/net4j/db/oracle/OracleAdapter.java b/plugins/org.eclipse.net4j.db.oracle/src/org/eclipse/net4j/db/oracle/OracleAdapter.java
index 39c74fc049..a0d51011a8 100644
--- a/plugins/org.eclipse.net4j.db.oracle/src/org/eclipse/net4j/db/oracle/OracleAdapter.java
+++ b/plugins/org.eclipse.net4j.db.oracle/src/org/eclipse/net4j/db/oracle/OracleAdapter.java
@@ -11,14 +11,10 @@
*/
package org.eclipse.net4j.db.oracle;
-import org.eclipse.net4j.db.DBException;
import org.eclipse.net4j.db.DBType;
import org.eclipse.net4j.db.ddl.IDBField;
import org.eclipse.net4j.spi.db.DBAdapter;
-import javax.sql.DataSource;
-
-import java.sql.Driver;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.Arrays;
@@ -35,23 +31,6 @@ public class OracleAdapter extends DBAdapter
super(NAME, VERSION);
}
- public Driver getJDBCDriver()
- {
- return new oracle.jdbc.driver.OracleDriver();
- }
-
- public DataSource createJDBCDataSource()
- {
- try
- {
- return new oracle.jdbc.pool.OracleDataSource();
- }
- catch (SQLException e)
- {
- throw new DBException(e);
- }
- }
-
public String[] getReservedWords()
{
List<String> list = new ArrayList<String>(Arrays.asList(getSQL92ReservedWords()));
diff --git a/plugins/org.eclipse.net4j.db.postgresql/META-INF/MANIFEST.MF b/plugins/org.eclipse.net4j.db.postgresql/META-INF/MANIFEST.MF
index 517fadde42..9c9f2e0469 100644
--- a/plugins/org.eclipse.net4j.db.postgresql/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.net4j.db.postgresql/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.net4j.db.postgresql;singleton:=true
-Bundle-Version: 4.1.0.qualifier
+Bundle-Version: 4.2.0.qualifier
Bundle-Vendor: %providerName
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Bundle-ClassPath: .
@@ -11,9 +11,6 @@ Bundle-ActivationPolicy: lazy
Bundle-Activator: org.eclipse.net4j.db.internal.postgresql.bundle.OM$Activator
Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.4.0,4.0.0)",
org.eclipse.net4j.db;bundle-version="[4.0.0,5.0.0)";visibility:=reexport
-Import-Package: org.postgresql;version="[9.0.0,10.0.0)",
- org.postgresql.ds;version="[9.0.0,10.0.0)",
- org.postgresql.ds.common;version="[9.0.0,10.0.0)"
-Export-Package: org.eclipse.net4j.db.internal.postgresql.bundle;version="4.1.0";x-internal:=true,
- org.eclipse.net4j.db.postgresql;version="4.1.0"
+Export-Package: org.eclipse.net4j.db.internal.postgresql.bundle;version="4.2.0";x-internal:=true,
+ org.eclipse.net4j.db.postgresql;version="4.2.0"
Eclipse-RegisterBuddy: org.eclipse.net4j.db
diff --git a/plugins/org.eclipse.net4j.db.postgresql/src/org/eclipse/net4j/db/postgresql/PostgreSQLAdapter.java b/plugins/org.eclipse.net4j.db.postgresql/src/org/eclipse/net4j/db/postgresql/PostgreSQLAdapter.java
index d8e6ccaf5a..bb43352172 100644
--- a/plugins/org.eclipse.net4j.db.postgresql/src/org/eclipse/net4j/db/postgresql/PostgreSQLAdapter.java
+++ b/plugins/org.eclipse.net4j.db.postgresql/src/org/eclipse/net4j/db/postgresql/PostgreSQLAdapter.java
@@ -20,11 +20,6 @@ import org.eclipse.net4j.db.ddl.IDBTable;
import org.eclipse.net4j.db.internal.postgresql.bundle.OM;
import org.eclipse.net4j.spi.db.DBAdapter;
-import org.postgresql.ds.PGSimpleDataSource;
-
-import javax.sql.DataSource;
-
-import java.sql.Driver;
import java.sql.SQLException;
import java.sql.Savepoint;
import java.sql.Statement;
@@ -60,16 +55,6 @@ public class PostgreSQLAdapter extends DBAdapter
super(NAME, VERSION);
}
- public Driver getJDBCDriver()
- {
- return new org.postgresql.Driver();
- }
-
- public DataSource createJDBCDataSource()
- {
- return new PGSimpleDataSource();
- }
-
/**
* @since 2.0
*/
diff --git a/plugins/org.eclipse.net4j.db.tests/META-INF/MANIFEST.MF b/plugins/org.eclipse.net4j.db.tests/META-INF/MANIFEST.MF
index ffe3b77ecf..4655634fcb 100644
--- a/plugins/org.eclipse.net4j.db.tests/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.net4j.db.tests/META-INF/MANIFEST.MF
@@ -1,7 +1,7 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-SymbolicName: org.eclipse.net4j.db.tests
-Bundle-Version: 4.0.100.qualifier
+Bundle-Version: 4.0.200.qualifier
Bundle-Name: %pluginName
Bundle-Vendor: %providerName
Bundle-Localization: plugin
@@ -19,5 +19,5 @@ Import-Package: com.mysql.jdbc;version="[5.1.0,6.0.0)";resolution:=optional,
com.mysql.jdbc.jdbc2.optional;version="[5.1.0,6.0.0)";resolution:=optional,
org.apache.derby.jdbc;version="[10.0.0,11.0.0)",
org.hsqldb.jdbc;version="[2.0.0,3.0.0)";resolution:=optional
-Export-Package: org.eclipse.net4j.db.tests;version="4.0.100";x-internal:=true,
- org.eclipse.net4j.db.tests.bundle;version="4.0.100";x-internal:=true
+Export-Package: org.eclipse.net4j.db.tests;version="4.0.200";x-internal:=true,
+ org.eclipse.net4j.db.tests.bundle;version="4.0.200";x-internal:=true
diff --git a/plugins/org.eclipse.net4j.db.tests/src/org/eclipse/net4j/db/tests/AbstractDBTest.java b/plugins/org.eclipse.net4j.db.tests/src/org/eclipse/net4j/db/tests/AbstractDBTest.java
index a82558074d..72158ca5af 100644
--- a/plugins/org.eclipse.net4j.db.tests/src/org/eclipse/net4j/db/tests/AbstractDBTest.java
+++ b/plugins/org.eclipse.net4j.db.tests/src/org/eclipse/net4j/db/tests/AbstractDBTest.java
@@ -39,6 +39,8 @@ public abstract class AbstractDBTest<DATA_SOURCE extends DataSource> extends Abs
protected void doSetUp() throws Exception
{
dbAdapter = createDBAdapter();
+
+ // TODO Clarify if these tests are still needed/wanted. The following deprecation now requires a different setup
DATA_SOURCE dataSource = (DATA_SOURCE)dbAdapter.createJDBCDataSource();
configureDataSource(dataSource);
dbConnectionProvider = DBUtil.createConnectionProvider(dataSource);
diff --git a/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/db/IDBAdapter.java b/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/db/IDBAdapter.java
index 3aaa5a6fcc..ca8787d028 100644
--- a/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/db/IDBAdapter.java
+++ b/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/db/IDBAdapter.java
@@ -40,8 +40,16 @@ public interface IDBAdapter
public String getVersion();
+ /**
+ * @deprecated As of 4.2 no longer supported because of IP issues for external build dependencies (the vendor driver libs).
+ */
+ @Deprecated
public Driver getJDBCDriver();
+ /**
+ * @deprecated As of 4.2 no longer supported because of IP issues for external build dependencies (the vendor driver libs).
+ */
+ @Deprecated
public DataSource createJDBCDataSource();
public Set<IDBTable> createTables(Iterable<? extends IDBTable> tables, Connection connection) throws DBException;
diff --git a/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/spi/db/DBAdapter.java b/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/spi/db/DBAdapter.java
index 2c98301a2d..1eacdaa817 100644
--- a/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/spi/db/DBAdapter.java
+++ b/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/spi/db/DBAdapter.java
@@ -21,8 +21,11 @@ import org.eclipse.net4j.db.ddl.IDBTable;
import org.eclipse.net4j.internal.db.bundle.OM;
import org.eclipse.net4j.util.om.trace.ContextTracer;
+import javax.sql.DataSource;
+
import java.io.IOException;
import java.sql.Connection;
+import java.sql.Driver;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.ResultSetMetaData;
@@ -101,6 +104,26 @@ public abstract class DBAdapter implements IDBAdapter
return version;
}
+ /**
+ * @since 4.2
+ * @deprecated As of 4.2 no longer supported because of IP issues for external build dependencies (the vendor driver libs).
+ */
+ @Deprecated
+ public Driver getJDBCDriver()
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ /**
+ * @since 4.2
+ * @deprecated As of 4.2 no longer supported because of IP issues for external build dependencies (the vendor driver libs).
+ */
+ @Deprecated
+ public DataSource createJDBCDataSource()
+ {
+ throw new UnsupportedOperationException();
+ }
+
public Set<IDBTable> createTables(Iterable<? extends IDBTable> tables, Connection connection) throws DBException
{
Set<IDBTable> createdTables = new HashSet<IDBTable>();

Back to the top