Package org.jboss.as.naming

Examples of org.jboss.as.naming.NamingStore


        this.name = name;
    }

    public synchronized void start(StartContext startContext) throws StartException {
        final Reference appReference = NamespaceObjectFactory.createReference(name);
        final NamingStore javaContext = this.javaContext.getValue();
        try {
            javaContext.rebind(NameParser.INSTANCE.parse(name), appReference, Reference.class);
        } catch (NamingException e) {
            throw new StartException("Failed to bind EE context: java:" + name, e);
        }
    }
View Full Code Here


            throw new StartException("Failed to bind EE context: java:" + name, e);
        }
    }

    public synchronized void stop(StopContext stopContext) {
        final NamingStore javaContext = this.javaContext.getValue();
        try {
            javaContext.unbind(NameParser.INSTANCE.parse(name));
        } catch (NamingException e) {
            throw new IllegalStateException("Failed to unbind EE context: java:" + name, e);
        }
    }
View Full Code Here

                    ObjectFactoryBuilder.INSTANCE.setServiceRegistry(context.getServiceRegistry());

                    NamingContext.initializeNamingManager();

                    final NamingStore namingStore = new InMemoryNamingStore(new NamingEventCoordinator());

                    // Create the Naming Service
                    final ServiceTarget target = context.getServiceTarget();
                        target.addService(NamingService.SERVICE_NAME, new NamingService(namingStore))
                            .addAliases(ContextNames.JAVA_CONTEXT_SERVICE_NAME)
View Full Code Here

                .addListener(verificationHandler)
                .install());

        NamespaceContextSelector.setDefault(new NamespaceContextSelector() {
            public Context getContext(String identifier) {
                final NamingStore namingStore;
                if(identifier.equals("global")){
                    namingStore = globalNamingStore;
                } else if(identifier.equals("jboss")) {
                    namingStore = jbossNamingStore;
                } else {
                    namingStore = null;
                }
                if (namingStore != null) {
                    try {
                        return (Context) namingStore.lookup(EMPTY_NAME);
                    } catch (NamingException e) {
                        throw new IllegalStateException(e);
                    }
                } else {
                    return null;
View Full Code Here

                .addListener(verificationHandler)
                .install());

        NamespaceContextSelector.setDefault(new NamespaceContextSelector() {
            public Context getContext(String identifier) {
                final NamingStore namingStore;
                if(identifier.equals("global")){
                    namingStore = globalNamingStore;
                } else if(identifier.equals("jboss")) {
                    namingStore = jbossNamingStore;
                } else {
                    namingStore = null;
                }
                if (namingStore != null) {
                    try {
                        return (Context) namingStore.lookup(EMPTY_NAME);
                    } catch (NamingException e) {
                        throw new IllegalStateException(e);
                    }
                } else {
                    return null;
View Full Code Here

TOP

Related Classes of org.jboss.as.naming.NamingStore

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.