Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Taal2013-01-16 07:13:11 -0500
committerMartin Taal2013-01-16 07:13:11 -0500
commitaf8bc5c955196e3a1993009c29be5482486fae72 (patch)
treee90a7b70a340a0ce46e3f12db4976c3fc6175fd9
parent385433199b2e184ba7db38f8f49455989dd1c7c3 (diff)
parent184b04efaa0b07d2f1f29d41eb919667d07b60dc (diff)
downloadcdo-af8bc5c955196e3a1993009c29be5482486fae72.tar.gz
cdo-af8bc5c955196e3a1993009c29be5482486fae72.tar.xz
cdo-af8bc5c955196e3a1993009c29be5482486fae72.zip
Merge branch 'master' of ssh://git.eclipse.org/gitroot/cdo/cdo
-rw-r--r--plugins/org.eclipse.net4j.db.db2/META-INF/MANIFEST.MF3
-rw-r--r--plugins/org.eclipse.net4j.db.derby/META-INF/MANIFEST.MF1
-rw-r--r--plugins/org.eclipse.net4j.db.h2/META-INF/MANIFEST.MF7
-rw-r--r--plugins/org.eclipse.net4j.db.hsqldb/META-INF/MANIFEST.MF4
-rw-r--r--plugins/org.eclipse.net4j.db.mysql/META-INF/MANIFEST.MF4
-rw-r--r--plugins/org.eclipse.net4j.db.oracle/META-INF/MANIFEST.MF5
-rw-r--r--plugins/org.eclipse.net4j.db.postgresql/META-INF/MANIFEST.MF3
-rw-r--r--plugins/org.eclipse.net4j.db.tests/src/org/eclipse/net4j/db/tests/AbstractDBTest.java9
-rw-r--r--plugins/org.eclipse.net4j.db.tests/src/org/eclipse/net4j/db/tests/DerbyTest.java8
-rw-r--r--plugins/org.eclipse.net4j.db.tests/src/org/eclipse/net4j/db/tests/HsqldbTest.java10
10 files changed, 38 insertions, 16 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 3eeb800fb7..060a3adfc1 100644
--- a/plugins/org.eclipse.net4j.db.db2/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.net4j.db.db2/META-INF/MANIFEST.MF
@@ -10,7 +10,8 @@ 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: org.osgi.framework;version="[1.0.0,2.0.0)"
+Import-Package: com.ibm.db2.jcc;version="[9.0.0,10.0.0)";resolution:=optional,
+ 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.derby/META-INF/MANIFEST.MF b/plugins/org.eclipse.net4j.db.derby/META-INF/MANIFEST.MF
index d3b6c17a83..050912116b 100644
--- a/plugins/org.eclipse.net4j.db.derby/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.net4j.db.derby/META-INF/MANIFEST.MF
@@ -11,6 +11,7 @@ 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)";resolution:=optional
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.h2/META-INF/MANIFEST.MF b/plugins/org.eclipse.net4j.db.h2/META-INF/MANIFEST.MF
index 6487d0d1e0..69a0519745 100644
--- a/plugins/org.eclipse.net4j.db.h2/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.net4j.db.h2/META-INF/MANIFEST.MF
@@ -9,6 +9,13 @@ 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)";resolution:=optional,
+ 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)";resolution:=optional
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.2.0",
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 86877cca90..719dd1dd7c 100644
--- a/plugins/org.eclipse.net4j.db.hsqldb/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.net4j.db.hsqldb/META-INF/MANIFEST.MF
@@ -11,8 +11,8 @@ Bundle-ClassPath: .
Bundle-RequiredExecutionEnvironment: J2SE-1.5
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)"
+Import-Package: org.hsqldb;version="[2.0.0,3.0.0)";resolution:=optional,
+ org.hsqldb.jdbc;version="[2.0.0,3.0.0)";resolution:=optional
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.mysql/META-INF/MANIFEST.MF b/plugins/org.eclipse.net4j.db.mysql/META-INF/MANIFEST.MF
index 6a311add55..b2d1afd0eb 100644
--- a/plugins/org.eclipse.net4j.db.mysql/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.net4j.db.mysql/META-INF/MANIFEST.MF
@@ -10,7 +10,9 @@ 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: org.osgi.framework;version="[1.0.0,2.0.0)"
+Import-Package: com.mysql.jdbc;version="[5.0.0,6.0.0)";resolution:=optional,
+ com.mysql.jdbc.jdbc2.optional;version="[5.0.0,6.0.0)";resolution:=optional,
+ 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.oracle/META-INF/MANIFEST.MF b/plugins/org.eclipse.net4j.db.oracle/META-INF/MANIFEST.MF
index 24ea2e6dc2..1c4764ca27 100644
--- a/plugins/org.eclipse.net4j.db.oracle/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.net4j.db.oracle/META-INF/MANIFEST.MF
@@ -9,7 +9,10 @@ Bundle-Activator: org.eclipse.net4j.db.oracle.internal.bundle.OM$Activator
Bundle-ActivationPolicy: lazy
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)"
+Import-Package: oracle.jdbc;resolution:=optional,
+ oracle.jdbc.driver;resolution:=optional,
+ oracle.jdbc.pool;resolution:=optional,
+ 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
Eclipse-RegisterBuddy: org.eclipse.net4j.db
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 9c9f2e0469..eaeb5e1892 100644
--- a/plugins/org.eclipse.net4j.db.postgresql/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.net4j.db.postgresql/META-INF/MANIFEST.MF
@@ -11,6 +11,9 @@ 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)";resolution:=optional,
+ org.postgresql.ds;version="[9.0.0,10.0.0)";resolution:=optional,
+ org.postgresql.ds.common;version="[9.0.0,10.0.0)";resolution:=optional
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.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 72158ca5af..69d0a170d1 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
@@ -28,21 +28,18 @@ import java.util.Set;
/**
* @author Eike Stepper
*/
-public abstract class AbstractDBTest<DATA_SOURCE extends DataSource> extends AbstractOMTest
+public abstract class AbstractDBTest extends AbstractOMTest
{
protected IDBAdapter dbAdapter;
protected IDBConnectionProvider dbConnectionProvider;
- @SuppressWarnings("unchecked")
@Override
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);
+ DataSource dataSource = createDataSource();
dbConnectionProvider = DBUtil.createConnectionProvider(dataSource);
}
@@ -53,7 +50,7 @@ public abstract class AbstractDBTest<DATA_SOURCE extends DataSource> extends Abs
protected abstract IDBAdapter createDBAdapter();
- protected abstract void configureDataSource(DATA_SOURCE dataSource);
+ protected abstract DataSource createDataSource();
protected Connection getConnection()
{
diff --git a/plugins/org.eclipse.net4j.db.tests/src/org/eclipse/net4j/db/tests/DerbyTest.java b/plugins/org.eclipse.net4j.db.tests/src/org/eclipse/net4j/db/tests/DerbyTest.java
index 23d4b260a9..52ad5ef007 100644
--- a/plugins/org.eclipse.net4j.db.tests/src/org/eclipse/net4j/db/tests/DerbyTest.java
+++ b/plugins/org.eclipse.net4j.db.tests/src/org/eclipse/net4j/db/tests/DerbyTest.java
@@ -16,12 +16,14 @@ import org.eclipse.net4j.util.io.TMPUtil;
import org.apache.derby.jdbc.EmbeddedDataSource;
+import javax.sql.DataSource;
+
import java.io.File;
/**
* @author Eike Stepper
*/
-public class DerbyTest extends AbstractDBTest<EmbeddedDataSource>
+public class DerbyTest extends AbstractDBTest
{
private File dbFolder;
@@ -32,14 +34,16 @@ public class DerbyTest extends AbstractDBTest<EmbeddedDataSource>
}
@Override
- protected void configureDataSource(EmbeddedDataSource dataSource)
+ protected DataSource createDataSource()
{
dbFolder = TMPUtil.createTempFolder("derby_"); //$NON-NLS-1$
deleteDBFolder();
msg("Using DB folder: " + dbFolder.getAbsolutePath()); //$NON-NLS-1$
+ EmbeddedDataSource dataSource = new EmbeddedDataSource();
dataSource.setDatabaseName(dbFolder.getAbsolutePath());
dataSource.setCreateDatabase("create"); //$NON-NLS-1$
+ return dataSource;
}
@Override
diff --git a/plugins/org.eclipse.net4j.db.tests/src/org/eclipse/net4j/db/tests/HsqldbTest.java b/plugins/org.eclipse.net4j.db.tests/src/org/eclipse/net4j/db/tests/HsqldbTest.java
index 66ccdbebdb..edebd301d3 100644
--- a/plugins/org.eclipse.net4j.db.tests/src/org/eclipse/net4j/db/tests/HsqldbTest.java
+++ b/plugins/org.eclipse.net4j.db.tests/src/org/eclipse/net4j/db/tests/HsqldbTest.java
@@ -4,7 +4,7 @@
* 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
*/
@@ -13,10 +13,12 @@ package org.eclipse.net4j.db.tests;
import org.eclipse.net4j.db.IDBAdapter;
import org.eclipse.net4j.db.hsqldb.HSQLDBDataSource;
+import javax.sql.DataSource;
+
/**
* @author Eike Stepper
*/
-public class HsqldbTest extends AbstractDBTest<HSQLDBDataSource>
+public class HsqldbTest extends AbstractDBTest
{
@Override
protected IDBAdapter createDBAdapter()
@@ -25,9 +27,11 @@ public class HsqldbTest extends AbstractDBTest<HSQLDBDataSource>
}
@Override
- protected void configureDataSource(HSQLDBDataSource dataSource)
+ protected DataSource createDataSource()
{
+ HSQLDBDataSource dataSource = new HSQLDBDataSource();
dataSource.setDatabase("jdbc:hsqldb:mem:dbtest"); //$NON-NLS-1$
dataSource.setUser("sa"); //$NON-NLS-1$
+ return dataSource;
}
}

Back to the top