Package java.rmi

Examples of java.rmi.ServerException


/* 104 */       EJBHome home = (EJBHome)ic.lookup(this.jndiName);
/* 105 */       return home;
/*     */     }
/*     */     catch (NamingException e) {
/*     */     }
/* 109 */     throw new ServerException("Could not get EJBHome", e);
/*     */   }
View Full Code Here


/*  93 */       Method method = type.getMethod("create", new Class[0]);
/*  94 */       return (EJBObject)method.invoke(home, new Object[0]);
/*     */     }
/*     */     catch (Exception e) {
/*     */     }
/*  98 */     throw new ServerException("Could not get EJBObject", e);
/*     */   }
View Full Code Here

/* 128 */         throw ((Error)t);
/* 129 */       throw new InvocationTargetException(t);
/*     */     }
/*     */     catch (IOException e) {
/*     */     }
/* 133 */     throw new ServerException("IOE", e);
/*     */   }
View Full Code Here

/*     */         {
/* 193 */           String msg = formatException("Unexpected Throwable", e);
/* 194 */           throw new EJBException(msg);
/*     */         }
/*     */
/* 198 */         ServerException ex = new ServerException("Unexpected Throwable");
/* 199 */         ex.detail = e;
/* 200 */         throw ex;
/*     */       }
/*     */       Throwable cause;
/* 207 */       if ((e instanceof NoSuchEntityException))
View Full Code Here

/*     */     }
/*     */     catch (RemoteException aex)
/*     */     {
/* 178 */       if (this.strictRMIException)
/*     */       {
/* 180 */         throw new ServerException(aex.getMessage(), aex);
/*     */       }
/*     */
/* 184 */       throw aex;
/*     */     }
/*     */     catch (Throwable throwable)
View Full Code Here

/*     */
/* 113 */       return (EJBObject)method.invoke(home, new Object[] { this.id });
/*     */     }
/*     */     catch (Exception e) {
/*     */     }
/* 117 */     throw new ServerException("Could not get EJBObject", e);
/*     */   }
View Full Code Here

/* 105 */       EJBHome home = (EJBHome)ic.lookup(this.jndiName);
/* 106 */       return home;
/*     */     }
/*     */     catch (NamingException e) {
/*     */     }
/* 110 */     throw new ServerException("Could not get EJBHome", e);
/*     */   }
View Full Code Here

/* 358 */       if (isLocal)
/*     */       {
/* 360 */         return ejbException;
/*     */       }
/*     */
/* 365 */       return new ServerException("EJBException:", ejbException);
/*     */     }
/*     */
/* 373 */     if (((e instanceof SecurityException)) || ((e instanceof GeneralSecurityException)))
/*     */     {
/* 375 */       Exception runtimeException = (Exception)e;
/* 376 */       if (this.log.isTraceEnabled())
/* 377 */         this.log.trace("SecurityException in method: " + invocation.getMethod() + ":", runtimeException);
/* 378 */       if (isAppException(invocation, e))
/*     */       {
/* 380 */         return runtimeException;
/*     */       }
/* 382 */       if (isLocal)
/*     */       {
/* 384 */         return new AccessLocalException("SecurityException", runtimeException);
/*     */       }
/*     */
/* 388 */       return new AccessException("SecurityException", runtimeException);
/*     */     }
/*     */
/* 394 */     if ((e instanceof JBossLazyUnmarshallingException))
/*     */     {
/* 396 */       RuntimeException runtimeException = (RuntimeException)e;
/* 397 */       this.log.error("UnmarshalException:", e);
/*     */
/* 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;
/* 413 */       this.log.error("RuntimeException in method: " + invocation.getMethod() + ":", runtimeException);
/*     */
/* 415 */       if (isLocal)
/*     */       {
/* 417 */         return new EJBException("RuntimeException", runtimeException);
/*     */       }
/*     */
/* 421 */       return new ServerException("RuntimeException", runtimeException);
/*     */     }
/*     */
/* 424 */     if ((e instanceof Error))
/*     */     {
/* 426 */       this.log.error("Unexpected Error in method: " + invocation.getMethod(), e);
/* 427 */       if (isLocal)
/*     */       {
/* 429 */         String msg = formatException("Unexpected Error", e);
/* 430 */         return new EJBException(msg);
/*     */       }
/*     */
/* 434 */       return new ServerError("Unexpected Error", (Error)e);
/*     */     }
/*     */
/* 440 */     if ((isLocal) && ((e instanceof RemoteException)))
/*     */     {
/* 442 */       if (this.callLogging)
/*     */       {
/* 444 */         this.log.info("Remote Exception in method: " + invocation.getMethod(), e);
/*     */       }
/* 446 */       return new EJBException((RemoteException)e);
/*     */     }
/*     */
/* 449 */     if ((e instanceof Exception))
/*     */     {
/* 451 */       if (this.callLogging)
/*     */       {
/* 453 */         this.log.info("Application Exception in method: " + invocation.getMethod(), e);
/*     */       }
/* 455 */       return (Exception)e;
/*     */     }
/*     */
/* 460 */     String msg = formatException("Unexpected Throwable", e);
/* 461 */     this.log.warn("Unexpected Throwable in method: " + invocation.getMethod(), e);
/* 462 */     if (isLocal)
/*     */     {
/* 464 */       return new EJBException(msg);
/*     */     }
/*     */
/* 468 */     return new ServerException(msg);
/*     */   }
View Full Code Here

        if (ex instanceof UnknownException) {
            Throwable orig = ((UnknownException)ex).originalEx;
            if (orig instanceof Error) {
                return new ServerError("Error occurred in server thread",(Error)orig);
            } else if (orig instanceof RemoteException) {
                return new ServerException("RemoteException occurred in server thread",
                    (Exception)orig);
            } else if (orig instanceof RuntimeException) {
                throw (RuntimeException) orig;
            }
        }
View Full Code Here

        }

        if (orig instanceof Error) {
            return new ServerError("Error occurred in server thread",(Error)orig);
        } else if (orig instanceof RemoteException) {
            return new ServerException("RemoteException occurred in server thread",
                                       (Exception)orig);
        } else if (orig instanceof RuntimeException) {
            throw (RuntimeException) orig;
        }
View Full Code Here

TOP

Related Classes of java.rmi.ServerException

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.