[jboss-user] [JBossCache] - JBC 1.4.1SP replication problems

jorgemoralespou_2 do-not-reply at jboss.com
Tue Nov 13 05:05:23 EST 2007


Hi,
We have a two node cluster configured with replication and a JDBCCacheLoader, as follows:


  | <server>
  |     <classpath codebase="./lib" archives="jboss-cache.jar, jgroups.jar"/>
  | 
  |   <mbean code="org.jboss.cache.TreeCache"
  |         name="jboss.cache:service=SOMServicesProvisioningCache">
  | 
  |         <depends>jboss:service=Naming</depends>
  |         <depends>jboss:service=TransactionManager</depends>
  | 	<depends>jboss.jca:name=jdbc/somservices,service=DataSourceBinding</depends>
  |         
  |         <attribute name="TransactionManagerLookupClass">org.jboss.cache.JBossTransactionManagerLookup</attribute>
  |         <attribute name="IsolationLevel">REPEATABLE_READ</attribute>
  |         <attribute name="CacheMode">REPL_SYNC</attribute>
  |         <attribute name="UseReplQueue">false</attribute>
  |         <attribute name="ReplQueueInterval">0</attribute>
  |         <attribute name="ReplQueueMaxElements">0</attribute>
  |         <attribute name="ClusterName">SOMServicesProvisioning-Cluster</attribute>
  | 
  |         <attribute name="ClusterConfig">
  | ....
  |         </attribute>
  | 
  |         <attribute name="FetchInMemoryState">true</attribute>
  |         <attribute name="InitialStateRetrievalTimeout">15000</attribute>
  |         <attribute name="SyncReplTimeout">15000</attribute>
  | 
  |         <attribute name="LockAcquisitionTimeout">10000</attribute>
  |         <attribute name="EvictionPolicyClass">org.jboss.cache.eviction.LRUPolicy</attribute>
  |         <attribute name="EvictionPolicyConfig">
  |            <config>
  |               <attribute name="wakeUpIntervalSeconds">10</attribute>
  |               <!-- Cache wide default -->
  |               <region name="/_default_">
  |                     <attribute name="maxNodes">10000</attribute>
  |                     <attribute name="timeToLiveSeconds">86400</attribute>
  |               </region>
  |            </config>
  |         </attribute>
  | 
  |         <attribute name="UseRegionBasedMarshalling">true</attribute>
  |         <attribute name="CacheLoaderConfiguration">
  |         	<config>
  |            		<passivation>false</passivation>
  |        			<preload>/</preload>
  |         		<shared>true</shared>
  |         		<cacheloader>
  |         			<class>org.jboss.cache.loader.JDBCCacheLoader</class>
  |         			<properties>
  |         			cache.jdbc.datasource=java:jdbc/somservices
  |         			cache.jdbc.table.name=services_provisioning
  |         			cache.jdbc.table.create=true
  |                                 cache.jdbc.table.drop=false
  |                                 cache.jdbc.table.primarykey=jbosscache_pk
  |                                 cache.jdbc.fqn.column=fqn
  |                                 cache.jdbc.fqn.type=varchar(255)
  |                                 cache.jdbc.node.column=node
  |                                 cache.jdbc.node.type=blob
  |                                 cache.jdbc.parent.column=parent
  | 				</properties>
  |         			<async>true</async>
  |         			<fetchPersistentState>true</fetchPersistentState>
  |         			<ignoreModifications>false</ignoreModifications>
  |         		</cacheloader>
  |         	</config>
  |         </attribute>
  |         
  |        </mbean>
  | </server>
  | 

We are having strange behaviour:

We stop one cluster node.
We modify one JBC node`s attribute.
We start the other node of the cluster.


We expect here to have the correct value, but we have the previously value, I guess that retrieved from Database. We supposed this value was updated when we did a put in the cache, and also that values should be retrieved first from the other node in the cluster, and then, if nothing found, from database.

Replication seems to be working, because if we programatically stop a region`s synchronization, and put values in that region, when we start that region`s synchronization again, all values are replicated correctly.

What are we doing wrong?

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4103994#4103994

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4103994



More information about the jboss-user mailing list