Ejemplo n.º 1
0
 private int expectedResults() throws Exception {
   Object o = (new InitialContext()).lookup("MyMessageChecker");
   MessageCheckerHome home =
       (MessageCheckerHome) PortableRemoteObject.narrow(o, MessageCheckerHome.class);
   MessageChecker checker = home.create();
   return checker.expectedResults();
 }
Ejemplo n.º 2
0
 private void notifyAndWait() throws Exception {
   Object o = (new InitialContext()).lookup("MyMessageChecker");
   MessageCheckerHome home =
       (MessageCheckerHome) PortableRemoteObject.narrow(o, MessageCheckerHome.class);
   MessageChecker checker = home.create();
   checker.notifyAndWait();
 }
Ejemplo n.º 3
0
 private boolean checkResults(int num) throws Exception {
   Object o = (new InitialContext()).lookup("MyMessageChecker");
   MessageCheckerHome home =
       (MessageCheckerHome) PortableRemoteObject.narrow(o, MessageCheckerHome.class);
   MessageChecker checker = home.create();
   int result = checker.getMessageCount();
   return result == num;
 }