-
1. Re: HA-JNDI in AS7?
pferraro Apr 6, 2012 1:05 PM (in response to ranga033)Can you describe your use case? If you just need a distributed directory - you can use an Infinispan replicated cache directly in your application very easily:
e.g.
@Resource(lookup = "java:jboss/infinispan/cache/my-container/my-cache")
private java.util.ConcurrentMap myCache;
... all using standard APIs.
-
-
3. Re: HA-JNDI in AS7?
hwangarias Oct 18, 2012 3:43 AM (in response to hwangarias)I answer myself just to be sure I'm pointing in correct direction
The Jboss-7.1.1 way is using an infinispan cache as shared pool to share resources between cluster nodes using for example with the configuration present in standalone-ha.xml
<cache-container name="cluster" aliases="ha-partition" default-cache="default"> <transport lock-timeout="60000"/> <replicated-cache name="default" mode="SYNC" batching="true"> <locking isolation="REPEATABLE_READ"/> </replicated-cache> </cache-container> the code:
@Resource(lookup="java:jboss/infinispan/container/cluster")
org.jboss.as.clustering.infinispan.DefaultEmbeddedCacheManager
privatecontainer;
container.getCache().put(key, value);
This is the way to share resources in cluster?
Thank you!
-
4. Re: HA-JNDI in AS7?
pferraro Nov 8, 2012 6:41 AM (in response to hwangarias)My comment from April 2nd should answer your question already.