diff options
author | afinkbein | 2008-09-26 16:55:52 +0000 |
---|---|---|
committer | afinkbein | 2008-09-26 16:55:52 +0000 |
commit | 45ae0759756602177f2f04997443a17344aad3f9 (patch) | |
tree | 3bfa1b88db8e7f62ce73a667ecbfbb1d3fd98a11 | |
parent | 9294af7cc122f2b232acbe80b1b9d05fd762bdb5 (diff) | |
download | org.eclipse.osee-45ae0759756602177f2f04997443a17344aad3f9.tar.gz org.eclipse.osee-45ae0759756602177f2f04997443a17344aad3f9.tar.xz org.eclipse.osee-45ae0759756602177f2f04997443a17344aad3f9.zip |
7 files changed, 127 insertions, 0 deletions
diff --git a/org.eclipse.osee.framework.oracle/.classpath b/org.eclipse.osee.framework.oracle/.classpath new file mode 100644 index 00000000000..02159672985 --- /dev/null +++ b/org.eclipse.osee.framework.oracle/.classpath @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/org.eclipse.osee.framework.oracle/.project b/org.eclipse.osee.framework.oracle/.project new file mode 100644 index 00000000000..d1bb835576a --- /dev/null +++ b/org.eclipse.osee.framework.oracle/.project @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.osee.framework.oracle</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/org.eclipse.osee.framework.oracle/.settings/org.eclipse.pde.core.prefs b/org.eclipse.osee.framework.oracle/.settings/org.eclipse.pde.core.prefs new file mode 100644 index 00000000000..4a37d8d4ca1 --- /dev/null +++ b/org.eclipse.osee.framework.oracle/.settings/org.eclipse.pde.core.prefs @@ -0,0 +1,4 @@ +#Mon Jul 14 14:55:33 MST 2008
+eclipse.preferences.version=1
+pluginProject.extensions=false
+resolve.requirebundle=false
diff --git a/org.eclipse.osee.framework.oracle/META-INF/MANIFEST.MF b/org.eclipse.osee.framework.oracle/META-INF/MANIFEST.MF new file mode 100644 index 00000000000..4b1ec9a90b1 --- /dev/null +++ b/org.eclipse.osee.framework.oracle/META-INF/MANIFEST.MF @@ -0,0 +1,13 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: Oracle Db Connector Plug-in (Incubation) +Bundle-SymbolicName: org.eclipse.osee.framework.oracle +Bundle-Version: 0.4.0.qualifier +Bundle-Activator: org.eclipse.osee.framework.oracle.Activator +Bundle-Vendor: Eclipse.org +Bundle-ActivationPolicy: lazy +OseeEarlyStart: true +Import-Package: oracle.jdbc.driver;resolution:=optional, + org.eclipse.osee.framework.db.connection, + org.osgi.framework;version="1.3.0" +Bundle-RequiredExecutionEnvironment: JavaSE-1.6 diff --git a/org.eclipse.osee.framework.oracle/build.properties b/org.eclipse.osee.framework.oracle/build.properties new file mode 100644 index 00000000000..41eb6ade2b4 --- /dev/null +++ b/org.eclipse.osee.framework.oracle/build.properties @@ -0,0 +1,4 @@ +source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .
diff --git a/org.eclipse.osee.framework.oracle/src/org/eclipse/osee/framework/oracle/Activator.java b/org.eclipse.osee.framework.oracle/src/org/eclipse/osee/framework/oracle/Activator.java new file mode 100644 index 00000000000..6476c9af430 --- /dev/null +++ b/org.eclipse.osee.framework.oracle/src/org/eclipse/osee/framework/oracle/Activator.java @@ -0,0 +1,38 @@ +/*******************************************************************************
+ * Copyright (c) 2004, 2007 Boeing.
+ * All rights reserved. This program and the accompanying materials
+ * 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:
+ * Boeing - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.osee.framework.oracle;
+
+import org.eclipse.osee.framework.db.connection.IConnection;
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceRegistration;
+
+public class Activator implements BundleActivator {
+
+ private ServiceRegistration registration;
+
+ /*
+ * (non-Javadoc)
+ * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
+ */
+ public void start(BundleContext context) throws Exception {
+ registration = context.registerService(IConnection.class.getName(), new OracleConnection(), null);
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
+ */
+ public void stop(BundleContext context) throws Exception {
+ registration.unregister();
+ }
+
+}
diff --git a/org.eclipse.osee.framework.oracle/src/org/eclipse/osee/framework/oracle/OracleConnection.java b/org.eclipse.osee.framework.oracle/src/org/eclipse/osee/framework/oracle/OracleConnection.java new file mode 100644 index 00000000000..64d6f27f6b7 --- /dev/null +++ b/org.eclipse.osee.framework.oracle/src/org/eclipse/osee/framework/oracle/OracleConnection.java @@ -0,0 +1,33 @@ +/*******************************************************************************
+ * Copyright (c) 2004, 2007 Boeing.
+ * All rights reserved. This program and the accompanying materials
+ * 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:
+ * Boeing - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.osee.framework.oracle;
+
+import java.sql.Connection;
+import java.sql.DriverManager;
+import java.sql.SQLException;
+import java.util.Properties;
+import org.eclipse.osee.framework.db.connection.IConnection;
+
+public class OracleConnection implements IConnection {
+
+ private static final String driver = "oracle.jdbc.driver.OracleDriver";
+
+ public Connection getConnection(Properties properties, String connectionURL) throws ClassNotFoundException, SQLException {
+ Class.forName(driver);
+ Connection connection = DriverManager.getConnection(connectionURL, properties);
+ return connection;
+ }
+
+ public String getDriver() {
+ return driver;
+ }
+
+}
|