Package org.infinispan.remoting

Examples of org.infinispan.remoting.RemoteException


         for (Map.Entry<Address, Response> rsp : rsps.entrySet()) {
            if (rsp.getValue() instanceof CacheNotFoundResponse) {
               if (globalConfiguration.transport().strictPeerToPeer()) {
                  String message = String.format("Cache %s has not been started on node %s", cacheName,
                        rsp.getKey());
                  throw new RemoteException(message, new NamedCacheNotFoundException(cacheName, message));
               }
            }
         }
      }
   }
View Full Code Here


      RpcManager mockManager = mock(RpcManager.class, AdditionalAnswers.delegatesTo(realManager));

      doAnswer(new Answer() {
         @Override
         public Object answer(InvocationOnMock invocationOnMock) throws Throwable {
            throw new RemoteException("FAIL", new TimeoutException());
         }
         // Only throw exception on the first call just in case if test calls it more than once to fail properly
      }).doAnswer(AdditionalAnswers.delegatesTo(realManager)).when(mockManager).invokeRemotely(anyCollection(), any(ReplicableCommand.class), any(RpcOptions.class));

      TestingUtil.replaceComponent(nonOwnerCache, RpcManager.class, mockManager, true);
View Full Code Here

         for (Map.Entry<Address, Response> rsp : rsps.entrySet()) {
            if (rsp.getValue() instanceof CacheNotFoundResponse) {
               if (globalConfiguration.transport().strictPeerToPeer()) {
                  String message = String.format("Cache %s has not been started on node %s", cacheName,
                        rsp.getKey());
                  throw new RemoteException(message, new NamedCacheNotFoundException(cacheName, message));
               }
            }
         }
      }
   }
View Full Code Here

TOP

Related Classes of org.infinispan.remoting.RemoteException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.