Package org.exoplatform.services.rpc.jgv3

Examples of org.exoplatform.services.rpc.jgv3.RPCServiceImpl.start()


            }
         };
         service2.registerCommand(service2Cmd);
         // starting services
         service1.start();
         service2.start();

         Object o = service1.executeCommandOnCoordinator(service1Cmd, true);
         assertEquals("service 1", o);

         // it should be executed once
View Full Code Here


         }
         catch (RPCException e)
         {
            // OK
         }
         service.start();
         assertEquals(true, service.isCoordinator());
         service.executeCommandOnAllNodes(foo, true);
         service.executeCommandOnAllNodes(foo, 10);
         service.executeCommandOnCoordinator(foo, true);
         service.executeCommandOnCoordinator(foo, 10);
View Full Code Here

               Thread.sleep(2000);
               return null;
            }
         };        
         service.registerCommand(LongTask);        
         service.start();
         try
         {
            service.executeCommandOnAllNodes(fake, true);
            fail("We expect a RPCException since the command is unknown");
         }
View Full Code Here

         assertFalse(listener1.isCoordinator);
         assertEquals(0, listener1.count);
         assertFalse(listener2.coordinatorHasChanged);
         assertFalse(listener2.isCoordinator);
         assertEquals(0, listener2.count);
         service1.start();
         assertFalse(listener1.coordinatorHasChanged);
         assertTrue(listener1.isCoordinator);
         assertEquals(1, listener1.count);
         assertFalse(listener2.coordinatorHasChanged);
         assertFalse(listener2.isCoordinator);
View Full Code Here

         RemoteCommand testTypes6 = service.registerCommand(new SingleMethodCallCommand(myService, "testTypes", char[].class));
         RemoteCommand testTypes7 = service.registerCommand(new SingleMethodCallCommand(myService, "testTypes", double[].class));
         RemoteCommand testTypes8 = service.registerCommand(new SingleMethodCallCommand(myService, "testTypes", float[].class));
         RemoteCommand testTypes9 = service.registerCommand(new SingleMethodCallCommand(myService, "testTypes", boolean[].class));

         service.start();
         List<Object> result;
        
         assertEquals("name", service.executeCommandOnCoordinator(getName, true));
         result = service.executeCommandOnAllNodes(getName, true);
         assertTrue(result != null && result.size() == 1);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.