forked from thorntail/thorntail
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SWARM-1172: add a fraction for integrate teiid product (thorntail#420)
* SWARM-1172: add a fraction for integrate teiid product * SWARM-1172: change the config api version to consistence with upstream * SWARM-1172: change teiid config api version to match the central
- Loading branch information
1 parent
dfa87f2
commit 2443857
Showing
15 changed files
with
755 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
org.jboss.teiid | ||
org.jboss.teiid.rest-service | ||
org.wildfly.swarm.configuration.teiid export=true | ||
org.wildfly.swarm.infinispan |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,151 @@ | ||
<?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/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<parent> | ||
<groupId>org.wildfly.swarm</groupId> | ||
<artifactId>wildfly-swarm</artifactId> | ||
<version>2017.4.0-SNAPSHOT</version> | ||
<relativePath>../../</relativePath> | ||
</parent> | ||
<artifactId>teiid</artifactId> | ||
<name>Teiid</name> | ||
<description>A data virtualization system that allows applications to use data from multiple, heterogeneous data stores.</description> | ||
|
||
<packaging>jar</packaging> | ||
|
||
<properties> | ||
<swarm.fraction.stability>stable</swarm.fraction.stability> | ||
<swarm.fraction.tags>Data</swarm.fraction.tags> | ||
</properties> | ||
|
||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>org.wildfly.swarm</groupId> | ||
<artifactId>container</artifactId> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.wildfly.swarm</groupId> | ||
<artifactId>infinispan</artifactId> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.wildfly.swarm</groupId> | ||
<artifactId>jca</artifactId> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.wildfly.swarm</groupId> | ||
<artifactId>teiid-config-api</artifactId> | ||
</dependency> | ||
|
||
|
||
<dependency> | ||
<groupId>javax.inject</groupId> | ||
<artifactId>javax.inject</artifactId> | ||
<scope>provided</scope> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>javax.enterprise</groupId> | ||
<artifactId>cdi-api</artifactId> | ||
<scope>provided</scope> | ||
</dependency> | ||
|
||
<!-- --> | ||
<dependency> | ||
<groupId>org.wildfly.core</groupId> | ||
<artifactId>wildfly-core-feature-pack</artifactId> | ||
<type>zip</type> | ||
<scope>provided</scope> | ||
<exclusions> | ||
<exclusion> | ||
<groupId>*</groupId> | ||
<artifactId>*</artifactId> | ||
</exclusion> | ||
</exclusions> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.wildfly</groupId> | ||
<artifactId>wildfly-servlet-feature-pack</artifactId> | ||
<type>zip</type> | ||
<scope>provided</scope> | ||
<exclusions> | ||
<exclusion> | ||
<groupId>*</groupId> | ||
<artifactId>*</artifactId> | ||
</exclusion> | ||
</exclusions> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.wildfly</groupId> | ||
<artifactId>wildfly-feature-pack</artifactId> | ||
<type>zip</type> | ||
<scope>provided</scope> | ||
<exclusions> | ||
<exclusion> | ||
<groupId>*</groupId> | ||
<artifactId>*</artifactId> | ||
</exclusion> | ||
</exclusions> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.jboss.teiid</groupId> | ||
<artifactId>teiid-wildfly-integration-feature-pack</artifactId> | ||
<type>zip</type> | ||
<scope>provided</scope> | ||
<exclusions> | ||
<exclusion> | ||
<groupId>*</groupId> | ||
<artifactId>*</artifactId> | ||
</exclusion> | ||
</exclusions> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.jboss.teiid</groupId> | ||
<artifactId>rest-service-feature-pack</artifactId> | ||
<type>zip</type> | ||
<scope>provided</scope> | ||
<exclusions> | ||
<exclusion> | ||
<groupId>*</groupId> | ||
<artifactId>*</artifactId> | ||
</exclusion> | ||
</exclusions> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.jboss.teiid.connectors</groupId> | ||
<artifactId>feature-pack-swagger</artifactId> | ||
<type>zip</type> | ||
<scope>provided</scope> | ||
<exclusions> | ||
<exclusion> | ||
<groupId>*</groupId> | ||
<artifactId>*</artifactId> | ||
</exclusion> | ||
</exclusions> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.jboss.teiid</groupId> | ||
<artifactId>teiid-client-feature-pack</artifactId> | ||
<type>zip</type> | ||
<scope>provided</scope> | ||
<exclusions> | ||
<exclusion> | ||
<groupId>*</groupId> | ||
<artifactId>*</artifactId> | ||
</exclusion> | ||
</exclusions> | ||
</dependency> | ||
|
||
|
||
</dependencies> | ||
|
||
</project> |
121 changes: 121 additions & 0 deletions
121
fractions/teiid/src/main/java/org/wildfly/swarm/teiid/TeiidFraction.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,121 @@ | ||
/** | ||
* Copyright 2015-2016 Red Hat, Inc, and individual contributors. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package org.wildfly.swarm.teiid; | ||
|
||
import org.wildfly.swarm.config.Teiid; | ||
import org.wildfly.swarm.config.runtime.AttributeDocumentation; | ||
import org.wildfly.swarm.config.teiid.Transport; | ||
import org.wildfly.swarm.spi.api.Defaultable; | ||
import org.wildfly.swarm.spi.api.Fraction; | ||
import org.wildfly.swarm.spi.api.annotations.Configurable; | ||
import org.wildfly.swarm.spi.api.annotations.MarshalDMR; | ||
import org.wildfly.swarm.spi.api.annotations.WildFlyExtension; | ||
|
||
import static org.wildfly.swarm.spi.api.Defaultable.integer; | ||
import static org.wildfly.swarm.teiid.TeiidProperties.DEFAULT_JDBC_PORT; | ||
import static org.wildfly.swarm.teiid.TeiidProperties.DEFAULT_ODBC_PORT; | ||
import static org.wildfly.swarm.teiid.TeiidProperties.PREPARED_INFINISPAN_CACHE_CONTAINER_NAME; | ||
import static org.wildfly.swarm.teiid.TeiidProperties.RESULTSET_INFINISPAN_CACHE_CONTAINER_NAME; | ||
import static org.wildfly.swarm.teiid.TeiidProperties.PREPARED_INFINISPAN_CACHE_NAME; | ||
import static org.wildfly.swarm.teiid.TeiidProperties.RESULTSET_INFINISPAN_CACHE_NAME; | ||
import static org.wildfly.swarm.teiid.TeiidProperties.JDBC_TRANSPORT_NAME; | ||
import static org.wildfly.swarm.teiid.TeiidProperties.JDBC_SOCKET_BINDING_NAME; | ||
import static org.wildfly.swarm.teiid.TeiidProperties.ODBC_TRANSPORT_NAME; | ||
import static org.wildfly.swarm.teiid.TeiidProperties.ODBC_SOCKET_BINDING_NAME; | ||
|
||
@MarshalDMR | ||
@WildFlyExtension(module = "org.jboss.teiid", classname = "org.teiid.jboss.TeiidExtension") | ||
public class TeiidFraction extends Teiid<TeiidFraction> implements Fraction<TeiidFraction> { | ||
|
||
private static final long serialVersionUID = -6070901334377803127L; | ||
|
||
@Configurable("swarm.teiid.jdbc.port") | ||
@AttributeDocumentation("Set the port for the default JDBC socket listener") | ||
private Defaultable<Integer> jdbcPort = integer(DEFAULT_JDBC_PORT); | ||
|
||
@Configurable("swarm.teiid.odbc.port") | ||
@AttributeDocumentation("Set the port for the default ODBC socket listener") | ||
private Defaultable<Integer> odbcPort = integer(DEFAULT_ODBC_PORT); | ||
|
||
public TeiidFraction() { | ||
|
||
} | ||
|
||
@Override | ||
public TeiidFraction applyDefaults() { | ||
return jdbcTransport(); | ||
} | ||
|
||
public TeiidFraction jdbcTransport() { | ||
return transport(JDBC_TRANSPORT_NAME, t -> t.socketBinding(JDBC_SOCKET_BINDING_NAME).protocol(Transport.Protocol.TEIID)); | ||
} | ||
|
||
public TeiidFraction odbcTransport() { | ||
return transport(ODBC_TRANSPORT_NAME, t -> t.socketBinding(ODBC_SOCKET_BINDING_NAME).protocol(Transport.Protocol.TEIID)); | ||
} | ||
|
||
public TeiidFraction jdbcPort(int jdbcPort) { | ||
this.jdbcPort.set(jdbcPort); | ||
return this; | ||
} | ||
|
||
public int jdbcPort() { | ||
return this.jdbcPort.get(); | ||
} | ||
|
||
public TeiidFraction odbcPort(int jdbcPort) { | ||
this.odbcPort.set(jdbcPort); | ||
return this; | ||
} | ||
|
||
public int odbcPort() { | ||
return this.odbcPort.get(); | ||
} | ||
|
||
@Override | ||
public String preparedplanCacheInfinispanContainer() { | ||
if (super.preparedplanCacheInfinispanContainer() == null) { | ||
super.preparedplanCacheInfinispanContainer(PREPARED_INFINISPAN_CACHE_CONTAINER_NAME); | ||
} | ||
return super.preparedplanCacheInfinispanContainer(); | ||
} | ||
|
||
@Override | ||
public String preparedplanCacheName() { | ||
if (super.preparedplanCacheName() == null) { | ||
super.preparedplanCacheName(PREPARED_INFINISPAN_CACHE_NAME); | ||
} | ||
return super.preparedplanCacheName(); | ||
} | ||
|
||
@Override | ||
public String resultsetCacheInfinispanContainer() { | ||
if (super.resultsetCacheInfinispanContainer() == null) { | ||
super.resultsetCacheInfinispanContainer(RESULTSET_INFINISPAN_CACHE_CONTAINER_NAME); | ||
} | ||
return super.resultsetCacheInfinispanContainer(); | ||
} | ||
|
||
@Override | ||
public String resultsetCacheName() { | ||
if (super.resultsetCacheName() == null) { | ||
super.resultsetCacheName(RESULTSET_INFINISPAN_CACHE_NAME); | ||
} | ||
return super.resultsetCacheName(); | ||
} | ||
|
||
} | ||
|
34 changes: 34 additions & 0 deletions
34
fractions/teiid/src/main/java/org/wildfly/swarm/teiid/TeiidProperties.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
/** | ||
* Copyright 2015-2016 Red Hat, Inc, and individual contributors. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package org.wildfly.swarm.teiid; | ||
|
||
public interface TeiidProperties { | ||
|
||
int DEFAULT_JDBC_PORT = 31000; | ||
int DEFAULT_ODBC_PORT = 35432; | ||
|
||
String JDBC_SOCKET_BINDING_NAME = "teiid-jdbc"; | ||
String ODBC_SOCKET_BINDING_NAME = "teiid-odbc"; | ||
|
||
String JDBC_TRANSPORT_NAME = "jdbc"; | ||
String ODBC_TRANSPORT_NAME = "odbc"; | ||
|
||
String PREPARED_INFINISPAN_CACHE_CONTAINER_NAME = "teiid-cache"; | ||
String RESULTSET_INFINISPAN_CACHE_CONTAINER_NAME = "teiid-cache"; | ||
String PREPARED_INFINISPAN_CACHE_NAME = "preparedplan"; | ||
String RESULTSET_INFINISPAN_CACHE_NAME = "resultset"; | ||
String RESULTSET_REPL_INFINISPAN_CACHE_NAME = "resultset-repl"; | ||
} |
44 changes: 44 additions & 0 deletions
44
fractions/teiid/src/main/java/org/wildfly/swarm/teiid/VDBArchive.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
/** | ||
* Copyright 2015-2016 Red Hat, Inc, and individual contributors. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package org.wildfly.swarm.teiid; | ||
|
||
import java.io.IOException; | ||
import java.io.InputStream; | ||
|
||
import org.jboss.shrinkwrap.api.Archive; | ||
import org.jboss.shrinkwrap.api.Assignable; | ||
|
||
/** | ||
* Provide a way to deploy vdb xml | ||
* @author kylin | ||
* | ||
*/ | ||
public interface VDBArchive extends Assignable, Archive<VDBArchive> { | ||
|
||
/** | ||
* Form a VDBArchive by a -vdb.xml name, the -vdb.xml either can be under class path, or under current folder | ||
* @param name | ||
* @return | ||
*/ | ||
VDBArchive vdb(String name) throws IOException; | ||
|
||
/** | ||
* Form a VDBArchive by a -vdb.xml by InputStream | ||
* @param in | ||
* @return | ||
*/ | ||
VDBArchive vdb(InputStream in) throws IOException; | ||
} |
35 changes: 35 additions & 0 deletions
35
fractions/teiid/src/main/java/org/wildfly/swarm/teiid/VDBAsset.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/** | ||
* Copyright 2015-2016 Red Hat, Inc, and individual contributors. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package org.wildfly.swarm.teiid; | ||
|
||
import java.io.InputStream; | ||
|
||
import org.jboss.shrinkwrap.api.asset.Asset; | ||
|
||
public class VDBAsset implements Asset { | ||
|
||
private InputStream in; | ||
|
||
public VDBAsset(InputStream in) { | ||
this.in = in; | ||
} | ||
|
||
@Override | ||
public InputStream openStream() { | ||
return in; | ||
} | ||
|
||
} |
Oops, something went wrong.