[Logo] Terracotta Discussion Forums
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
[Expert]
shiro+ehcache+terracotta, web project,can not redirect  XML
Forum Index -> Terracotta 中文社区
Author Message
maxsheng

neo

Joined: 05/01/2012 20:25:51
Messages: 3
Offline

My web project use spring mvc and shiro, and config the ehcache+terracotta as the session manager. it can work. The web application can startup, and user can login it. But when i edit a form then submit is(inside controller, saving the model data first, then return a redirect to client. ), the problem occur: explorer is always wating status, and the console of server doesn't print any thing.
If i move the cluster settings form ehcache.xml, the problem will not occur。

the spring configuration:
Code:
	
 <bean id="securityManager" class="org.apache.shiro.web.mgt.DefaultWebSecurityManager"
 		depends-on="userDao">
 		<property name="realm" ref="shiroDbRealm" />
 		<property name="sessionManager" ref="sessionManager" />
 		<property name="cacheManager" ref="cacheManager" />
 	</bean>
 	<bean id="sessionDAO"
 		class="org.apache.shiro.session.mgt.eis.EnterpriseCacheSessionDAO">
 		<property name="activeSessionsCacheName" value="shiro-activeSessionsCache" />
 	</bean>
 	<bean id="sessionManager"
 		class="org.apache.shiro.web.session.mgt.DefaultWebSessionManager">
 		<property name="sessionDAO" ref="sessionDAO" />
 	</bean>
 	<bean id="cacheManager" class="org.apache.shiro.cache.ehcache.EhCacheManager">        
 		<property name="cacheManagerConfigFile" value="classpath:ehcache-terracotta.xml" /> 
 	</bean>
 


the ehcache configuration:
Code:
 <ehcache name="clusterCache">
 	<terracottaConfig url="192.168.1.210:9510,192.168.1.211:9510" />
 	<diskStore path="java.io.tmpdir/shiro-ehcache" />
 	<defaultCache maxElementsInMemory="100000"
 		maxElementsOnDisk="1000000" eternal="false" timeToIdleSeconds="120"
 		timeToLiveSeconds="120" overflowToDisk="false" diskPersistent="false"
 		diskExpiryThreadIntervalSeconds="120">
 		<terracotta />
 	</defaultCache>
 	<cache name="shiro-activeSessionsCache" maxElementsInMemory="100000"
 		maxElementsOnDisk="1000000" eternal="true" timeToLiveSeconds="0"
 		timeToIdleSeconds="0" diskPersistent="false" overflowToDisk="false"
 		diskExpiryThreadIntervalSeconds="120">
 		<terracotta />
 	</cache>
 	<!-- Add more cache entries as desired, for example, Realm authc/authz caching: -->
 </ehcache>
 


the java coce:
Code:
 return "redirect:/base/menu/?pid=" + pid;
 

please attation: if change to Code:
return "redirect:/base/menu/";
,it will be work, no pedding or watting.

Can anyone can help me? thanks
rajoshi

seraphim

Joined: 07/04/2011 04:36:10
Messages: 1461
Offline

It seems to be some issue with your application source , Can you please share more of your application source code and how you are implementing your use case.

Rakesh Joshi
Terracotta.
teck

seraphim
[Avatar]
Joined: 05/24/2006 15:03:25
Messages: 1099
Offline

There's nothing obviously wrong with the configuration provided but it is hard to tell at which level this problem occurs.

I don't know that this information will tell me anything, but it would be good to know what terracotta and ehcache versions you are running, as well as if you're running multiple web server nodes in this test.

If you can provide a test case I am certain we can debug it. Other than that I think you're going to need to dig a little deeper to find out where the wrong path is

Tim Eck (terracotta engineer)
 
Forum Index -> Terracotta 中文社区
Go to:   
Powered by JForum 2.1.7 © JForum Team