[Logo] Terracotta Discussion Forums
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
[Expert]
Messages posted by: maxsheng  XML
Profile for maxsheng -> Messages posted by maxsheng [3]
Author Message

klalithr wrote:
Seems like you are not able to connect to the Terracotta Server for some reason. Are you sure that you have started up the Terracotta Server Array?
You have the URL as
<terracottaConfig url="192.168.1.210:9510,192.168.1.211:9510" />

Can you share the logs from these servers. Do you see any clients connecting to Terracotta? Use the developers console to get more visibility into this. 

Thank you reply! And I sure that my app can connect to the Terracotta Server. When the web app startup , I can see the information of connecting to Terracotta server.
Yes, i should use the developers console, good idea! I do it now, thanks.
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
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
 
Profile for maxsheng -> Messages posted by maxsheng [3]
Go to:   
Powered by JForum 2.1.7 © JForum Team