Package java.rmi

Examples of java.rmi.UnmarshalException


    // purposefully inherit javadoc from parent class
    protected Throwable[] createExceptionArray() {

       Throwable[] throwArray = new Throwable[4];
       throwArray[3] =
     new UnmarshalException("Second UnmarshalException");
       throwArray[2] =
     new ConnectIOException("ConnectIOException");
       throwArray[1] =
     new RemoteException("RemoteException");
       throwArray[0] =
     new UnmarshalException("First UnmarshalException");

       return throwArray;
    }
View Full Code Here


       throwArray[2] =
     new ConnectIOException("ConnectIOException");
       throwArray[1] =
     new RemoteException("RemoteException");
       throwArray[0] =
     new UnmarshalException("UnmarshalException");

       return throwArray;
    }
View Full Code Here

      ok = true;
  } catch (Exception e) {
      boolean retry = false;
      if (e instanceof IOException) {
    if (!versionMismatch && request.getDeliveryStatus()) {
        e = new UnmarshalException(
       "exception unmarshalling response", e);
    } else {
        e = wrapSafeIOException((IOException) e, oe);
        retry = !versionMismatch;
    }
      } else if (e instanceof ClassNotFoundException) {
    e = new UnmarshalException("error unmarshalling response", e);
      }
      return new Failure(e,
    !versionMismatch || !request.getDeliveryStatus());
  } finally {
      if (!ok) {
View Full Code Here

      return null;

  default:
      // REMIND: close the response input stream?
      // REMIND: Do we really want this failure mode here?
      return new UnmarshalException("unexpected invocation status: " +
            Integer.toHexString(status));
  }
    }
View Full Code Here

      typeHashes.put(className, new Long(value));
      return false// new class
  } else {
      if (hash.longValue() != value) {
    final String msg = "Class mismatch: " + className;
    final UnmarshalException ue = new UnmarshalException(msg);
    opsLogger.log(Levels.FAILED, msg, ue);
    throw ue;
      }
  }
  return true;    // match
View Full Code Here

     */
    private UnmarshalException brokenTxn(TransactionManager mgr, long id,
           Exception nested)
  throws UnmarshalException
    {
  final UnmarshalException ue = new UnmarshalException(
            "Outrigger has a transaction with this id(" + id + "), but can't" +
      "unmarshal its copy of manager to confirm it is the same " +
      "transaction",
      nested);
 
View Full Code Here

      // try to unmarshal client lease
      Lease unmarshalledLease;
      try {
    unmarshalledLease = (Lease) marshalledClientLease.get(false);
      } catch (IOException e) {
    UnmarshalException t = new UnmarshalException(
        "ClientLeaseWrapper.renew:Could not unmarshal client " +
        "lease for renewal", e);
    failedRenewal(t);
    throw t;
      } catch (ClassNotFoundException e) {
    UnmarshalException t = new UnmarshalException(
        "ClientLeaseWrapper.renew:Could not unmarshal client " +
        "lease for renewal", e);
    failedRenewal(t);
    throw t;
      }
View Full Code Here

    fromImpl = true;
      }
  } catch (RuntimeException e) {
      t = e;
  } catch (Exception e) {
      t = new UnmarshalException("unmarshalling method/arguments", e);
  } catch (Throwable tt) {
      t = tt;
  } finally {
      if (in != null) {
    try {
View Full Code Here

        in.useCodebaseAnnotations();
        verifier = (TrustVerifier) in.readObject();
        in.close();
    }
      } catch (IOException e) {
    throw new UnmarshalException("remarshalling verifier failed",
               e);
      } catch (ClassNotFoundException e) {
    throw new UnmarshalException("remarshalling verifier failed",
               e);
      }
  }
  logger.log(Level.FINE, "verifier is {0}", verifier);
  return verifier;
View Full Code Here

  createAndRegisterLease(
      new MarshalException("Synthetic MarshalException",
         new IOException()),
         false, set);
  createAndRegisterLease(
      new UnmarshalException("Synthetic UnmarshalException",
           new InvalidClassException("Synthetic")),
           true, set);
  createAndRegisterLease(
      new UnmarshalException("Synthetic UnmarshalException", null),
           false, set);
  createAndRegisterLease(
      new UnmarshalException("Synthetic UnmarshalException",
           new IOException()),
           false, set);
  createAndRegisterLease(
      new ServerException("Synthetic ServerException",
        new RemoteException()),
        false, set);
  createAndRegisterLease(
      new ServerException("Synthetic ServerException",
        new NoSuchObjectException("Synthetic")),
        true, set);
  createAndRegisterLease(
      new ServerException("Synthetic ServerException",
        new UnmarshalException("Synthetic UnmarshalException",
                   new InvalidClassException("Synthetic"))),
        true, set);


  // Wait for failures to hapen and events to be recieved
View Full Code Here

TOP

Related Classes of java.rmi.UnmarshalException

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.