Package java.rmi

Examples of java.rmi.ConnectException


          }
        throw t;
      }
    else if (a != null && a.equals("throw_cex"))
      {
        throw new ConnectException("Connect exception message");
      }
    else

      return "'" + a + "' and '" + b + "'";
  }
View Full Code Here


       /* 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

        try {
            out = new BufferedOutputStream(s.getOutputStream());
            in = new BufferedInputStream(s.getInputStream());
        } catch (IOException ioe) {
            // rmi.40=Unable to establish connection to server
            throw new ConnectException(Messages.getString("rmi.40"), ioe); //$NON-NLS-1$
        }
        serverProtocolAck();
    }
View Full Code Here

     * @return the registry service
     * @throws RemoteException for any error
     */
    public Registry getRegistry(Map properties) throws RemoteException {
        if (properties == null || properties.get(PROVIDER_URI) == null) {
            throw new ConnectException(PROVIDER_URI + " not specified");
        }
        Registry registry;
        String uri = (String) properties.get(PROVIDER_URI);
        String principal = (String) properties.get(SECURITY_PRINCIPAL);
        String credentials = (String) properties.get(SECURITY_CREDENTIALS);
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

        try {
            out = new BufferedOutputStream(s.getOutputStream());
            in = new BufferedInputStream(s.getInputStream());
        } catch (IOException ioe) {
            // rmi.40=Unable to establish connection to server
            throw new ConnectException(Messages.getString("rmi.40"), ioe); //$NON-NLS-1$
        }
        serverProtocolAck();
    }
View Full Code Here

        try {
            out = new BufferedOutputStream(s.getOutputStream());
            in = new BufferedInputStream(s.getInputStream());
        } catch (IOException ioe) {
            // rmi.40=Unable to establish connection to server
            throw new ConnectException(Messages.getString("rmi.40"), ioe); //$NON-NLS-1$
        }
        serverProtocolAck();
    }
View Full Code Here

    /**
     * {@link java.rmi.ConnectException#ConnectException(java.lang.String, java.lang.Exception)}.
     */
    public void testConnectExceptionStringException() {
        NullPointerException npe = new NullPointerException();
        ConnectException e = new ConnectException("fixture", npe);
        assertTrue(e.getMessage().indexOf("fixture") > -1);
        assertSame(npe, e.getCause());
        assertSame(npe, e.detail);
    }
View Full Code Here

    /**
     * {@link java.rmi.ConnectException#ConnectException(java.lang.String)}.
     */
    public void testConnectExceptionString() {
        ConnectException e = new ConnectException("fixture");
        assertEquals("fixture", e.getMessage());
        assertNull(e.getCause());
        assertNull(e.detail);
    }
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.