Package java.rmi

Examples of java.rmi.ConnectException


       /* 01) any instance of a java.rmi.RemoteException except those
          that can be classified as either a bad invocation or bad
          object exception. */
       indefiniteException01 =
     new ConnectException("LeaseExpirationTest");
       indefiniteOwner01 =
     new FailingOpCountingOwner(indefiniteException01, 0, renewGrant);

       // 02) any instance of a java.lang.OutOfMemoryError
       indefiniteException02 = new OutOfMemoryError("LeaseExpirationTest");
View Full Code Here


            setConstraints(clientConstraints);
      }
      uproxy = newUproxy;
     
  } catch (ConnectException e) {
      throw new ConnectException("activation failed", e);
  } catch (RemoteException e) {
      throw new ConnectIOException("activation failed", e);
  } catch (UnknownObjectException e) {
      throw new NoSuchObjectException("object not registered");
  } catch (ActivationException e) {
View Full Code Here

  private void doTestInvokesMethodOnEjbInstanceWithConnectExceptionWithRefresh(
      boolean lookupHomeOnStartup, boolean cacheHome) throws Exception {

    final RemoteInterface ejb = mock(RemoteInterface.class);
    given(ejb.targetMethod()).willThrow(new ConnectException(""));

    int lookupCount = 2;
    if (!cacheHome) {
      lookupCount++;
      if (lookupHomeOnStartup) {
View Full Code Here

            throw ex;
         }
      }
      // Should not happen
      if( cs == null )
         throw new ConnectException("Failed to obtain a socket, tries="+retryCount);
      return cs;
   }
View Full Code Here

      boolean lookupHomeOnStartup, boolean cacheHome) throws Exception {

    MockControl ejbControl = MockControl.createControl(RemoteInterface.class);
    final RemoteInterface ejb = (RemoteInterface) ejbControl.getMock();
    ejb.targetMethod();
    ejbControl.setThrowable(new ConnectException(""), 2);
    ejb.remove();
    ejbControl.setVoidCallable(2);
    ejbControl.replay();

    int lookupCount = 2;
View Full Code Here

/* 499 */         throw ex;
/*     */       }
/*     */     }
/*     */
/* 503 */     if (cs == null)
/* 504 */       throw new ConnectException("Failed to obtain a socket, tries=" + this.retryCount);
/* 505 */     return cs;
/*     */   }
View Full Code Here

/*     */       catch (Exception ignored) {
/*     */       }
/*     */       finally {
/* 674 */         socket.socket = null;
/*     */       }
/* 676 */       throw new ConnectException("Failure during invoke", ex);
/*     */     }
/*     */
/* 680 */     if (!returnConnection(socket))
/*     */     {
/* 683 */       if (trace)
View Full Code Here

      } catch (RemoteException e) {
        errors++;
      }
    }
    if (errors > 0) {
      throw new ConnectException("One of the connected servers couldn't be reached");
    }
  }
View Full Code Here

TOP

Related Classes of java.rmi.ConnectException

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.