SRV.9.9 Web Application Environment


Java 2 Platform Enterprise Edition, v1.2 defines a naming environment that allows applications to easily access resources and external information without the explicit knowledge of how the external information is named or organized.

As servlets are an integral component type of J2EE, a provision has been made in the web application deployment descriptor for specifying information allowing a servlet to obtain references to resources and enterprise beans. The deployment elements that contain this information are:

  • env-entry

  • ejb-ref

  • resource-ref

The env-entry element contains information to set up basic environment entry names relative to the java:comp/env context, the expected Java type of the environment entry value (the type of object returned from the JNDI lookup method), and an optional environment entry value. The ejb-ref element contains the information needed to allow a servlet to locate the home interfaces of an enterprise bean. The resource-ref element contains the information needed to set up a resource factory.

The requirements of the J2EE environment with regard to setting up the environment are described in Chapter 5 of the Java 2 Platform Enterprise Edition v 1.2 specification. [2] Servlet containers that are not part of a J2EE compliant implementation are encouraged, but not required, to implement the application environment functionality described in the J2EE specification.

[2] The J2EE specification is available in Section J2EE of this volume.



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