Package java.rmi

Examples of java.rmi.AccessException


                    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

        String hostName = ServerConnectionManager.getClientHost();

        try {
            if (!RMIUtil.isLocalHost(hostName)) {
                // rmi.60={0} from non-local host {1} is not allowed
                throw new AccessException(Messages.getString("rmi.60", registryMethod, hostName)); //$NON-NLS-1$
            }
        } catch (UnknownHostException uhe) {
            // rmi.61={0} from unknown host is not allowed
            throw new AccessException(Messages.getString("rmi.61", registryMethod), uhe); //$NON-NLS-1$
        }
    }
View Full Code Here

        public void bind(String name, Remote obj)
            throws RemoteException, AlreadyBoundException, AccessException
        {
            if (name.equals(NAME)) {
                throw new AccessException(
                    "binding ActivationSystem is disallowed");
            } else {
                super.bind(name, obj);
            }
        }
View Full Code Here

        public void unbind(String name)
            throws RemoteException, NotBoundException, AccessException
        {
            if (name.equals(NAME)) {
                throw new AccessException(
                    "unbinding ActivationSystem is disallowed");
            } else {
                super.unbind(name);
            }
        }
View Full Code Here

        public void rebind(String name, Remote obj)
            throws RemoteException, AccessException
        {
            if (name.equals(NAME)) {
                throw new AccessException(
                    "binding ActivationSystem is disallowed");
            } else {
                super.rebind(name, obj);
            }
        }
View Full Code Here

    /**
     * {@link java.rmi.AccessException#AccessException(java.lang.String, java.lang.Exception)}.
     */
    public void testAccessExceptionStringException() {
        AccessException e = new AccessException("fixture", null);
        assertEquals("fixture", e.getMessage());
        assertNull(e.getCause());
        assertNull(e.detail);
       
        NullPointerException npe = new NullPointerException();
        e = new AccessException("fixture", npe);
        assertTrue(e.getMessage().indexOf("fixture") > -1);
        assertSame(npe, e.getCause());
        assertSame(npe, e.detail);
    }
View Full Code Here

    /**
     * {@link java.rmi.AccessException#AccessException(java.lang.String)}.
     */
    public void testAccessExceptionString() {
        AccessException e = new AccessException("fixture");
        assertEquals("fixture", e.getMessage());
        assertNull(e.getCause());
        assertNull(e.detail);
    }
View Full Code Here

            if ( t instanceof RuntimeException )
                throw (RuntimeException)t;
            else if ( t instanceof RemoteException )
                throw (RemoteException)t;
            else
                throw new AccessException(localStrings.getLocalString(
                    "ejb.client_not_authorized",
                    "Client not authorized for this invocation")); // throw the AccessException
        }
    }
View Full Code Here

            if ( t instanceof RuntimeException )
                throw (RuntimeException)t;
            else if ( t instanceof RemoteException )
                throw (RemoteException)t;
            else
                throw new AccessException(localStrings.getLocalString(
                    "ejb.client_not_authorized",
                    "Client not authorized for this invocation")); // throw the AccessException
        }
    }
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.