J2EE.6.9 Java Naming and Directory Interface (JNDI) 1.2 Requirements


A J2EE product must make the following types of objects available in the application visible JNDI namespace” EJBHome objects, JTA UserTransaction objects, JDBC API DataSource objects, and (if JMS is supported) JMS ConnectionFactory and Destination objects. The JNDI implementation in a J2EE product must be capable of supporting all of these uses in a single application component using a single JNDI InitialContext . Application components will generally create a JNDI InitialContext using the default constructor with no arguments. The application component may then perform lookups on that InitialContext to find EJBHome objects, JTA UserTransaction objects, JDBC API DataSource objects, and JMS ConnectionFactory and Destination objects.

The names used to perform lookups for J2EE objects are application-dependent; the application component's deployment descriptor lists all of the names and the type of resource expected to correspond to each name . The deployer configures the JNDI namespace to make appropriate components available. The JNDI names used to look up such resources must be in the JNDI java: namespace. See Chapter J2EE.5, "Naming," for details.

One particular name is defined by this specification. For all application components that have access to the JTA UserTransaction interface, the appropriate UserTransaction object can be found using the name java:comp/UserTransaction .

The name used to look up a particular J2EE object may be different in different application components. In general, JNDI names cannot be meaningfully passed as arguments in remote calls from one application component to another remote component (for example, in a call to an enterprise bean).

The JNDI java: namespace is commonly implemented as symbolic links to other naming systems. Different underlying naming services may be used to store different kinds of objects, or even different instances of objects. It is up to a J2EE product to provide the JNDI service providers necessary to access the various J2EE-defined objects.

Different JNDI service providers may provide different capabilities; for instance, some service providers may provide only read-only access to the data in the name service. This specification requires only that the J2EE platform provide the ability to perform lookup operations as described above.

See Chapter J2EE.5, "Naming," for the complete naming requirements for the J2EE platform.

The JNDI 1.2 specification is available at http://java.sun.com/products/jndi/docs.html.



Java 2 Platform, Enterprise Edition. Platform and Component Specifications
Java 2 Platform, Enterprise Edition: Platform and Component Specifications
ISBN: 0201704560
EAN: 2147483647
Year: 2000
Pages: 399

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net