hi guys

I am using flex with spring blazeds and hibernate (enabled with secondary level cache:Ehcache)

when i click a button on my flex screen it makes a database call and gets the data and loads on screen. (I am using <mx:remoteobject> on flex side).
Since i am using ehcahce the data should be stored in the cache after it is retrieved from the database. (If i am correct)

when i click the same button again for the second time, it should NoT make a datbaase call,it should get it from cache (if my understanding is correct). In my case its making a database call the second time as well.

In my ehcache.xml i have my hibernate entity objects defined like this
Code:
<cacheManagerPeerProviderFactory class="net.sf.ehcache.distribution.RMICacheManagerPeerProviderFactory"
	properties="peerDiscovery=automatic, multicastGroupAddress=230.0.0.1, multicastGroupPort=4446, timeToLive=32"/>
		
<cacheManagerPeerListenerFactory class="net.sf.ehcache.distribution.RMICacheManagerPeerListenerFactory"
		properties="hostName=localhost, port=40001, socketTimeoutMillis=2000"/>

<!-- my entity object-->
<cache name="com.hibernate.entity.Customer" maxElementsInMemory="10000" eternal="false" timeToIdleSeconds="300"
	       timeToLiveSeconds="600" overflowToDisk="false"/>
Am i missing something?

Any help would be appreciated.

thanks.