Package org.glassfish.api.naming

Examples of org.glassfish.api.naming.JNDIBinding


                            "[ " + jndiName + " ] of  module namespace [" + moduleName+ "] " +
                            "of application ["+applicationName+"] ");
                }
            }

            JNDIBinding bindings = new ModuleScopedResourceBinding(getModuleScopedName(jndiName), object);
            List<JNDIBinding> list = new ArrayList<JNDIBinding>();
            list.add(bindings);
            if(_logger.isLoggable(Level.FINEST)){
                debug("application=" + applicationName + ", module name=" +moduleName+", binding name=" + jndiName);
            }
            namingManager.bindToModuleNamespace(applicationName, moduleName, list);
        }else if(!isGlobalName(resourceInfo.getName()) && applicationName != null ) {

            Object alreadyBoundObject = null;
            if(rebind){
                try{
                    namingManager.unbindAppObject(applicationName, getAppScopedName(jndiName));
                }catch(NameNotFoundException e){
                    //ignore
                }
            }else{
                try {
                    alreadyBoundObject = namingManager.lookupFromAppNamespace(applicationName,
                            getAppScopedName(jndiName), null);
                } catch (NameNotFoundException e) {
                    //ignore
                }
                if (alreadyBoundObject != null) {
                    throw new NamingException("Object already bound for jndiName " +
                            "[ " + jndiName + " ] of application's namespace [" + applicationName + "]");
                }
            }

            JNDIBinding bindings = new ApplicationScopedResourceBinding(getAppScopedName(jndiName), object);
            List<JNDIBinding> list = new ArrayList<JNDIBinding>();
            list.add(bindings);
            if(_logger.isLoggable(Level.FINEST)){
                debug("application=" + applicationName + ", binding name=" + jndiName);
            }
View Full Code Here


                            "[ " + jndiName + " ] of  module namespace [" + moduleName+ "] " +
                            "of application ["+applicationName+"] ");
                }
            }

            JNDIBinding bindings = new ModuleScopedResourceBinding(getModuleScopedName(jndiName), object);
            List<JNDIBinding> list = new ArrayList<JNDIBinding>();
            list.add(bindings);
            if(_logger.isLoggable(Level.FINEST)){
                debug("application=" + applicationName + ", module name=" +moduleName+", binding name=" + jndiName);
            }
            namingManager.bindToModuleNamespace(applicationName, moduleName, list);
        }else if(!isGlobalName(resourceInfo.getName()) && applicationName != null ) {

            Object alreadyBoundObject = null;
            if(rebind){
                try{
                    namingManager.unbindAppObject(applicationName, getAppScopedName(jndiName));
                }catch(NameNotFoundException e){
                    //ignore
                }
            }else{
                try {
                    alreadyBoundObject = namingManager.lookupFromAppNamespace(applicationName,
                            getAppScopedName(jndiName), null);
                } catch (NameNotFoundException e) {
                    //ignore
                }
                if (alreadyBoundObject != null) {
                    throw new NamingException("Object already bound for jndiName " +
                            "[ " + jndiName + " ] of application's namespace [" + applicationName + "]");
                }
            }

            JNDIBinding bindings = new ApplicationScopedResourceBinding(getAppScopedName(jndiName), object);
            List<JNDIBinding> list = new ArrayList<JNDIBinding>();
            list.add(bindings);
            if(_logger.isLoggable(Level.FINEST)){
                debug("application=" + applicationName + ", binding name=" + jndiName);
            }
View Full Code Here

                            "[ " + jndiName + " ] of  module namespace [" + moduleName+ "] " +
                            "of application ["+applicationName+"] ");
                }
            }

            JNDIBinding bindings = new ModuleScopedResourceBinding(getModuleScopedName(jndiName), object);
            List<JNDIBinding> list = new ArrayList<JNDIBinding>();
            list.add(bindings);
            if(_logger.isLoggable(Level.FINEST)){
                debug("application=" + applicationName + ", module name=" +moduleName+", binding name=" + jndiName);
            }
            namingManager.bindToModuleNamespace(applicationName, moduleName, list);
        }else if(!isGlobalName(resourceInfo.getName()) && applicationName != null ) {

            Object alreadyBoundObject = null;
            if(rebind){
                try{
                    namingManager.unbindAppObject(applicationName, getAppScopedName(jndiName));
                }catch(NameNotFoundException e){
                    //ignore
                }
            }else{
                try {
                    alreadyBoundObject = namingManager.lookupFromAppNamespace(applicationName,
                            getAppScopedName(jndiName), null);
                } catch (NameNotFoundException e) {
                    //ignore
                }
                if (alreadyBoundObject != null) {
                    throw new NamingException("Object already bound for jndiName " +
                            "[ " + jndiName + " ] of application's namespace [" + applicationName + "]");
                }
            }

            JNDIBinding bindings = new ApplicationScopedResourceBinding(getAppScopedName(jndiName), object);
            List<JNDIBinding> list = new ArrayList<JNDIBinding>();
            list.add(bindings);
            if(_logger.isLoggable(Level.FINEST)){
                debug("application=" + applicationName + ", binding name=" + jndiName);
            }
View Full Code Here

                            "[ " + jndiName + " ] of  module namespace [" + moduleName+ "] " +
                            "of application ["+applicationName+"] ");
                }
            }

            JNDIBinding bindings = new ModuleScopedResourceBinding(getModuleScopedName(jndiName), object);
            List<JNDIBinding> list = new ArrayList<JNDIBinding>();
            list.add(bindings);
            if(_logger.isLoggable(Level.FINEST)){
                debug("application=" + applicationName + ", module name=" +moduleName+", binding name=" + jndiName);
            }
            namingManager.bindToModuleNamespace(applicationName, moduleName, list);
        }else if(!isGlobalName(resourceInfo.getName()) && applicationName != null ) {

            Object alreadyBoundObject = null;
            if(rebind){
                try{
                    namingManager.unbindAppObject(applicationName, getAppScopedName(jndiName));
                }catch(NameNotFoundException e){
                    //ignore
                }
            }else{
                try {
                    alreadyBoundObject = namingManager.lookupFromAppNamespace(applicationName,
                            getAppScopedName(jndiName), null);
                } catch (NameNotFoundException e) {
                    //ignore
                }
                if (alreadyBoundObject != null) {
                    throw new NamingException("Object already bound for jndiName " +
                            "[ " + jndiName + " ] of application's namespace [" + applicationName + "]");
                }
            }

            JNDIBinding bindings = new ApplicationScopedResourceBinding(getAppScopedName(jndiName), object);
            List<JNDIBinding> list = new ArrayList<JNDIBinding>();
            list.add(bindings);
            if(_logger.isLoggable(Level.FINEST)){
                debug("application=" + applicationName + ", binding name=" + jndiName);
            }
View Full Code Here

TOP

Related Classes of org.glassfish.api.naming.JNDIBinding

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.