Skip to content
This repository has been archived by the owner on Jan 3, 2019. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
Propagate updates from recent fcrepo4 changes in:
  • Loading branch information
Andrew Woods committed Aug 11, 2014
1 parent b78416a commit 5d24c90
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 7 deletions.
Expand Up @@ -15,6 +15,7 @@
*/
package org.fcrepo.indexer;

import com.google.common.base.Strings;
import com.google.common.base.Supplier;
import com.hp.hpl.jena.rdf.model.Model;
import com.hp.hpl.jena.rdf.model.NodeIterator;
Expand Down Expand Up @@ -210,13 +211,18 @@ public void onMessage(final Message message) {
final String eventType =
message.getStringProperty(EVENT_TYPE_HEADER_NAME);
final String id = message.getStringProperty(IDENTIFIER_HEADER_NAME);
final String baseURL = message.getStringProperty(BASE_URL_HEADER_NAME);
String baseURL = message.getStringProperty(BASE_URL_HEADER_NAME);

LOGGER.debug("Discovered id: {} in message.", id);
LOGGER.debug("Discovered event type: {} in message.", eventType);
LOGGER.debug("Discovered baseURL: {} in message.", baseURL);
LOGGER.debug("Discovered properties: {} in message.", message.getStringProperty(PROPERTIES_HEADER_NAME));

// Trim trailing '/'
while (!Strings.isNullOrEmpty(baseURL) && baseURL.endsWith("/")) {
baseURL = baseURL.substring(0, baseURL.length() - 1);
}

index( baseURL + id, eventType );
} catch (final JMSException e) {
LOGGER.error("Error processing JMS event!", e);
Expand Down
Expand Up @@ -15,8 +15,5 @@
{ "classname" : "org.fcrepo.auth.common.BypassSecurityServletAuthenticationProvider" }
]
},
"query" : {
"enabled": false
},
"node-types" : ["fedora-node-types.cnd"]
}
Expand Up @@ -14,9 +14,7 @@
<bean class="org.fcrepo.jms.observer.JMSTopicPublisher"/>

<!-- translates events from the internal bus to JMS -->
<bean class="org.fcrepo.jms.headers.DefaultMessageFactory">
<constructor-arg value="http://localhost:${test.port:8080}"/>
</bean>
<bean class="org.fcrepo.jms.headers.DefaultMessageFactory"/>

<bean id="connectionFactory" class="org.apache.activemq.ActiveMQConnectionFactory"
depends-on="jmsBroker">
Expand Down
4 changes: 4 additions & 0 deletions pom.xml
Expand Up @@ -212,6 +212,10 @@
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
</exclusion>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
Expand Down

0 comments on commit 5d24c90

Please sign in to comment.