diff --git a/mysql/org.eclipse.gemini.dbaccess.mysql/.classpath b/mysql/org.eclipse.gemini.dbaccess.mysql/.classpath
new file mode 100644
index 0000000..8a8f166
--- /dev/null
+++ b/mysql/org.eclipse.gemini.dbaccess.mysql/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/mysql/org.eclipse.gemini.dbaccess.mysql/.project b/mysql/org.eclipse.gemini.dbaccess.mysql/.project
new file mode 100644
index 0000000..68a55a2
--- /dev/null
+++ b/mysql/org.eclipse.gemini.dbaccess.mysql/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.gemini.dbaccess.mysql</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/mysql/org.eclipse.gemini.dbaccess.mysql/.settings/org.eclipse.jdt.core.prefs b/mysql/org.eclipse.gemini.dbaccess.mysql/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..da83d59
--- /dev/null
+++ b/mysql/org.eclipse.gemini.dbaccess.mysql/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,8 @@
+#Mon Oct 18 08:48:45 VET 2010
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.6
diff --git a/mysql/org.eclipse.gemini.dbaccess.mysql/.settings/org.eclipse.pde.core.prefs b/mysql/org.eclipse.gemini.dbaccess.mysql/.settings/org.eclipse.pde.core.prefs
new file mode 100644
index 0000000..55ec074
--- /dev/null
+++ b/mysql/org.eclipse.gemini.dbaccess.mysql/.settings/org.eclipse.pde.core.prefs
@@ -0,0 +1,5 @@
+#Mon Oct 18 08:48:45 VET 2010
+eclipse.preferences.version=1
+pluginProject.equinox=false
+pluginProject.extensions=false
+resolve.requirebundle=false
diff --git a/mysql/org.eclipse.gemini.dbaccess.mysql/META-INF/MANIFEST.MF b/mysql/org.eclipse.gemini.dbaccess.mysql/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..b455dc4
--- /dev/null
+++ b/mysql/org.eclipse.gemini.dbaccess.mysql/META-INF/MANIFEST.MF
@@ -0,0 +1,14 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: MySQL (Incubation)
+Bundle-SymbolicName: org.eclipse.gemini.dbaccess.mysql
+Bundle-Version: 1.0.0.M2
+Bundle-Activator: org.eclipse.gemini.dbaccess.mysql.Activator
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Import-Package: com.mysql.jdbc,
+ com.mysql.jdbc.jdbc2.optional,
+ javax.sql,
+ org.osgi.framework;version="[1.3,2)",
+ org.osgi.service.jdbc;version="[1.0,2.0)"
+Export-Package: org.eclipse.gemini.dbaccess.mysql.service,
+ org.osgi.service.jdbc;version="1.0"
\ No newline at end of file
diff --git a/mysql/org.eclipse.gemini.dbaccess.mysql/build.properties b/mysql/org.eclipse.gemini.dbaccess.mysql/build.properties
new file mode 100644
index 0000000..4386468
--- /dev/null
+++ b/mysql/org.eclipse.gemini.dbaccess.mysql/build.properties
@@ -0,0 +1,4 @@
+source.. = src/
+output.. = bin/
+bin.includes = .,\
+ META-INF/
\ No newline at end of file
diff --git a/mysql/org.eclipse.gemini.dbaccess.mysql/src/org/eclipse/gemini/dbaccess/mysql/Activator.java b/mysql/org.eclipse.gemini.dbaccess.mysql/src/org/eclipse/gemini/dbaccess/mysql/Activator.java
new file mode 100644
index 0000000..e708369
--- /dev/null
+++ b/mysql/org.eclipse.gemini.dbaccess.mysql/src/org/eclipse/gemini/dbaccess/mysql/Activator.java
@@ -0,0 +1,38 @@
+package org.eclipse.gemini.dbaccess.mysql;
+
+import java.util.Hashtable;
+
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceRegistration;
+
+import org.osgi.service.jdbc.DataSourceFactory;
+
+import org.eclipse.gemini.dbaccess.mysql.service.MySqlServiceProperties;
+
+/**
+ * Creates a {@link DataSourceFactory} for MySQL JDBC driver.
+ */
+public class Activator implements BundleActivator {
+
+ private ServiceRegistration dsfService;
+
+ public void start(BundleContext context) throws Exception {
+ System.out.println("Gemini DBAccess - MySQL JDBC starting");
+ Hashtable<String,String> props = new Hashtable<String,String>();
+ props.put(DataSourceFactory.OSGI_JDBC_DRIVER_NAME,
+ MySqlServiceProperties.MYSQL_DRIVER_NAME);
+
+ dsfService = context.registerService(
+ DataSourceFactory.class.getName(),
+ new ClientDataSourceFactory(),
+ props);
+
+ }
+
+ public void stop(BundleContext context) throws Exception {
+ if (dsfService != null) {
+ dsfService.unregister();
+ }
+ }
+}
diff --git a/mysql/org.eclipse.gemini.dbaccess.mysql/src/org/eclipse/gemini/dbaccess/mysql/ClientDataSourceFactory.java b/mysql/org.eclipse.gemini.dbaccess.mysql/src/org/eclipse/gemini/dbaccess/mysql/ClientDataSourceFactory.java
new file mode 100644
index 0000000..370ba81
--- /dev/null
+++ b/mysql/org.eclipse.gemini.dbaccess.mysql/src/org/eclipse/gemini/dbaccess/mysql/ClientDataSourceFactory.java
@@ -0,0 +1,60 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Oracle.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * and Apache License v2.0 which accompanies this distribution.
+ * The Eclipse Public License is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * and the Apache License v2.0 is available at
+ * http://www.opensource.org/licenses/apache2.0.php.
+ * You may elect to redistribute this code under either of these licenses.
+ *
+ * Contributors:
+ * mkeith - Template for JDBC driver support
+ * tware - MySQL driver class additions
+ ******************************************************************************/
+
+package org.eclipse.gemini.dbaccess.mysql;
+
+import java.util.Properties;
+
+import java.sql.Driver;
+import java.sql.SQLException;
+
+import javax.sql.ConnectionPoolDataSource;
+import javax.sql.DataSource;
+import javax.sql.XADataSource;
+
+import org.eclipse.gemini.dbaccess.AbstractDataSourceFactory;
+
+import com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource;
+import com.mysql.jdbc.jdbc2.optional.MysqlDataSource;
+import com.mysql.jdbc.jdbc2.optional.MysqlXADataSource;
+
+/**
+ * A factory for creating MySQL data sources. The properties specified
+ * in the create methods determine how the created object is configured.
+ *
+ * This service also supports a URL-based data source.
+ */
+public class ClientDataSourceFactory extends AbstractDataSourceFactory {
+
+ public ClientDataSourceFactory() {}
+
+ public abstract Driver newJdbcDriver() throws SQLException {
+ return new com.mysql.jdbc.Driver();
+ }
+
+ public abstract DataSource newDataSource() throws SQLException {
+ return new MysqlDataSource();
+ }
+
+ public abstract ConnectionPoolDataSource newConnectionPoolDataSource()
+ throws SQLException {
+ return new MysqlConnectionPoolDataSource();
+ }
+
+ public abstract XADataSource newXADataSource() throws SQLException {
+ return new MysqlXADataSource();
+ }
+}
diff --git a/mysql/org.eclipse.gemini.dbaccess.mysql/src/org/eclipse/gemini/dbaccess/mysql/service/MySqlServiceProperties.java b/mysql/org.eclipse.gemini.dbaccess.mysql/src/org/eclipse/gemini/dbaccess/mysql/service/MySqlServiceProperties.java
new file mode 100644
index 0000000..245bd3c
--- /dev/null
+++ b/mysql/org.eclipse.gemini.dbaccess.mysql/src/org/eclipse/gemini/dbaccess/mysql/service/MySqlServiceProperties.java
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Oracle.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * and Apache License v2.0 which accompanies this distribution.
+ * The Eclipse Public License is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * and the Apache License v2.0 is available at
+ * http://www.opensource.org/licenses/apache2.0.php.
+ * You may elect to redistribute this code under either of these licenses.
+ *
+ * Contributors:
+ * tware - Added MySQl constants
+ * mkeith - Refactorization
+ ******************************************************************************/
+
+package org.eclipse.gemini.dbaccess.mysql.service;
+
+/**
+ * Service property values for MySQL data source factory services.
+ */
+public class MySqlServiceProperties {
+
+ // Register data source factory service under the driver class name
+ public static final String MYSQL_DRIVER_CLASS = "com.mysql.jdbc.Driver";
+
+ // All MySQL DataSourceFactory services will have their
+ // DataSourceFactory.OSGI_JDBC_DRIVER_NAME service property set to this driver name
+ public static final String MYSQL_DRIVER_NAME = "MySQL";
+
+}