关于tomcat集群中hibernate中用oscache分布缓存的问题

tomcat集群中hibernate中用oscache做二级缓存,如果用read-write
,发现只更新本机的tomcat的缓存并不更新其他tomcat的,不知道为什么,

-------------------------------------------------------
GMS: address is 192.168.100.15:4272
-------------------------------------------------------

[2008-03-05 11:45:08,953]-INFO  (JavaGroupsBroadcastingListener.java:189)|A new
member at address '192.168.100.15:4272' has joined the cluster

应该说明集群配置成功了,但是为什么不

下面是我的配置

UDP(mcast_addr=231.12.21.132;mcast_port=45566;ip_ttl=32;\
mcast_send_buf_size=150000;mcast_recv_buf_size=80000):\
PING(timeout=2000;num_initial_members=3):\
MERGE2(min_interval=5000;max_interval=10000):\
FD_SOCK:VERIFY_SUSPECT(timeout=1500):\
pbcast.NAKACK(gc_lag=50;retransmit_timeout=300,600,1200,2400,4800;max_xmit_size=8192):\
UNICAST(timeout=300,600,1200,2400):\
pbcast.STABLE(desired_avg_gossip=20000):\
FRAG(frag_size=8096;down_thread=false;up_thread=false):\
pbcast.GMS(join_timeout=5000;join_retry_timeout=2000;shun=false;print_local_addr=true)
cache.cluster.multicast.ip=231.12.21.132



<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">org.hibernate.dialect.MySQL5InnoDBDialect</prop>
<prop key="hibernate.show_sql">true</prop>
<prop key="hibernate.format_sql">true</prop>
<prop key="hibernate.hbm2ddl.auto">update</prop>
<prop key="hibernate.cache.use_query_cache">true</prop>
<prop key="hibernate.cache.use_second_level_cache">true</prop>
<prop key="hibernate.cache.provider_class">
                    org.hibernate.cache.OSCacheProvider
                </prop>
<prop key="hibernate.jdbc.batch_size">20</prop>
                <prop key="hibernate.jdbc.fetch_size">25</prop>
</props>
</property>


[2008-03-05 11:56:20,875]-DEBUG (ReadWriteCache.java:85)|Cache hit: com.team.po
jo.User#0,

说明也更新缓存了,但是另外一台没反应

你可能感兴趣的:(thread,tomcat,Hibernate,cache,UP)