Skip to content

Instantly share code, notes, and snippets.

@cbeer
Created December 21, 2012 21:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cbeer/4355942 to your computer and use it in GitHub Desktop.
Save cbeer/4355942 to your computer and use it in GitHub Desktop.
Akubra glacier spring configuration
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
<beans>
<bean name="org.fcrepo.server.storage.lowlevel.ILowlevelStorage"
class="org.fcrepo.server.storage.lowlevel.akubra.AkubraLowlevelStorageModule">
<constructor-arg index="0">
<map />
</constructor-arg>
<constructor-arg index="1" ref="org.fcrepo.server.Server" />
<constructor-arg index="2" type="java.lang.String"
value="org.fcrepo.server.storage.lowlevel.ILowlevelStorage" />
<property name="impl"
ref="org.fcrepo.server.storage.lowlevel.akubra.AkubraLowlevelStorage" />
</bean>
<bean
name="org.fcrepo.server.storage.lowlevel.akubra.AkubraLowlevelStorage"
class="org.fcrepo.server.storage.lowlevel.akubra.AkubraLowlevelStorage"
singleton="true">
<constructor-arg>
<description>The store of serialized Fedora objects</description>
<ref bean="glacierObjectStore" />
</constructor-arg>
<constructor-arg>
<description>The store of datastream content</description>
<ref bean="glacierObjectStore" />
</constructor-arg>
<constructor-arg value="true">
<description>if true, replaceObject calls will be done in a way
that
ensures the old content is not deleted until the new content is safely
written. If the objectStore already does this, this should be
given as
false</description>
</constructor-arg>
<constructor-arg value="true">
<description>save as above, but for datastreamStore</description>
</constructor-arg>
</bean>
<bean name="glacierObjectStore" class="org.fcrepo.akubra.glacier.GlacierBlobStore"
singleton="true">
<constructor-arg value="urn:example.org:objectStore" />
<constructor-arg>
<ref bean="glacierClient" />
</constructor-arg>
<constructor-arg value="akubra-fcrepo-3.6-vault">
<description>Vault to use</description>
</constructor-arg>
</bean>
<bean name="glacierClient" class="com.amazonaws.services.glacier.AmazonGlacierClient">
<constructor-arg>
<ref bean="glacierClientCredentials" />
</constructor-arg>
<property name="endpoint"><value>http://localhost:3000/</value></property>
</bean>
<bean name="glacierClientCredentials" class="com.amazonaws.auth.PropertiesCredentials">
<constructor-arg>
<ref bean="credentialsFile" />
</constructor-arg>
</bean>
<bean name="credentialsFile" class="java.io.File">
<constructor-arg value="aws-credentials.txt" />
</bean>
<bean name="fedoraStorageHintProvider"
class="org.fcrepo.server.storage.NullStorageHintsProvider"
singleton="true">
</bean>
</beans>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment