Skip to content

Commit

Permalink
Update camel code to use camel-http4 component (#15)
Browse files Browse the repository at this point in the history
Addresses: Islandora/documentation#362

This also makes it easier to configure endpoints with HTTPS schemes.
  • Loading branch information
acoburn authored and dannylamb committed Sep 6, 2016
1 parent f4b6493 commit d2b08d5
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 11 deletions.
4 changes: 4 additions & 0 deletions indexing/islandora-indexing-triplestore/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@

<name>Islandora CLAW Triplestore Indexer</name>
<properties>
<islandora.osgi.import.pkg>
org.apache.camel.component.http4,
org.apache.activemq.camel.component
</islandora.osgi.import.pkg>
<islandora.osgi.export.pkg>ca.islandora.indexing.triplestore</islandora.osgi.export.pkg>
</properties>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ jms.brokerUrl=tcp://localhost:61616
input.stream=activemq:queue:islandora/triplestore/index

# The base URL of the triplestore being used.
triplestore.baseUrl=localhost:8080/bigdata/namespace/kb/sparql
triplestore.baseUrl=http://localhost:8080/bigdata/namespace/kb/sparql
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,12 @@ public void configure() {
from("direct:triplestoreUpsert")
.routeId("islandoraTripelstoreIndexerUpsert")
.process(new SparqlUpdateProcessor())
.to("http4://{{triplestore.baseUrl}}");
.to("{{triplestore.baseUrl}}");

from("direct:triplestoreDelete")
.routeId("islandoraTripelstoreIndexerDelete")
.process(new SparqlDeleteProcessor())
.to("http4://{{triplestore.baseUrl}}");
.to("{{triplestore.baseUrl}}");

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
<property name="brokerURL" value="${jms.brokerUrl}"/>
</bean>

<bean id="http" class="org.apache.camel.component.http4.HttpComponent"/>
<bean id="https" class="org.apache.camel.component.http4.HttpComponent"/>

<camelContext id="IslandoraTriplestoreIndexer" xmlns="http://camel.apache.org/schema/blueprint">
<package>ca.islandora.indexing.triplestore</package>
</camelContext>
Expand Down
6 changes: 3 additions & 3 deletions karaf/src/main/resources/features.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<feature version="${camel.version}">camel</feature>
<feature version="${camel.version}">camel-cache</feature>
<feature version="${camel.version}">camel-jsonpath</feature>
<feature version="${camel.version}">camel-http</feature>
<feature version="${camel.version}">camel-http4</feature>
<feature version="${camel.version}">camel-script</feature>
<feature version="${camel.version}">camel-script-javascript</feature>
<feature version="${camel.version}">camel-base64</feature>
Expand All @@ -50,7 +50,7 @@
<feature prerequisite="true">wrap</feature>
<feature version="${cxf.version}">cxf</feature>
<feature version="${camel.version}">camel</feature>
<feature version="${camel.version}">camel-http</feature>
<feature version="${camel.version}">camel-http4</feature>
<feature version="${camel.version}">camel-servlet</feature>
<feature version="${camel.version}">camel-jsonpath</feature>
<feature version="${camel.version}">camel-cxf</feature>
Expand All @@ -73,7 +73,7 @@
<feature prerequisite="true">wrap</feature>
<feature version="${cxf.version}">cxf</feature>
<feature version="${camel.version}">camel</feature>
<feature version="${camel.version}">camel-http</feature>
<feature version="${camel.version}">camel-http4</feature>
<feature version="${camel.version}">camel-servlet</feature>
<feature version="${camel.version}">camel-jsonpath</feature>
<feature version="${camel.version}">camel-cxf</feature>
Expand Down
7 changes: 2 additions & 5 deletions parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,6 @@
<artifactId>camel-exec</artifactId>
<version>${camel.version}</version>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-http</artifactId>
<version>${camel.version}</version>
</dependency>
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-camel</artifactId>
Expand Down Expand Up @@ -152,11 +147,13 @@
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>${slf4j.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>${log4j.version}</version>
<scope>test</scope>
</dependency>
<!-- Testing & Camel Plugin -->
<dependency>
Expand Down

0 comments on commit d2b08d5

Please sign in to comment.