[infinispan-dev] cache.put(), cache.stop() and suspected member
galder at jboss.org
galder at jboss.org
Wed Jun 9 08:56:48 EDT 2010
First of all, this is a user question and you should direct them to http://community.jboss.org/en/infinispan?view=discussions&start=0
This list is to discuss development of Infinispan itself.
So, if you can open a user forum question, we can follow the conversation there :)
----- "Manni Bucau Romain" <romain.mannibucau at atosorigin.com> wrote:
> hi,
>
> i'm trying to use infinispan but when i'm running twice my program i
> have a suspected member exception.
>
> I'm doing it :
> 1) i'm running the program => P1
> 2) i'm running it again => P2
> 3) in P1 i'm writing a=>b
> 4) before the end of the a=>b command i'm closing P1 ('q')
>
> here is the code :
>
> public class InfiniSpanDemo {
> public static void main(String[] args) throws
> NotSupportedException, SystemException, SecurityException,
> IllegalStateException, RollbackException, HeuristicMixedException,
> HeuristicRollbackException, IOException {
> hello();
> }
>
> public static void hello() throws NotSupportedException,
> SystemException, SecurityException, IllegalStateException,
> RollbackException, HeuristicMixedException,
> HeuristicRollbackException, IOException {
> CacheManager mgr = new
> DefaultCacheManager(InfiniSpanDemo.class.getResourceAsStream("/config/infinispan-config.xml"));
> Cache<String, String> cache =
> mgr.getCache("distributedCache");
>
> do {
> System.out.println("type 'key=>value' to set a value or
> 'key?' to read a value to test a value or 'q' to quit\n");
> Scanner in = new Scanner(System.in);
> String action = in.nextLine();
>
> if (action.equalsIgnoreCase("q")) {
> break;
> } else if (action.contains("=>")) {
> String[] s = action.split("=>");
> cache.put(s[0], s[1]);
> for (int i = 0; i < 1000000; i++) {
> cache.put(i + "-" + s[0], i + "_" + s[1]);
> }
> } else if (action.length() > 1 &&
> action.charAt(action.length() - 1) == '?') {
> String s =action.substring(0, action.length() - 1);
> System.out.println(cache.get(s));
> } else {
> System.out.println("retry");
> }
> } while(true);
>
> cache.stop();
> mgr.stop();
> }
> }
>
> and here the exception:
> GRAVE: Execution error:
> org.infinispan.remoting.transport.jgroups.SuspectException: Suspected
> member: Jalapeno-25790
> at
> org.infinispan.remoting.transport.jgroups.JGroupsTransport.invokeRemotely(JGroupsTransport.java:419)
> at
> org.infinispan.remoting.rpc.RpcManagerImpl.invokeRemotely(RpcManagerImpl.java:100)
> at
> org.infinispan.remoting.rpc.RpcManagerImpl.invokeRemotely(RpcManagerImpl.java:124)
> at
> org.infinispan.remoting.rpc.RpcManagerImpl.invokeRemotely(RpcManagerImpl.java:229)
> at
> org.infinispan.remoting.rpc.RpcManagerImpl.invokeRemotely(RpcManagerImpl.java:216)
> at
> org.infinispan.remoting.rpc.RpcManagerImpl.broadcastRpcCommand(RpcManagerImpl.java:199)
> at
> org.infinispan.remoting.rpc.RpcManagerImpl.broadcastRpcCommand(RpcManagerImpl.java:192)
> at
> org.infinispan.interceptors.ReplicationInterceptor.handleCrudMethod(ReplicationInterceptor.java:114)
> at
> org.infinispan.interceptors.ReplicationInterceptor.visitPutKeyValueCommand(ReplicationInterceptor.java:78)
> at
> org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:76)
> at
> org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:118)
> at
> org.infinispan.interceptors.LockingInterceptor.visitPutKeyValueCommand(LockingInterceptor.java:198)
> at
> org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:76)
> at
> org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:118)
> at
> org.infinispan.interceptors.base.CommandInterceptor.handleDefault(CommandInterceptor.java:132)
> at
> org.infinispan.commands.AbstractVisitor.visitPutKeyValueCommand(AbstractVisitor.java:57)
> at
> org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:76)
> at
> org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:118)
> at
> org.infinispan.interceptors.TxInterceptor.enlistWriteAndInvokeNext(TxInterceptor.java:183)
> at
> org.infinispan.interceptors.TxInterceptor.visitPutKeyValueCommand(TxInterceptor.java:132)
> at
> org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:76)
> at
> org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:118)
> at
> org.infinispan.interceptors.InvocationContextInterceptor.handleAll(InvocationContextInterceptor.java:58)
> at
> org.infinispan.interceptors.InvocationContextInterceptor.handleDefault(InvocationContextInterceptor.java:39)
> at
> org.infinispan.commands.AbstractVisitor.visitPutKeyValueCommand(AbstractVisitor.java:57)
> at
> org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:76)
> at
> org.infinispan.interceptors.InterceptorChain.invoke(InterceptorChain.java:271)
> at org.infinispan.CacheDelegate.put(CacheDelegate.java:411)
> at org.infinispan.CacheSupport.put(CacheSupport.java:28)
> at pack.InfiniSpanDemo.hello(InfiniSpanDemo.java:36)
>
>
> ________________________________
>
> Ce message et les pi?ces jointes sont confidentiels et r?serv?s ?
> l'usage exclusif de ses destinataires. Il peut ?galement ?tre prot?g?
> par le secret professionnel. Si vous recevez ce message par erreur,
> merci d'en avertir imm?diatement l'exp?diteur et de le d?truire.
> L'int?grit? du message ne pouvant ?tre assur?e sur Internet, la
> responsabilit? du groupe Atos Origin ne pourra ?tre recherch?e quant
> au contenu de ce message. Bien que les meilleurs efforts soient faits
> pour maintenir cette transmission exempte de tout virus, l'exp?diteur
> ne donne aucune garantie ? cet ?gard et sa responsabilit? ne saurait
> ?tre recherch?e pour tout dommage r?sultant d'un virus transmis.
>
> This e-mail and the documents attached are confidential and intended
> solely for the addressee; it may also be privileged. If you receive
> this e-mail in error, please notify the sender immediately and destroy
> it. As its integrity cannot be secured on the Internet, the Atos
> Origin group liability cannot be triggered for the message content.
> Although the sender endeavours to maintain a computer virus-free
> network, the sender does not warrant that this transmission is
> virus-free and will not be liable for any damages resulting from any
> virus transmitted.
>
> _______________________________________________
> infinispan-dev mailing list
> infinispan-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/infinispan-dev
More information about the infinispan-dev
mailing list