Skip to content

Commit

Permalink
Merge branch 'SimpleDBConn' of https://github.com/rhopp/teiid
Browse files Browse the repository at this point in the history
Conflicts:
	connectors/pom.xml
  • Loading branch information
shawkins committed Dec 4, 2013
2 parents d687525 + a1273e3 commit 8fe21dd
Show file tree
Hide file tree
Showing 28 changed files with 1,779 additions and 2 deletions.
2 changes: 2 additions & 0 deletions build/assembly/embedded-dist.xml
Expand Up @@ -104,6 +104,7 @@
<include>org.jboss.teiid.connectors:translator-jpa</include>
<include>org.jboss.teiid.connectors:translator-object</include>
<include>org.jboss.teiid.connectors:translator-google</include>
<include>org.jboss.teiid.connectors:translator-simpledb</include>
<include>org.jboss.teiid.connectors:google-api</include>
<include>org.jboss.teiid.connectors:translator-mongodb</include>
<include>org.jboss.teiid.connectors:mongodb-api</include>
Expand Down Expand Up @@ -162,6 +163,7 @@
<include>org.jboss.teiid.connectors:connector-google</include>
<include>org.jboss.teiid.connectors:connector-mongodb</include>
<include>org.jboss.teiid.connectors:connector-cassandra</include>
<include>org.jboss.teiid.connectors:connector-simpledb</include>
</includes>

<binaries>
Expand Down
72 changes: 71 additions & 1 deletion build/assembly/jboss-as7/dist.xml
Expand Up @@ -377,6 +377,30 @@
<fileMode>0644</fileMode>
</binaries>
</moduleSet>
<moduleSet>
<includeSubModules>true</includeSubModules>
<useAllReactorProjects>true</useAllReactorProjects>

<includes>
<include>org.jboss.teiid.connectors:connector-simpledb</include>
</includes>

<binaries>
<outputFileNameMapping>teiid-${module.artifactId}.rar</outputFileNameMapping>
<includeDependencies>true</includeDependencies>
<unpack>true</unpack>
<dependencySets>
<dependencySet>
<useProjectArtifact>true</useProjectArtifact>
<unpack>false</unpack>
<useTransitiveDependencies>false</useTransitiveDependencies>
<useDefaultExcludes>true</useDefaultExcludes>
</dependencySet>
</dependencySets>
<outputDirectory>modules/system/layers/base/org/jboss/teiid/resource-adapter/simpledb/main</outputDirectory>
<fileMode>0644</fileMode>
</binaries>
</moduleSet>

<moduleSet>
<includeSubModules>true</includeSubModules>
Expand Down Expand Up @@ -780,8 +804,54 @@
</binaries>

</moduleSet>
<moduleSet>
<includeSubModules>true</includeSubModules>
<useAllReactorProjects>true</useAllReactorProjects>

<includes>
<include>org.jboss.teiid.connectors:translator-simpledb</include>
</includes>

<binaries>
<includeDependencies>false</includeDependencies>
<unpack>false</unpack>
<dependencySets>
<dependencySet>
<useProjectArtifact>true</useProjectArtifact>
<unpack>false</unpack>
<useTransitiveDependencies>false</useTransitiveDependencies>
<useDefaultExcludes>true</useDefaultExcludes>
</dependencySet>
</dependencySets>
<outputDirectory>modules/system/layers/base/org/jboss/teiid/translator/simpledb/main</outputDirectory>
<fileMode>0644</fileMode>
</binaries>
</moduleSet>

<moduleSet>
<moduleSet>
<includeSubModules>true</includeSubModules>
<useAllReactorProjects>true</useAllReactorProjects>

<includes>
<include>org.jboss.teiid.connectors:simpledb-api</include>
</includes>

<binaries>
<includeDependencies>true</includeDependencies>
<unpack>false</unpack>
<dependencySets>
<dependencySet>
<useProjectArtifact>true</useProjectArtifact>
<unpack>false</unpack>
<useTransitiveDependencies>false</useTransitiveDependencies>
<useDefaultExcludes>true</useDefaultExcludes>
</dependencySet>
</dependencySets>
<outputDirectory>modules/system/layers/base/org/jboss/teiid/translator/simpledb/api/main</outputDirectory>
<fileMode>0644</fileMode>
</binaries>
</moduleSet>
<moduleSet>
<includeSubModules>true</includeSubModules>
<useAllReactorProjects>true</useAllReactorProjects>

Expand Down
5 changes: 4 additions & 1 deletion build/kits/embedded/lib/dependencies.txt
Expand Up @@ -24,4 +24,7 @@ Third-party google dependencies:
gdata*

Third-party mongo dependencies:
mongo-java-driver
mongo-java-driver

Third-party simpledb dependencies:
aws-java-sdk
@@ -0,0 +1,16 @@
<module xmlns="urn:jboss:module:1.1" name="org.jboss.teiid.resource-adapter.simpledb">

<resources>
<resource-root path="connector-simpledb-${project.version}.jar"/>
<resource-root path="."/>
<!-- Insert resources here -->
</resources>

