Package java.rmi

Examples of java.rmi.MarshalException


        }
        if (ex instanceof NO_PERMISSION) {
            return new AccessException(ex.getMessage(), ex);
        }
        if (ex instanceof MARSHAL) {
            return new MarshalException(ex.getMessage(), ex);
        }
        if (ex instanceof UNKNOWN) {
            return new RemoteException(ex.getMessage(), ex);
        }
        return delegate.mapSystemException(ex);
View Full Code Here


      
       /* 01) any instance of java.rmi.MarshalException in which the
          value of the exception's detail field is an instance of
          java.io.ObjectStreamException */
       badInvException01 =
     new MarshalException("LeaseExpirationTest",
      new StreamCorruptedException("LeaseExpirationTest"));
       badInvOwner01 =
     new FailingOpCountingOwner(badInvException01, 0, renewGrant);

       /* 02) any instance of java.rmi.UnmarshalException in which the
View Full Code Here

    /** Construct, log, and throw a new MarshalException */
    private static MarshalException throwNewMarshalException(
      String msg, Exception nested)
  throws MarshalException
    {
  final MarshalException me = new MarshalException(msg, nested);
  if (logger.isLoggable(Levels.FAILED)) {
      logger.log(Levels.FAILED, msg, me);
  }

  throw me;
View Full Code Here

  MarshalledObject data;
  try {
      data = new MarshalledObject(desc);
  } catch (Exception e) {
            MarshalException me =
          new MarshalException("marshalling ActivateDesc", e);
      logger.throwing(ActivateWrapper.class.getName(),
          "register", me);
      throw me;
  }
 
View Full Code Here

  if (clazz != Object.class)
      this.interfaces = interfaces;
  try {
      computeHash();
  } catch (Exception e) {
      throw new MarshalException("unable to calculate the type hash for "
               + name, e);
  }
    }
View Full Code Here

                        oout.writeRMIObject(params[i], paramTypes[i]);
                    }
                }
            } catch (IOException ioe) {
                // rmi.6F=I/O error occured while marshalling arguments
                throw new MarshalException(Messages.getString("rmi.6F"), ioe); //$NON-NLS-1$
            }

            // execute the call
            invoke(call);
View Full Code Here

            oout.writeLong(hash);
            return call;
        } catch (IOException ioe) {
            done(call);
            // rmi.72=Unable to marshal call header
            throw new MarshalException(Messages.getString("rmi.72"), ioe); //$NON-NLS-1$
        }
    }
View Full Code Here

                        throw (IOException) wae.detail;
                }
            } else if (org instanceof MarshalException) {
                // IIOP will throw MarshalException wrapping a NotSerializableException
                // when a server fails to serialize a response.
                MarshalException me = (MarshalException)org;
                if (me.detail instanceof NotSerializableException) {
                    throw (NotSerializableException)me.detail;
                }
            }
View Full Code Here

        String message = "CORBA " + corbaName + " " + ex.minor + " " + status;

        // Now map to the correct RemoteException type...
        if (ex instanceof COMM_FAILURE) {
            return new MarshalException(message, ex);
        } else if (ex instanceof INV_OBJREF) {
            RemoteException newEx = new NoSuchObjectException(message);
            newEx.detail = ex;
            return newEx;
        } else if (ex instanceof NO_PERMISSION) {
            return new AccessException(message, ex);
        } else if (ex instanceof MARSHAL) {
            return new MarshalException(message, ex);
        } else if (ex instanceof OBJECT_NOT_EXIST) {
            RemoteException newEx = new NoSuchObjectException(message);
            newEx.detail = ex;
            return newEx;
        } else if (ex instanceof TRANSACTION_REQUIRED) {
            RemoteException newEx = new TransactionRequiredException(message);
            newEx.detail = ex;
            return newEx;
        } else if (ex instanceof TRANSACTION_ROLLEDBACK) {
            RemoteException newEx = new TransactionRolledbackException(message);
            newEx.detail = ex;
            return newEx;
        } else if (ex instanceof INVALID_TRANSACTION) {
            RemoteException newEx = new InvalidTransactionException(message);
            newEx.detail = ex;
            return newEx;
        } else if (ex instanceof BAD_PARAM) {
            Exception inner = ex;

            // Pre-Merlin Sun ORBs used the incorrect minor code for
            // this case.  See Java to IDL ptc-00-01-08 1.4.8.
            if (ex.minor == ORBConstants.LEGACY_SUN_NOT_SERIALIZABLE ||
                ex.minor == OMGSystemException.NOT_SERIALIZABLE) {

                if (ex.getMessage() != null)
                    inner = new NotSerializableException(ex.getMessage());
                else
                    inner = new NotSerializableException();

                inner.initCause( ex ) ;
            }

            return new MarshalException(message,inner);
        } else if (ex instanceof ACTIVITY_REQUIRED) {
            try {
                Class<?> cl = SharedSecrets.getJavaCorbaAccess().loadClass(
                               "javax.activity.ActivityRequiredException");
                Class[] params = new Class[2];
View Full Code Here

        String message = "CORBA " + corbaName + " " + ex.minor + " " + status;

        // Now map to the correct RemoteException type...
        if (ex instanceof COMM_FAILURE) {
            return new MarshalException(message, ex);
        } else if (ex instanceof INV_OBJREF) {
            RemoteException newEx = new NoSuchObjectException(message);
            newEx.detail = ex;
            return newEx;
        } else if (ex instanceof NO_PERMISSION) {
            return new AccessException(message, ex);
        } else if (ex instanceof MARSHAL) {
            return new MarshalException(message, ex);
        } else if (ex instanceof OBJECT_NOT_EXIST) {
            RemoteException newEx = new NoSuchObjectException(message);
            newEx.detail = ex;
            return newEx;
        } else if (ex instanceof TRANSACTION_REQUIRED) {
            RemoteException newEx = new TransactionRequiredException(message);
            newEx.detail = ex;
            return newEx;
        } else if (ex instanceof TRANSACTION_ROLLEDBACK) {
            RemoteException newEx = new TransactionRolledbackException(message);
            newEx.detail = ex;
            return newEx;
        } else if (ex instanceof INVALID_TRANSACTION) {
            RemoteException newEx = new InvalidTransactionException(message);
            newEx.detail = ex;
            return newEx;
        } else if (ex instanceof BAD_PARAM) {
            Exception inner = ex;

            // Pre-Merlin Sun ORBs used the incorrect minor code for
            // this case.  See Java to IDL ptc-00-01-08 1.4.8.
            if (ex.minor == ORBConstants.LEGACY_SUN_NOT_SERIALIZABLE ||
                ex.minor == OMGSystemException.NOT_SERIALIZABLE) {

                if (ex.getMessage() != null)
                    inner = new NotSerializableException(ex.getMessage());
                else
                    inner = new NotSerializableException();

                inner.initCause( ex ) ;
            }

            return new MarshalException(message,inner);
        } else if (ex instanceof ACTIVITY_REQUIRED) {
            try {
                Class<?> cl = SharedSecrets.getJavaCorbaAccess().loadClass(
                               "javax.activity.ActivityRequiredException");
                Class[] params = new Class[2];
View Full Code Here

TOP

Related Classes of java.rmi.MarshalException

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.