Package org.codehaus.spice.jndikit

Examples of org.codehaus.spice.jndikit.Namespace


{

    protected Context getRoot() throws Exception
    {
        final DefaultNameParser parser = new DefaultNameParser();
        final Namespace namespace = new StandardNamespace( parser );

        Hashtable environment = new Hashtable();
        environment.put( Context.STATE_FACTORIES,
                         TestStateFactory.class.getName() );
View Full Code Here


        throws NamingException
    {
        final NamingProvider provider = newNamingProvider( environment );
        environment.put( RemoteContext.NAMING_PROVIDER, provider );

        final Namespace namespace = newNamespace( environment );
        environment.put( RemoteContext.NAMESPACE, namespace );

        final Name baseName = namespace.getNameParser().parse( "" );
        return new RemoteContext( environment, baseName );
    }
View Full Code Here

    /**
     * Construct an <code>EmbeddedNameService</code>.
     */
    protected EmbeddedNameService() {
        DefaultNameParser parser = new DefaultNameParser();
        Namespace namespace = createNamespace(parser);
        Context context = new MemoryContext(namespace, null, null);
        _provider = new RMINamingProviderImpl(context);
    }
View Full Code Here

     * @return the initial context
     * @throws NamingException for any naming error
     */
    public Context getInitialContext() throws NamingException {
        Hashtable environment = new Hashtable();
        Namespace namespace;
        try {
            namespace = createNamespace(_provider.getNameParser());
        } catch (NamingException exception) {
            throw exception;
        } catch (Exception exception) {
            throw new CommunicationException(exception.toString());
        }

        environment.put(RemoteContext.NAMING_PROVIDER, _provider);
        environment.put(RemoteContext.NAMESPACE, namespace);

        final Name baseName = namespace.getNameParser().parse("");
        return new RemoteContext(environment, baseName);
    }
View Full Code Here

            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);
        RemoteContext root = new RemoteContext(properties, parser.parse(""));
        return new ORBRemoteContext(root);
    }
View Full Code Here

TOP

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

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.