Package javax.naming

Examples of javax.naming.ServiceUnavailableException


        try {
            res = request(req);
        } catch (Exception e) {
            if (e instanceof RemoteException && e.getCause() instanceof ConnectException) {
                e = (Exception) e.getCause();
                throw (ServiceUnavailableException) new ServiceUnavailableException("Cannot list '" + name + "'.").initCause(e);
            }
            throw (NamingException) new NamingException("Cannot list '" + name + "'.").initCause(e);
        }

        switch (res.getResponseCode()) {
View Full Code Here


                {
                    throw ( NamingException ) e;
                }
                else
                {
                    final ServiceUnavailableException sue =
                        new ServiceUnavailableException( e.getMessage() );
                    sue.setRootCause( e );
                    throw sue;
                }
            }
        }
View Full Code Here

            return provider;
        }
        catch( final Exception e )
        {
            final ServiceUnavailableException sue =
                new ServiceUnavailableException( e.getMessage() );
            sue.setRootCause( e );
            throw sue;
        }
        finally
        {
            if( null != socket )
View Full Code Here

            {
                throw (NamingException)e;
            }
            else
            {
                final ServiceUnavailableException sue =
                    new ServiceUnavailableException( e.getMessage() );
                sue.setRootCause( e );
                throw sue;
            }
        }
    }
View Full Code Here

    protected NamingException newNamingException(Throwable e) {
        NamingException ret =
                  (e instanceof AccessException)
                        ? new NoPermissionException()
                : (e instanceof ConnectException)
                        ? new ServiceUnavailableException()
                : (e instanceof ConnectIOException)
               || (e instanceof ExportException)
               || (e instanceof MarshalException)
               || (e instanceof UnmarshalException)
                        ? new CommunicationException()
View Full Code Here

        } // authoritative servers loop
       
        if (!completeAnswer) {
            // found nothing
            // jndi.6E=Unable to perform zone transfer
            throw new ServiceUnavailableException(
                    Messages.getString("jndi.6E")); //$NON-NLS-1$
        }
        // SRV _Proto prefix support - filter all records that don't have given
        // _Proto field
        if (proto != null) {
View Full Code Here

        NamingProvider provider;
        try {
            provider = (NamingProvider) registry.lookup("jndi");
        } catch (NotBoundException exception) {
            throw new ServiceUnavailableException(
                    "JNDI service is not bound in the registry for URL: "
                    + url);
        } catch (RemoteException exception) {
            NamingException error = new CommunicationException(
                    "Failed to lookup JNDI provider for URL: " + url);
            error.setRootCause(exception);
            throw error;
        } finally {
            // get rid of the proxy now rather than waiting for GC
            if (registry instanceof Proxy) {
                ((Proxy) registry).disposeProxy();
            }
        }

        NameParser parser;
        try {
            parser = provider.getNameParser();
        } catch (NamingException exception) {
            throw exception;
        } catch (Exception exception) {
            NamingException error = new ServiceUnavailableException(
                    exception.getMessage());
            error.setRootCause(exception);
            throw error;
        }
        Namespace namespace = new StandardNamespace(parser);
        properties.put(RemoteContext.NAMING_PROVIDER, provider);
        properties.put(RemoteContext.NAMESPACE, namespace);
View Full Code Here

    }


    public void modifyAttributes( Name name, int mod_op, Attributes attrs ) throws NamingException
    {
        throw new ServiceUnavailableException( EXCEPTION_MSG );
    }
View Full Code Here

    }


    public void modifyAttributes( Name name, ModificationItem[] mods ) throws NamingException
    {
        throw new ServiceUnavailableException( EXCEPTION_MSG );
    }
View Full Code Here

        throw new ServiceUnavailableException( EXCEPTION_MSG );
    }

    public DirContext getSchema( String name ) throws NamingException
    {
        throw new ServiceUnavailableException( EXCEPTION_MSG );
    }
View Full Code Here

TOP

Related Classes of javax.naming.ServiceUnavailableException

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.