Package java.rmi

Examples of java.rmi.MarshalException


        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 = ORBClassLoader.loadClass(
                               "javax.activity.ActivityRequiredException");
                Class[] params = new Class[2];
View Full Code Here


      {
         log.debug(this, ex);
         throw new RuntimeException(ex);
      }
     
      throw new MarshalException(
         "Failed to communicate. Problem during marshalling/unmarshalling.", ex);
   }
View Full Code Here

/* 1050 */       if (isLocal)
/*      */       {
/* 1052 */         throw new EJBException("UnmarshalException", e);
/*      */       }
/*      */
/* 1056 */       throw new MarshalException("MarshalException", e);
/*      */     }
/*      */     finally
/*      */     {
/* 1061 */       if (m != null)
/*      */       {
View Full Code Here

/* 399 */       if (isLocal)
/*     */       {
/* 401 */         return new EJBException("UnmarshalException", runtimeException);
/*     */       }
/*     */
/* 405 */       return new MarshalException("MarshalException", runtimeException);
/*     */     }
/*     */
/* 410 */     if ((e instanceof RuntimeException))
/*     */     {
/* 412 */       RuntimeException runtimeException = (RuntimeException)e;
View Full Code Here

/* 113 */       log.error("Error loading classes from remote call result.", ex);
/* 114 */       throw ((ClassNotFoundException)ex);
/*     */     }
/* 116 */     if ((ex instanceof SocketTimeoutException))
/*     */     {
/* 118 */       throw new MarshalException("Socket timed out.  Waited " + socketWrapper.getTimeout() + " milliseconds for response while calling on " + getLocator(), ex);
/*     */     }
/*     */
/* 122 */     throw new MarshalException("Failed to communicate.  Problem during marshalling/unmarshalling", ex);
/*     */   }
View Full Code Here

/*     */     {
/* 717 */       log.error("Error loading classes from remote call result.", ex);
/* 718 */       throw ((ClassNotFoundException)ex);
/*     */     }
/*     */
/* 721 */     throw new MarshalException("Failed to communicate. Problem during marshalling/unmarshalling.", ex);
/*     */   }
View Full Code Here

          localObjectOutput.writeBoolean(paramBoolean1);
          localObjectOutput.writeBoolean(paramBoolean2);
        }
        catch (IOException localIOException)
        {
          throw new MarshalException("error marshalling arguments", localIOException);
        }
        this.ref.invoke(localRemoteCall);
        this.ref.done(localRemoteCall);
      }
    }
View Full Code Here

          ObjectOutput localObjectOutput = localRemoteCall.getOutputStream();
          localObjectOutput.writeObject(paramJobListener);
        }
        catch (IOException localIOException)
        {
          throw new MarshalException("error marshalling arguments", localIOException);
        }
        this.ref.invoke(localRemoteCall);
        this.ref.done(localRemoteCall);
      }
    }
View Full Code Here

          ObjectOutput localObjectOutput = localRemoteCall.getOutputStream();
          localObjectOutput.writeObject(paramTriggerListener);
        }
        catch (IOException localIOException)
        {
          throw new MarshalException("error marshalling arguments", localIOException);
        }
        this.ref.invoke(localRemoteCall);
        this.ref.done(localRemoteCall);
      }
    }
View Full Code Here

          localObjectOutput.writeObject(paramJobDetail);
          localObjectOutput.writeBoolean(paramBoolean);
        }
        catch (IOException localIOException)
        {
          throw new MarshalException("error marshalling arguments", localIOException);
        }
        this.ref.invoke(localRemoteCall);
        this.ref.done(localRemoteCall);
      }
    }
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.