cancel
Showing results for 
Search instead for 
Did you mean: 

Content Replication

kamal1387
Champ in-the-making
Champ in-the-making
I have the following replication xml <?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>


<beans>
   <!–
    This file is not included in the application context by default.
    If you include this file, please ensure that you review the sample
    beans contained here.
    –>
  
   <bean id="backupContentStore"
         class="org.alfresco.repo.content.filestore.FileContentStore">
      <constructor-arg>
         <value>D:/DATA/replication</value>
      </constructor-arg>
   </bean>


<bean id="primaryContentStoreBackupComponent"
         class="org.alfresco.repo.content.replication.ContentStoreReplicator"
         depends-on="fileContentStore, backupContentStore"
         init-method="start">
      <!– content source –>
      <property name="sourceStore">
          <ref bean="fileContentStore" />
      </property>
      <!– content target –>
      <property name="targetStore">
           <ref bean="backupContentStore" />
      </property>
      <!– set to 'false' to perform a single pass before quitting –>
      <property name="runContinuously">
          <value>true</value>
      </property>
      <!– time between passes –>
      <property name="waitTime">
          <value>1</value>
      </property>
   </bean>




   <bean id="replicatingContentStore"
         class="org.alfresco.repo.content.replication.ReplicatingContentStore" >
      <!– the preferred store for reads and writes –>
      <property name="primaryStore">
         <ref bean="fileContentStore" />
      </property>
      <!– example of possible secondary store configuration –>
      <property name="secondaryStores">
         <list>
            <ref bean="backupContentStore" />
         </list>
      </property>
      <!– enable content missing from the primary store to be pulled in from the secondary stores –>
      <property name="inbound">
         <value>true</value>
      </property>
      <!– enable replication from the primary to the secondary stores –>
      <property name="outbound">
         <value>true</value>
      </property>
      <!– this is required if outbound replication is active, otherwise not –>
      <property name="transactionService">
         <ref bean="transactionComponent" />
      </property>
     

<!– This is required for proper transactional behaviour during outbound replication –>
      <property name="retryingTransactionHelper">
         <ref bean="retryingTransactionHelper"/>
      </property>
      <!– set this to force outbound replication to be asynchronous –>
      <!– Not normally used.  See class javadocs.

      <property name="outboundThreadPoolExecutor">
         <ref bean="threadPoolExecutor" />
      </property>–>
     
  </bean>

</beans>


But the D:/DATA/replication gets replicated data only after alfresco restart..
how do we schedule the replication..
2 REPLIES 2

openpj
Elite Collaborator
Elite Collaborator
I think that you need to activate the replicating Spring context in the extension root folder:
/tomcat/shared/classes/alfresco/extension/replicating-content-services-context.xml.sample

You have to rename the file in the following way:
/tomcat/shared/classes/alfresco/extension/replicating-content-services-context.xml
And you have to try to restart Alfresco, now you should have the replication for contents not only at bootstrap time but also at application runtime.

Hope this helps.

kamal1387
Champ in-the-making
Champ in-the-making
Yes the above mentioned code in my reply is from replicating-content-services-context.xml and still its only replicating at bootstrap not at regular intervals