Esempio 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();
 }
Esempio 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();
 }
Esempio 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;
 }