Skip to content

Commit

Permalink
Adding JMS indexer, configured to use fuseki
Browse files Browse the repository at this point in the history
  • Loading branch information
escowles committed Sep 24, 2013
1 parent bbf5c3b commit 493d2fd
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pom.xml
Expand Up @@ -89,6 +89,11 @@
<artifactId>fcrepo-sequencer-archives</artifactId>
<version>${project.parent.version}</version>
</dependency>
<dependency>
<groupId>org.fcrepo</groupId>
<artifactId>fcrepo-jms-indexer-core</artifactId>
<version>${project.parent.version}</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
Expand Down
50 changes: 50 additions & 0 deletions src/main/resources/spring/jms_indexer.xml
@@ -0,0 +1,50 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:lang="http://www.springframework.org/schema/lang"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd
http://www.springframework.org/schema/lang http://www.springframework.org/schema/lang/spring-lang-2.0.xsd">

<!-- sparql-update indexer -->
<bean id="sparqlUpdate" class="org.fcrepo.indexer.SparqlIndexer">
<!-- base URL for triplestore subjects, PID will be appended -->
<property name="prefix" value="http://localhost:${port:8080}"/>

<!-- fuseki -->
<property name="queryBase" value="http://localhost:${fuseki.port:3030}/test/query"/>
<property name="updateBase" value="http://localhost:${fuseki.port:3030}/test/update"/>
<property name="formUpdates">
<value type="java.lang.Boolean">false</value>
</property>
</bean>

<!-- Message Driven POJO (MDP) that manages individual indexers -->
<bean id="indexerGroup" class="org.fcrepo.indexer.IndexerGroup">
<property name="repositoryURL" value="http://localhost:${port:8080}/rest" />
<property name="indexers">
<set>
<ref bean="sparqlUpdate"/>
</set>
</property>
</bean>

<context:property-placeholder/>

<context:annotation-config/>

<!-- ActiveMQ queue to listen for events -->
<bean id="destination" class="org.apache.activemq.command.ActiveMQTopic">
<constructor-arg value="fedora" />
</bean>

<!-- and this is the message listener container -->
<bean id="jmsContainer" class="org.springframework.jms.listener.DefaultMessageListenerContainer">
<property name="connectionFactory" ref="connectionFactory"/>
<property name="destination" ref="destination"/>
<property name="messageListener" ref="indexerGroup" />
<property name="sessionTransacted" value="true"/>
</bean>

</beans>
1 change: 1 addition & 0 deletions src/main/resources/spring/master.xml
Expand Up @@ -13,5 +13,6 @@
<import resource="classpath:/spring/optional_modules.xml"/>
<import resource="classpath:/spring/rest.xml"/>
<import resource="classpath:/spring/transactions.xml"/>
<import resource="classpath:/spring/jms_indexer.xml"/>

</beans>

0 comments on commit 493d2fd

Please sign in to comment.