Package java.rmi

Examples of java.rmi.AccessException


            return new EJBException(e.getMessage()).initCause(getCause(e));
        }

        if (remote && e instanceof EJBAccessException) {
            if (e.getCause() instanceof Exception) {
                return new AccessException(e.getMessage(), (Exception) e.getCause());
            } else {
                return new AccessException(e.getMessage());
            }
        }
        return e;
    }
View Full Code Here


                    throw exc;
                } else {
                    if (interfaceType.isLocal()) {
                        throw (AccessLocalException)new AccessLocalException(exc.getMessage()).initCause(exc);
                    } else {
                        throw (AccessException)new AccessException(exc.getMessage()).initCause(exc);
                    }
                }

            }
            throw exc;
View Full Code Here

                    throw exc;
                } else {
                    if (interfaceType.isLocal()) {
                        throw new AccessLocalException(exc.getMessage()).initCause(exc.getCause());
                    } else {
                        throw new AccessException(exc.getMessage());
                    }
                }

            }
            throw exc;
View Full Code Here

            return new EJBException(e.getMessage()).initCause(getCause(e));
        }

        if (remote && e instanceof EJBAccessException) {
            if (e.getCause() instanceof Exception) {
                return new AccessException(e.getMessage(), (Exception) e.getCause());
            } else {
                return new AccessException(e.getMessage());
            }
        }
        if (!remote && e instanceof EJBTransactionRolledbackException) {
            return new TransactionRolledbackLocalException(e.getMessage()).initCause(getCause(e));
        }
View Full Code Here

                } else {
                    if (interfaceType.isLocal()) {
                        throw (AccessLocalException)new AccessLocalException(exc.getMessage()).initCause(exc);
                    } else {
                        try {
                            throw new AccessException(exc.getMessage()).initCause(exc);
                        } catch (IllegalStateException vmbug) {
                            // Sun JDK 1.5 bug http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4871783
                            // bug affects using initCause on any RemoteException subclasses in Sun 1.5_07 or lower
                            throw new AccessException(exc.getMessage(), (Exception) exc);
                        }
                    }
                }

            }
View Full Code Here

                    throw exc;
                } else {
                    if (interfaceType.isLocal()) {
                        throw new AccessLocalException(exc.getMessage()).initCause(exc.getCause());
                    } else {
                        throw new AccessException(exc.getMessage());
                    }
                }

            }
            throw exc;
View Full Code Here

         bean = home.create();
         fail("Was able to create Level2CallerBean");
      }
      catch (ServerException e)
      {
         AccessException ae = (AccessException) e.detail;
         log.debug("Caught AccessException as expected", ae);
      }
      catch (AccessException e)
      {
         log.debug("Caught AccessException as expected", e);
View Full Code Here

        } 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;
View Full Code Here

     *
     * @throws AccessException if the registry is read-only
     */
    private void checkReadOnly() throws AccessException {
        if (_readOnly) {
            throw new AccessException("Registry is read-only");
        }
    }
View Full Code Here

        try {
            connection = factory.getConnection(principal,
                                               URIHelper.parse(uri),
                                               properties);
        } catch (SecurityException exception) {
            throw new AccessException(exception.getMessage(), exception);
        } catch (ResourceException exception) {
            throw new ConnectIOException("Failed to create connection",
                                         exception);
        }
View Full Code Here

TOP

Related Classes of java.rmi.AccessException

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.