13.07.2015 Views

Java™ Application Development on Linux - Dator

Java™ Application Development on Linux - Dator

Java™ Application Development on Linux - Dator

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

21.4 Review491entry in the enumerati<strong>on</strong> is actually a binding that binds the name to either aname object or to a c<strong>on</strong>text object.If, when you encounter a c<strong>on</strong>text, you save the current c<strong>on</strong>text, set thecurrent c<strong>on</strong>text to the new c<strong>on</strong>text, and make the method recursive, you wouldwalk from the present c<strong>on</strong>text <strong>on</strong> down. In theory, you could set your initialc<strong>on</strong>text to “.” (which is the root of DNS) and this program would dump thewhole domain name system to you. 1121.3.3.2 Learning More about JNDIAs with so much in this book, we have had time and space to cover <strong>on</strong>ly thebasics. There is so much more to JNDI. For now we want to point you at Sun’sexcellent JNDI Tutorial. 12 JNDI is covered in more depth in many books,including JNDI API Tutorial and Reference: Building Directory-Enabled Java<str<strong>on</strong>g>Applicati<strong>on</strong></str<strong>on</strong>g>s by Rosanna Lee and Scott Seligman, ISBN 0201705028.21.3.4 Using JNDI with JBossFor our purposes, it is important to know that JBoss uses JNDI to providemuch of the EJB c<strong>on</strong>tainer infrastructure. The primary use is to look up theEJBs, as we shall see in the code examples in the following chapters.21.4REVIEWWe covered the basic c<strong>on</strong>cepts behind the various types of EJBs. We talkedabout the events in the life of a bean. From here we will go <strong>on</strong> to describe actualimplementati<strong>on</strong>s and discuss how a bean is written and deployed to a J2EEc<strong>on</strong>tainer.11. If you are a relatively unschooled net hooligan, let us assure you that this is <strong>on</strong>ly “in theory.”Before you go off and attempt a DoS attack <strong>on</strong> the entire Internet with a simple Java class likethis, we have to tell you that JNDI DNS enumerati<strong>on</strong>s depend <strong>on</strong> a DNS protocol featurecalled z<strong>on</strong>e transfers. Most high-level DNS servers will not do z<strong>on</strong>e transfers at all, and manywill <strong>on</strong>ly accept z<strong>on</strong>e transfer requests from internal addresses. Sorry.12. http://java.sun.com/products/jndi/tutorial

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!