Package org.codehaus.spice.jndikit

Examples of org.codehaus.spice.jndikit.NamingProvider


        protected Namespace newNamespace( final Hashtable environment )
            throws NamingException
        {
            try
            {
                final NamingProvider provider =
                    ( NamingProvider ) environment.get(
                        RemoteContext.NAMING_PROVIDER );

                return new StandardNamespace( provider.getNameParser() );
            }
            catch( final Exception e )
            {
                if( e instanceof NamingException )
                {
View Full Code Here


    implements InitialContextFactory
{
    public Context getInitialContext( final Hashtable environment )
        throws NamingException
    {
        final NamingProvider provider = newNamingProvider( environment );
        environment.put( RemoteContext.NAMING_PROVIDER, provider );

        final Namespace namespace = newNamespace( environment );
        environment.put( RemoteContext.NAMESPACE, namespace );
View Full Code Here

                new BufferedInputStream( socket.getInputStream() );
            final ObjectInputStream input = new ObjectInputStream( buffered );

            final MarshalledObject object =
                (MarshalledObject)input.readObject();
            final NamingProvider provider =(NamingProvider)object.get();

            socket.close();
            socket = null;

            return provider;
View Full Code Here

    protected Namespace newNamespace( final Hashtable environment )
        throws NamingException
    {
        try
        {
            final NamingProvider provider =
                (NamingProvider)environment.get( RemoteContext.NAMING_PROVIDER );

            return new DefaultNamespace( provider.getNameParser() );
        }
        catch( final Exception e )
        {
            if( e instanceof NamingException )
            {
View Full Code Here

                    "Failed to get registry service for URL: " + url);
            error.setRootCause(exception);
            throw error;
        }

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

            if (_log.isInfoEnabled()) {
                _log.info("Server accepting connections on " + _exportURI);
            }

            if (_config.getServerConfiguration().getEmbeddedJNDI()) {
                NamingProvider provider = _names.getNamingProvider();
                RemoteNamingProvider jndi = new RemoteNamingProvider(provider,
                                                                     _orb,
                                                                     _connector.getJNDIExportURI());
                registry.bind("jndi", jndi.getProxy());
                if (_log.isInfoEnabled()) {
View Full Code Here

TOP

Related Classes of org.codehaus.spice.jndikit.NamingProvider

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.