using a distributed cache for container ejb on AS7
inspector Jul 6, 2012 10:10 AMHi everybody,
I'm working on scalable ha-clusters and I have a domain-mode cluster in mind which uses Infinispan-distribution to be scalable. So I started to make the cache-containers use distributed-caches instead of replicated ones:
<subsystem xmlns="urn:jboss:domain:infinispan:1.3"> <cache-container name="cluster" aliases="ha-partition" default-cache="default"> <transport lock-timeout="60000"/> <!-- changed this one to be distributed --> <distributed-cache name="default" mode="SYNC" batching="true"> <locking isolation="REPEATABLE_READ"/> </distributed-cache> </cache-container> <!-- using dist instead of repl as default-cache --> <cache-container name="web" aliases="standard-session-cache" default-cache="dist" module="org.jboss.as.clustering.web.infinispan"> <transport lock-timeout="60000"/> <replicated-cache name="repl" mode="ASYNC" batching="true"> <file-store/> </replicated-cache> <replicated-cache name="sso" mode="SYNC" batching="true"/> <distributed-cache name="dist" mode="ASYNC" batching="true" l1-lifespan="0"> <file-store/> </distributed-cache> </cache-container> <!-- using dist instead of repl as default-cache --> <cache-container name="ejb" aliases="sfsb sfsb-cache" default-cache="dist" module="org.jboss.as.clustering.ejb3.infinispan"> <transport lock-timeout="60000"/> <replicated-cache name="repl" mode="ASYNC" batching="true"> <eviction strategy="LRU" max-entries="10000"/> <file-store/> </replicated-cache> <!-- ~ Clustered cache used internally by EJB subsytem for managing the client-mapping(s) of ~ the socketbinding referenced by the EJB remoting connector --> <replicated-cache name="remote-connector-client-mappings" mode="SYNC" batching="true"/> <distributed-cache name="dist" mode="ASYNC" batching="true" l1-lifespan="0"> <eviction strategy="LRU" max-entries="10000"/> <file-store/> </distributed-cache> </cache-container> <cache-container name="hibernate" default-cache="local-query" module="org.jboss.as.jpa.hibernate:4"> <!-- no changes here --> </cache-container> </subsystem>
It starts up well and seems like everything is ok. But when I try to access a stateful-session-bean the server hangs. It only hangs when I try to use a distributed cache for the container ejb. If I use a replicated cache for ejb but still use distributed caches for cluster and web everything works fine. The problem does appear independent from the number of cluster nodes.
By hanging I mean that the server won't complete the request. It will start to shutdown on CTRL+C but will not finish to. The only way to kill the server is kill -9. Attached to this post there is a file containing the stdout of the server with a thread-dump (kill -3) appended at the point where I requested a SFSB and nothing happened.
I tried this with 7.1.2.Final-tag and some newer trunk version ( 2e2f1a7dfcebebb282987d2d8e2df4407de036ac ). I have not tried it with an EAP 6 yet. The application I was using for testing purposes was the cluster-example from https://github.com/akquinet/jbosscc-as7-examples .
What am I doing wrong? Am I maybe trying something completely stupid?
-
output.zip 14.8 KB