cancel
Showing results for 
Search instead for 
Did you mean: 

Problems for editing files in a clustered environment

alfiasco
Champ in-the-making
Champ in-the-making
I have followed the instructions for HA Config found here:

http://wiki.alfresco.com/wiki/High_Availability_Configuration_V1.4

I have placed the dir.root directory on a shared filesystem (with NFS)

I have 2 clusters.

When I add a node on the cluster1, this node is added on the node 2.
When I delete a node on the cluster1, this node is delete on the node 2.
So, it works fine when i add or delete some nodes. But when I edit a file on a cluster, this file on the second cluster is not modified.

Do I need to configure Hibernate to avoid this problem ?
1 REPLY 1

alfiasco
Champ in-the-making
Champ in-the-making
My config files :

ehcache-custom.xml
<?xml version='1.0' encoding='UTF-8'?>
<ehcache>
    <!– defaults –>
    <diskStore
        path="java.io.tmpdir"/>

    <cacheManagerPeerProviderFactory
        class="net.sf.ehcache.distribution.RMICacheManagerPeerProviderFactory"
        properties="peerDiscovery=automatic, multicastGroupAddress=230.0.0.1,
                    multicastGroupPort=4446"/>
               
               
    <cacheManagerPeerListenerFactory
        class="net.sf.ehcache.distribution.RMICacheManagerPeerListenerFactory"/>

    <defaultCache
        maxElementsInMemory="5000"
        eternal="true"
        timeToIdleSeconds="0"
        timeToLiveSeconds="0"
        overflowToDisk="false"
        >

        <cacheEventListenerFactory
           class="net.sf.ehcache.distribution.RMICacheReplicatorFactory"
           properties="replicateAsynchronously=false, replicatePuts=false,replicateUpdates=true,replicateUpdatesViaCopy=false,replicateRemovals=true"/>
    </defaultCache>
    <!– Hibernate usage –>
    <cache
        name="org.hibernate.cache.StandardQueryCache"
        maxElementsInMemory="50"
        eternal="true"
        overflowToDisk="false"
        />
[…]
</ehcache>


index-tracking-context.xml
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>

<beans>

    <!– Schedule index tracking every 30s –>
    <bean id="indexTrackerTrigger" class="org.alfresco.util.CronTriggerBean">
        <property name="jobDetail">
            <bean class="org.springframework.scheduling.quartz.JobDetailBean">
                <property name="jobClass">
                    <value>org.alfresco.repo.node.index.IndexRecoveryJob</value>
                </property>
                <property name="jobDataAsMap">
                    <map>
                        <entry key="indexRecoveryComponent">
                            <ref bean="indexTrackerComponent" />
                        </entry>
                    </map>
                </property>
            </bean>
        </property>
        <property name="scheduler">
            <ref bean="schedulerFactory" />
        </property>
        <property name="cronExpression">
            <value>0,10,20,30,40,50 * * * * ?</value>
        </property>
    </bean>
   
    <bean
          id="indexTrackerComponent"
          class="org.alfresco.repo.node.index.IndexRemoteTransactionTracker"
          parent="indexRecoveryComponentBase">
        <property name="remoteOnly">
            <value>true</value>
        </property>
    </bean>

    <!– Forces the reindexing of nodes where content may have been missing before –>
    <!–
       This component can be triggered at intervals where asynchronous content sharing
       between clustered servers has been set up.
    –>
    <bean id="missingContentReindexTrigger" class="org.alfresco.util.TriggerBean">
        <property name="jobDetail">
            <bean class="org.springframework.scheduling.quartz.JobDetailBean">
                <property name="jobClass">
                    <value>org.alfresco.repo.node.index.IndexRecoveryJob</value>
                </property>
                <property name="jobDataAsMap">
                    <map>
                        <entry key="indexRecoveryComponent">
                            <ref bean="missingContentReindexComponent" />
                        </entry>
                    </map>
                </property>
            </bean>
        </property>
        <property name="scheduler">
            <ref bean="schedulerFactory" />
        </property>
        <!– Give the server 5 minutes and then check for missing content –>
        <property name="startDelayMinutes">
            <value>5</value>
        </property>
        <property name="repeatCount">
            <value>0</value>
        </property>
    </bean>

</beans>

custom-cache-strategies.properties

#
# The cache strategy
#
cache.strategy=transactional

custom-hibernate-dialect.properties

hibernate.jdbc.use_streams_for_binary=true
hibernate.show_sql=false
hibernate.hbm2ddl.auto=update
hibernate.cache.use_query_cache=true
hibernate.max_fetch_depth=10
hibernate.cache.provider_class=org.alfresco.repo.cache.InternalEhCacheManagerFactoryBean
hibernate.cache.use_second_level_cache=true
hibernate.default_batch_fetch_size=1
hibernate.jdbc.batch_size=32
hibernate.connection.release_mode=auto
hibernate.connection.isolation=4
hibernate.dialect=org.hibernate.dialect.MySQLInnoDBDialect

I would like to know how to configure the "multicastGroupAddress" in ehcache-custom.xml. Do I need to create a group on my network ?