forked from cbeer/fcrepo-jms-indexer-solr
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
wield a giant hammer and add an integration test.
- Loading branch information
Showing
11 changed files
with
296 additions
and
11 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
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
File renamed without changes.
16 changes: 16 additions & 0 deletions
16
src/test/resources/config/test_infinispan_configuration.xml
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,16 @@ | ||
<infinispan xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="urn:infinispan:config:5.2 http://www.infinispan.org/schemas/infinispan-config-5.2.xsd" | ||
xmlns="urn:infinispan:config:5.2"> | ||
|
||
<global> | ||
|
||
</global> | ||
|
||
<default> | ||
|
||
<transaction | ||
transactionManagerLookupClass="org.infinispan.transaction.lookup.GenericTransactionManagerLookup" | ||
transactionMode="TRANSACTIONAL" lockingMode="PESSIMISTIC"/> | ||
</default> | ||
|
||
</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,28 @@ | ||
{ | ||
"name" : "repo", | ||
"jndiName" : "", | ||
"workspaces" : { | ||
"predefined" : ["fedora"], | ||
"default" : "fedora", | ||
"allowCreation" : true | ||
}, | ||
"storage" : { | ||
"cacheName" : "FedoraRepository", | ||
"cacheConfiguration" : "config/test_infinispan_configuration.xml", | ||
"binaryStorage" : { | ||
"type" : "cache", | ||
"dataCacheName" : "FedoraRepository", | ||
"metadataCacheName" : "FedoraRepository" | ||
} | ||
}, | ||
"security" : { | ||
"anonymous" : { | ||
"roles" : ["readonly","readwrite","admin"], | ||
"useOnFailedLogin" : false | ||
}, | ||
"providers" : [ | ||
{ "classname" : "servlet" } | ||
] | ||
}, | ||
"node-types" : ["fedora-node-types.cnd"] | ||
} |
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,24 @@ | ||
<?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" | ||
xsi:schemaLocation=" | ||
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd | ||
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd"> | ||
|
||
<!-- Context that suports event management, including the internal | ||
event bus (fedoraInternalEventBus) --> | ||
|
||
<context:annotation-config/> | ||
|
||
<!-- listener that moves JCR Events to the Fedora internal event bus --> | ||
<bean class="org.fcrepo.observer.SimpleObserver"/> | ||
|
||
<!-- used by bean above to filter which events get put on the bus --> | ||
<bean name="fedoraEventFilter" class="org.fcrepo.observer.DefaultFilter"/> | ||
|
||
<!-- Fedora's lightweight internal event bus. Currently memory-resident.--> | ||
<bean name="fedoraInternalEventBus" class="com.google.common.eventbus.EventBus"/> | ||
|
||
|
||
</beans> |
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,30 @@ | ||
<?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" | ||
xsi:schemaLocation=" | ||
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd | ||
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd"> | ||
|
||
<!-- Context that suports JMS publication--> | ||
|
||
<context:annotation-config/> | ||
|
||
<!-- publishes events from the internal bus to JMS --> | ||
<bean class="org.fcrepo.observer.JMSTopicPublisher"/> | ||
|
||
<!-- translates events from the internal bus to JMS, in Atom format --> | ||
<bean class="org.fcrepo.messaging.legacy.LegacyMethodEventFactory" /> | ||
|
||
|
||
<bean id="connectionFactory" class="org.apache.activemq.ActiveMQConnectionFactory" | ||
depends-on="jmsBroker"> | ||
<property name="brokerURL" value="vm://localhost"/> | ||
</bean> | ||
|
||
<bean name="jmsBroker" class="org.apache.activemq.xbean.BrokerFactoryBean"> | ||
<property name="config" value="classpath:/config/activemq.xml"/> | ||
<property name="start" value="true"/> | ||
</bean> | ||
|
||
</beans> |
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,15 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<beans xmlns="http://www.springframework.org/schema/beans" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation=" | ||
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd"> | ||
|
||
<!-- Master context for the test application. --> | ||
|
||
<import resource="classpath:/spring-test/repo.xml"/> | ||
<import resource="classpath:/spring-test/rest.xml"/> | ||
<import resource="classpath:/spring-test/eventing.xml"/> | ||
<import resource="classpath:/spring-test/jms.xml"/> | ||
<import resource="classpath:/spring-test/solr-indexer.xml"/> | ||
|
||
</beans> |
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,25 @@ | ||
<?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" | ||
xsi:schemaLocation=" | ||
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd | ||
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd"> | ||
|
||
<!-- Context that supports the actual ModeShape JCR itself --> | ||
|
||
<context:annotation-config/> | ||
|
||
<bean name="modeshapeRepofactory" class="org.fcrepo.spring.ModeShapeRepositoryFactoryBean"/> | ||
|
||
<bean class="org.modeshape.jcr.JcrRepositoryFactory"/> | ||
|
||
<bean class="org.springframework.core.io.ClassPathResource"> | ||
<qualifier type="ModeShapeRepositoryConfiguration"/> | ||
<constructor-arg type="String" value="config/test_repository.json"/> | ||
</bean> | ||
|
||
<bean class="org.fcrepo.services.ObjectService"/> | ||
<bean class="org.fcrepo.services.DatastreamService"/> | ||
|
||
</beans> |
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,59 @@ | ||
<?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:jaxrs="http://cxf.apache.org/jaxrs" | ||
xmlns:util="http://www.springframework.org/schema/util" | ||
xsi:schemaLocation=" | ||
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd | ||
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd | ||
http://cxf.apache.org/jaxrs http://cxf.apache.org/schemas/jaxrs.xsd | ||
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd"> | ||
|
||
<import resource="classpath:META-INF/cxf/cxf.xml"/> | ||
|
||
<context:property-placeholder/> | ||
|
||
<!-- Context that houses JAX-RS Resources that compose the API | ||
as well as some utility gear. --> | ||
|
||
<context:annotation-config/> | ||
|
||
<jaxrs:server address="http://localhost:${test.port:8080}/rest"> | ||
<jaxrs:serviceBeans> | ||
<bean class="org.fcrepo.api.legacy.FedoraRepository"/> | ||
<bean class="org.fcrepo.api.legacy.FedoraDatastreams"/> | ||
<bean class="org.fcrepo.api.legacy.FedoraIdentifiers"/> | ||
<bean class="org.fcrepo.api.legacy.FedoraNamespaces"/> | ||
<bean class="org.fcrepo.api.legacy.FedoraObjects"/> | ||
</jaxrs:serviceBeans> | ||
<jaxrs:extensionMappings> | ||
<entry key="json" value="application/json"/> | ||
<entry key="xml" value="application/xml"/> | ||
</jaxrs:extensionMappings> | ||
<jaxrs:providers> | ||
<bean class="org.fcrepo.exceptionhandlers.PathNotFoundExceptionMapper"/> | ||
<bean class="org.fcrepo.exceptionhandlers.AccessControlExceptionMapper"/> | ||
<bean class="org.fcrepo.exceptionhandlers.WildcardExceptionMapper"> | ||
<property name="showStackTrace" value="true"/> | ||
</bean> | ||
<bean class="org.apache.cxf.jaxrs.provider.JAXBElementProvider"> | ||
<property name="marshallerProperties"> | ||
<util:map> | ||
<entry key="jaxb.formatted.output"> | ||
<value type="java.lang.Boolean">true</value> | ||
</entry> | ||
</util:map> | ||
</property> | ||
</bean> | ||
<!--<bean class="org.apache.cxf.jaxrs.provider.json.JSONProvider"> | ||
<property name="ignoreNamespaces" value="true"/> | ||
</bean>--> | ||
</jaxrs:providers> | ||
</jaxrs:server> | ||
|
||
<!-- Mints PIDs--> | ||
<bean class="org.fcrepo.identifiers.UUIDPidMinter"/> | ||
|
||
|
||
</beans> |
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