More on JNDI Names

JNDI has to support different naming conventions for different Service Providers in the most transparent manner possible. Generally, programmers will specify JNDI names as strings, but a little understanding of how JNDI interprets bound names will help circumvent many simple problems that can occur when using names.

Special Characters

JNDI applies minimal interpretation to names specified as String objects. JNDI uses the forward slash character (/) as a name separator to provide a simple name hierarchy called a Composite Name. It is conventional for these composite names to be used to group related names (such as plumbers in the phone book). As an example, JDBC data sources take names of jdbc/XXX and EJBs the form ejb/XXX

Get Sams Teach Yourself J2EE™ in 21 Days now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.