Skip to Main Content

Integration

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Spring bean and coherence cache initialization go into a loop

974632Nov 19 2012
Hi ,

Coherence is able to resolve my Spring bean. However I see the following repeatedly when DCS starts up (see highlighted part below). The cache configuration is read repeatedly from my coherence-cache-config.xml in the application. I have tried renaming this file as well. Still does not work.

Need suggestions to resolve this issue urgently. Thanks.

Oracle Coherence Version 3.6.1.0 Build 19636
Grid Edition: Development mode
Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.

2012-11-16 11:17:45.820/7.257 Oracle Coherence GE 3.6.1.0 <D4> (thread=Thread-2, member=n/a): TCMP bound to /100.168.0.100:8080 using SystemSocketProvider
2012-11-16 11:18:16.112/37.549 Oracle Coherence GE 3.6.1.0 <Info> (thread=Cluster, member=n/a): Created a new cluster "myprojCoherenceCluster" with Member(Id=1, Timestamp=2012-11-16 11:17:45.824, Address=100.168.0.100:8080, MachineId=26725, Location=process:84968, Role=ApacheCatalinaStartupBootstrap, Edition=Grid Edition, Mode=Development, CpuCount=8, SocketCount=8) UID=0xC0A800650000013B08F052E068651F90
2012-11-16 11:18:16.115/37.552 Oracle Coherence GE 3.6.1.0 <Info> (thread=Thread-2, member=n/a): Started cluster Name=myprojCoherenceCluster

WellKnownAddressList(Size=2,
WKA{Address=100.168.0.100, Port=8080}
WKA{Address=100.168.0.100, Port=8080}
)

MasterMemberSet
(
ThisMember=Member(Id=1, Timestamp=2012-11-16 11:17:45.824, Address=100.168.0.100:8080, MachineId=26725, Location=process:84968, Role=ApacheCatalinaStartupBootstrap)
OldestMember=Member(Id=1, Timestamp=2012-11-16 11:17:45.824, Address=100.168.0.100:8080, MachineId=26725, Location=process:84968, Role=ApacheCatalinaStartupBootstrap)
ActualMemberSet=MemberSet(Size=1, BitSetCount=2
Member(Id=1, Timestamp=2012-11-16 11:17:45.824, Address=100.168.0.100:8080, MachineId=26725, Location=process:84968, Role=ApacheCatalinaStartupBootstrap)
)
RecycleMillis=1200000
RecycleSet=MemberSet(Size=0, BitSetCount=0
)
)

TcpRing{Connections=[]}
IpMonitor{AddressListSize=0}

2012-11-16 11:18:16.134/37.571 Oracle Coherence GE 3.6.1.0 <D5> (thread=Invocation:Management, member=1): Service Management joined the cluster with senior service member 1
2*012-11-16 11:18:16.190/37.627 Oracle Coherence GE 3.6.1.0 <Info> (thread=Thread-2, member=1): Loaded cache configuration from "file:/Users/radhika_b/Documents/workspace/abc/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/myproj/WEB-INF/classes/coherence-cache-config.xml"*
2012-11-16 11:18:17.452/38.889 Oracle Coherence GE 3.6.1.0 <Info> (thread=Thread-2, member=1): Loaded cache configuration from "file:/Users/radhika_b/Documents/workspace/abc/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/myproj/WEB-INF/classes/coherence-cache-config.xml"
2012-11-16 11:18:18.660/40.097 Oracle Coherence GE 3.6.1.0 <Info> (thread=Thread-2, member=1): Loaded cache configuration from "file:/Users/radhika_b/Documents/workspace/abc/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/myproj/WEB-INF/classes/coherence-cache-config.xml"
2012-11-16 11:18:19.741/41.178 Oracle Coherence GE 3.6.1.0 <Info> (thread=Thread-2, member=1): Loaded cache configuration from "file:/Users/radhika_b/Documents/workspace/abc/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/myproj/WEB-INF/classes/coherence-cache-config.xml"
and so on.......



Please find some of the config file snippets below:

I have the following in my spring config file - applicationContext-beans.xml:
<bean id="myCacheBean"
class="com.tangosol.coherence.hibernate.HibernateCacheStore"
scope="prototype">
<property name="sessionFactory" ref="sessionFactory" />
</bean>
tangosol-coherence-override.xml - (I am using coherence-cache-config.xml which is the default name):
<configurable-cache-factory-config>
<class-name system-property="tangosol.coherence.cachefactory">
com.tangosol.coherence.spring.SpringAwareCacheFactory
</class-name>
<init-params>
<init-param id="1">
<param-type>java.lang.String</param-type>
<param-value system-property="tangosol.coherence.springconfig">applicationContext-beans.xml</param-value>
</init-param>
</init-params>
</configurable-cache-factory-config>
coherence-cache-config.xml:

<cache-mapping>
<cache-name>myCache</cache-name>
<scheme-name>replicated-db-backed</scheme-name>
</cache-mapping>

<replicated-scheme>
<scheme-name>replicated-db-backed</scheme-name>
<service-name>ReplicatedCache</service-name>
<backing-map-scheme>
<read-write-backing-map-scheme>
<internal-cache-scheme>
<local-scheme></local-scheme>
</internal-cache-scheme>
<cachestore-scheme>
<scheme-name>myCacheScheme</scheme-name>
<class-scheme>
<class-name>
spring-bean:myCacheBean
</class-name>
<init-param>
<param-name>setEntityName</param-name>
<param-value>myCache</param-value>
</init-param>
</class-scheme>
</cachestore-scheme>
</read-write-backing-map-scheme>
</backing-map-scheme>
</replicated-scheme>
Am I missing something or is something wrong in the configuration above. Appreciate any pointers, Thanks in advance.



Also, I see

INFO: Initializing Spring root WebApplicationContext

printed first and then the above Coherence DCS output. Looks like Spring comes into picture first, As per your suggestion it does look like its going to indefinite loop waiting for
com.tangosol.coherence.spring.SpringAwareCacheFactory to be initialized?
Can you please suggest how to get rid of this problem? Thanks.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 17 2012
Added on Nov 19 2012
0 comments
329 views