Package javax.naming

Examples of javax.naming.NotContextException


        if (o == this) {
            return new ListBindingEnumeration();
        } else if (o instanceof Context) {
            return ((Context)o).listBindings("");
        } else {
            throw new NotContextException();
        }
    }
View Full Code Here


        if (o == this) {
            return CastUtils.cast(new ListEnumeration());
        } else if (o instanceof Context) {
            return ((Context)o).list("");
        } else {
            throw new NotContextException();
        }
    }
View Full Code Here

        if (o == this) {
            return CastUtils.cast(new ListBindingEnumeration());
        } else if (o instanceof Context) {
            return ((Context)o).listBindings("");
        } else {
            throw new NotContextException();
        }
    }
View Full Code Here

        } else {
            if (entry.type == NamingEntry.CONTEXT) {
                ((Context) entry.value).close();
                bindings.remove(name.get(0));
            } else {
                throw new NotContextException
                    (sm.getString("namingContext.contextExpected"));
            }
        }
       
    }
View Full Code Here

        if (name.size() > 1) {
            Object obj = bindings.get(name.get(0));
            if (obj instanceof Context) {
                return ((Context) obj).getNameParser(name.getSuffix(1));
            } else {
                throw new NotContextException
                    (sm.getString("namingContext.contextExpected"));
            }
        }

        return nameParser;
View Full Code Here

                }
            }
        }

        if (!(ctx instanceof Context))
            throw new NotContextException();

        return ((Context)ctx).lookup (cname.getSuffix(1));
    }
View Full Code Here

                }
            }
        }

        if (!(ctx instanceof Context))
            throw new NotContextException();

        return ((Context)ctx).list (cname.getSuffix(1));      
    }
View Full Code Here

                }
            }
        }

        if (!(ctx instanceof Context))
            throw new NotContextException();

        return ((Context)ctx).listBindings (cname.getSuffix(1));
    }
View Full Code Here

            if (ctx instanceof Context)
            {
                ((Context)ctx).rebind (cname.getSuffix(1), obj);
            }
            else
                throw new NotContextException ("Object bound at "+firstComponent +" is not a Context");
        }
    }
View Full Code Here

            if (ctx instanceof Context)
            {
                ((Context)ctx).unbind (cname.getSuffix(1));
            }
            else
                throw new NotContextException ("Object bound at "+firstComponent +" is not a Context");
        }
       
    }
View Full Code Here

TOP

Related Classes of javax.naming.NotContextException

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.