Binding and Context Concept, from JNDI Tutorial
2012-10-10 10:42
218 查看
Awesome material: http://docs.oracle.com/javase/jndi/tutorial/index.html
The association of a name with an object is called a binding. For example, a file name is bound to
a file.
A context is a set of name-to-object bindings. Every context has an associated naming convention. A context provides a lookup (resolution) operation that returns the object and may provide operations such
as those for binding names, unbinding names, and listing bound names. A name in one context object can be bound to another context object (called a subcontext) that has the same naming convention.
For example, a file directory, such as /usr, in the UNIX file system is a context. A file directory named relative to another file directory is a subcontext (some UNIX users refer to this as a subdirectory). That is, in a file directory /usr/bin,
the directory bin is a subcontext of usr. In another example, a DNS domain, such as COM, is a context. A DNS domain named relative to another DNS domain is a subcontext. For example, in the DNS domain Sun.COM, the DNS domain Sun is
a subcontext of COM.
Finally, an LDAP entry, such as c=us, is a context. An LDAP entry named relative to another LDAP entry is a subcontext. For example, in the an LDAP entry o=sun,c=us, the entry o=sun is a subcontext of c=us.
In the JNDI, all naming and directory operations are performed relative to a context. There are no absolute roots. Therefore the JNDI defines aninitial
context, InitialContext
,
which provides a starting point for naming and directory operations. Once you have an initial context, you can use it to look up other contexts and objects.
Contemplate: Why are there no absolute roots in JNDI? Duplicated items in various subcontexts.
The association of a name with an object is called a binding. For example, a file name is bound to
a file.
A context is a set of name-to-object bindings. Every context has an associated naming convention. A context provides a lookup (resolution) operation that returns the object and may provide operations such
as those for binding names, unbinding names, and listing bound names. A name in one context object can be bound to another context object (called a subcontext) that has the same naming convention.
For example, a file directory, such as /usr, in the UNIX file system is a context. A file directory named relative to another file directory is a subcontext (some UNIX users refer to this as a subdirectory). That is, in a file directory /usr/bin,
the directory bin is a subcontext of usr. In another example, a DNS domain, such as COM, is a context. A DNS domain named relative to another DNS domain is a subcontext. For example, in the DNS domain Sun.COM, the DNS domain Sun is
a subcontext of COM.
Finally, an LDAP entry, such as c=us, is a context. An LDAP entry named relative to another LDAP entry is a subcontext. For example, in the an LDAP entry o=sun,c=us, the entry o=sun is a subcontext of c=us.
In the JNDI, all naming and directory operations are performed relative to a context. There are no absolute roots. Therefore the JNDI defines aninitial
context, InitialContext
,
which provides a starting point for naming and directory operations. Once you have an initial context, you can use it to look up other contexts and objects.
Contemplate: Why are there no absolute roots in JNDI? Duplicated items in various subcontexts.
相关文章推荐
- Spring ContextLoaderListener And DispatcherServlet Concepts
- 禁止requests请求https的提示InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more
- JNDI(一) 之 Naming and Directory Concepts
- JavaScript types preparation for jQuery tutorial and Original From it
- Databinding methods such as Eval(), XPath(), and Bind() can only be used in the context of a databound control.
- Spring ContextLoaderListener And DispatcherServlet Concepts
- Tutorial: Importing and analyzing data from a Web Page using Power BI Desktop
- context mapping and data binding
- Open context.xml from /tomcat/conf folder and modify the context to match this :
- Tutorial: Analyzing sales data from Excel and an OData feed
- 【阅读笔记】Mining Concept Sequence from Large-Scale Search Logs for Context-Aware Query Suggestion
- How to Display a SharePoint Dialog from Ribbon Button and Get Selected Item Context
- Understanding Instance and Class Members(Reprint from http://download.oracle.com/javase/tutorial/ja)
- JVM - Concept and Lifetime (From book "Inside the Java Virtual Machine")
- JSP URI/URL - How to get the request URI, URL, and Context from a JSP
- 《Head First Java》And《Beginning Java Objects: From Concepts To Code, Second Edition》
- What difference between ConvertFrom-CSV and ConvertFrom-StringData?
- LeetCode(105) Construct Binary Tree from Preorder and Inorder Traversal
- LeetCode 106. Construct Binary Tree from Inorder and Postorder Traversal
- startActivity() from outside of an Activity context requires the FLAG_ACTIVITY_NEW flag