<dependencies>
<module name="javax.api"/>
<module name="javax.resource.api"/>
<module name="org.jboss.teiid.common-core"/>
<module name="org.jboss.teiid.api"/>
<module name="org.jboss.teiid.translator.simpledb.api"/>
</dependencies>
</module>
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<module xmlns="urn:jboss:module:1.0" name="org.jboss.teiid.translator.simpledb.api">
<resources>
<resource-root path="simpledb-api-${project.version}.jar" />
<resource-root path="aws-java-sdk-1.5.7.jar" />
<!-- Insert resources here -->
</resources>


<dependencies>
<module name="javax.api"/>
<module name="javax.resource.api"/>
<module name="org.jboss.teiid.common-core" />
<module name="org.jboss.teiid.api" />
<module name="org.apache.commons.logging" />
<module name="org.apache.httpcomponents" />
<module name="org.apache.commons.codec" />
</dependencies>
</module>
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<module xmlns="urn:jboss:module:1.0" name="org.jboss.teiid.translator.simpledb">
<resources>
<resource-root path="translator-simpledb-${project.version}.jar" />
<!-- Insert resources here -->
</resources>


<dependencies>
<module name="javax.api"/>
<module name="javax.resource.api"/>
<module name="org.jboss.teiid.common-core" />
<module name="org.jboss.teiid.api" />
<module name="org.jboss.teiid.translator.simpledb.api" />
</dependencies>
</module>
Expand Up @@ -272,6 +272,9 @@
</resource-adapter>
<resource-adapter id="cassandra">
<module slot="main" id="org.jboss.teiid.resource-adapter.cassandra"/>
</resource-adapter>
<resource-adapter id="simpledb">
<module slot="main" id="org.jboss.teiid.resource-adapter.simpledb"/>
</resource-adapter>
</resource-adapters>
</subsystem>
Expand Down Expand Up @@ -360,6 +363,7 @@
<translator name="sap-nw-gateway" module="org.jboss.teiid.translator.odata"/>
<translator name="mongodb" module="org.jboss.teiid.translator.mongodb"/>
<translator name="cassandra" module="org.jboss.teiid.translator.cassandra"/>
<translator name="simpledb" module="org.jboss.teiid.translator.simpledb"/>
</subsystem>
<subsystem xmlns="urn:jboss:domain:threads:1.1">
<bounded-queue-thread-pool name="teiid-async">
Expand Down
95 changes: 95 additions & 0 deletions connectors/connector-simpledb/pom.xml
@@ -0,0 +1,95 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<artifactId>connectors</artifactId>
<groupId>org.jboss.teiid</groupId>
<version>8.7.0.Alpha1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>connector-simpledb</artifactId>
<groupId>org.jboss.teiid.connectors</groupId>
<name>SimpleDB Connector</name>
<description>This connector reads data from SimpleDB database</description>

<dependencies>
<dependency>
<groupId>org.jboss.teiid</groupId>
<artifactId>teiid-api</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.jboss.teiid</groupId>
<artifactId>teiid-common-core</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.resource</groupId>
<artifactId>connector-api</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.jboss.teiid.connectors</groupId>
<artifactId>simpledb-api</artifactId>
<version>${project.version}</version>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<extensions>true</extensions>
<executions>
<execution>
<id>bundle</id>
<phase>process-classes</phase>
<goals>
<goal>bundle</goal>
</goals>
</execution>
</executions>
<configuration>
<classifier>lib</classifier>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-rar-plugin</artifactId>
<executions>
<execution>
<id>build_rar</id>
<phase>install</phase>
<goals>
<goal>rar</goal>
</goals>
<configuration>
<finalName>${project.artifactId}-${project.version}</finalName>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-install-plugin</artifactId>
<executions>
<execution>
<id>install_rar</id>
<phase>install</phase>
<goals>
<goal>install-file</goal>
</goals>
<configuration>
<file> ${project.build.directory}/${project.artifactId}-${project.version}.rar</file>
<artifactId>${project.artifactId}</artifactId>
<groupId>${project.groupId}</groupId>
<packaging>rar</packaging>
<version>${project.version}</version>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
@@ -0,0 +1,46 @@
/*
* JBoss, Home of Professional Open Source.
* See the COPYRIGHT.txt file distributed with this work for information
* regarding copyright ownership. Some portions may be licensed
* to Red Hat, Inc. under one or more contributor license agreements.
*
* This library 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 library 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 library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301 USA.
*/
package org.teiid.resource.adapter.simpledb;

import javax.resource.ResourceException;

import org.teiid.resource.adpter.simpledb.SimpleDBConnection;
import org.teiid.resource.adpter.simpledb.SimpleDbAPIClass;
import org.teiid.resource.spi.BasicConnection;

public class SimpleDBConnectionImpl extends BasicConnection implements
SimpleDBConnection {

private SimpleDbAPIClass apiClass;

public SimpleDBConnectionImpl(String accessKey, String secretAccessKey) {
apiClass = new SimpleDbAPIClass(accessKey, secretAccessKey);
}

public void close() throws ResourceException {

}

public SimpleDbAPIClass getAPIClass() {
return apiClass;
}
}

0 comments on commit 8fe21dd

Please sign in to comment.