Java Reference
In-Depth Information
entry in the enumeration is actually a binding that binds the name to either a
name object or to a context object.
If, when you encounter a context, you save the current context, set the
current context to the new context, and make the method recursive, you would
walk from the present context on down. In theory, you could set your initial
context to β€œ . ” (which is the root of DNS) and this program would dump the
whole domain name system to you. 11
21.3.3.2
As with so much in this topic, we have had time and space to cover only the
basics. There is so much more to JNDI. For now we want to point you at Sun's
excellent JNDI Tutorial. 12 JNDI is covered in more depth in many topics,
including JNDI API Tutorial and Reference: Building Directory-Enabled Java
Applications by Rosanna Lee and Scott Seligman, ISBN 0201705028.
Learning More about JNDI
21.3.4
For our purposes, it is important to know that JBoss uses JNDI to provide
much of the EJB container infrastructure. The primary use is to look up the
EJBs, as we shall see in the code examples in the following chapters.
Using JNDI with JBoss
21.4
R EVIEW
We covered the basic concepts behind the various types of EJBs. We talked
about the events in the life of a bean. From here we will go on to describe actual
implementations and discuss how a bean is written and deployed to a J2EE
container.
11. If you are a relatively unschooled net hooligan, let us assure you that this is only β€œin theory.”
Before you go off and attempt a DoS attack on the entire Internet with a simple Java class like
this, we have to tell you that JNDI DNS enumerations depend on a DNS protocol feature
called zone transfers . Most high-level DNS servers will not do zone transfers at all, and many
will only accept zone transfer requests from internal addresses. Sorry.
12. http://java.sun.com/products/jndi/tutorial
Search WWH ::




Custom Search