Hi,
I am working on a POC to replace existing framework with Spring, Hibernate, OSCache in a cluster environment.
When I start the servers I see inconsistent results.
A. Server starts up fine with no errors but objects modified/deleted on one server do not notify other server.
B. One server starts up but the second server throws following error:
2007-09-06 11:02:09,269 ERROR [com.opensymphony.oscache.base.AbstractCacheAdministrator.configureStandardListeners()]:330 - <Could not initialize listener 'com.opensymphony.oscache.plugins.clustersupport.JMSBroadcastingListener'. Listener ignored.>
com.opensymphony.oscache.base.InitializationException: Initialization of the JMSBroadcastingListener failed: javax.naming.LinkException: [Root exception is javax.naming.NameNotFoundException: While trying to lookup 'com.axeda.common.cache.CacheTopic' didn't find subcontext 'common'. Resolved 'com.axeda'; remaining name 'common/cache/CacheTopic']; Link Remaining Name: 'com.axeda.common.cache.CacheTopic'
at com.opensymphony.oscache.plugins.clustersupport.JMSBroadcastingListener.initialize(JMSBroadcastingListener.java:144)
at com.opensymphony.oscache.base.AbstractCacheAdministrator.configureStandardListeners(AbstractCacheAdministrator.java:328)
Here are the versions of software’s I am using
WebLogic 9.2
Oracle 9I
Spring 2.0.6
Hibernate 3.2.4
OSCache 2.4.1
My Hibernate config is done through Spring:
Code:
<!-- Hibernate SessionFactory -->
<bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<property name="dataSource" ref="dataSource"/>
<property name="mappingResources">
<value>axeda.device.hbm.xml</value>
</property>
<!-- property name="mappingLocations">
<value>classpath*:mappings/*.hbm.xml</value>
</property-->
<property name="entityInterceptor">
<ref local="auditInterceptor"/>
</property>
<property name="hibernateProperties">
<props>
<!-- prop key="hibernate.show_sql">true</prop-->
<!-- prop key="hibernate.hbm2ddl.auto">update</prop--> <!-- validate | update | create | create-drop -->
<prop key="hibernate.order_updates">true</prop>
<prop key="hibernate.generate_statistics">true</prop>
<prop key="current_session_context_class">thread</prop>
<prop key="hibernate.cache.use_query_cache">true</prop>
<prop key="hibernate.use_identifer_rollback">true</prop>
<prop key="hibernate.default_batch_fetch_size">16</prop>
<prop key="hibernate.transaction.auto_close_session">true</prop>
<prop key="hibernate.dialect">org.hibernate.dialect.Oracle9Dialect</prop>
<prop key="hibernate.cache.region_prefix">drm-spring-hibernate-master</prop>
<prop key="hibernate.query.substitutions">true 1, false 0, Y 'y', N 'n'</prop>
<prop key="hibernate.cache.provider_class">com.opensymphony.oscache.hibernate.OSCacheProvider</prop>
<!-- prop key="hibernate.cache.provider_class">org.hibernate.cache.OSCacheProvider</prop-->
</props>
</property>
<property name="eventListeners">
<map>
<entry key="merge">
<bean class="org.springframework.orm.hibernate3.support.IdTransferringMergeEventListener"/>
</entry>
</map>
</property>
</bean>
I am using "nonstrict-read-write" cache stratagy.
oscache.property for JMS is as follows
Code:
cache.event.listeners=com.opensymphony.oscache.plugins.clustersupport.JMSBroadcastingListener
# JMS CLUSTER PROPERTIES
#
# Configuration properties for JMS clustering. See the clustering documentation
# for more information on these settings.
#
cache.cluster.jms.topic.factory=java:comp/env/ServiceLink TopicFactory Reference
cache.cluster.jms.topic.name=java:comp/env/ServiceLink CacheTopic Reference
cache.cluster.jms.node.name=dvlCluster
I would greatly appreciate if someone could guide me if I am doing something wrong here and how to fix this.