J2EE: A United Platform

Servlets and JSP, collectively called web components, provide a powerful technology for dynamically generating HMTL using server side components. As EJB matured it became obvious that a synergy existed between EJB and web components. EJB provides scalable, secure, transactional access to business logic and data, while web components provide a flexible model for dynamically generating HTML user interfaces. Together these technologies strike a nice balance between the need for a robust infrastructure and a lightweight, web-based, and easily distributed user interface.

To create a united platform, J2EE standardizes the use of XML deployment descriptors and the JNDI ENC across both enterprise beans and web components. In J2EE, both servlets and JSP scripts can access resources like JDBC, JavaMail, and JMS connection factories via their own JNDI ENC. The ability to consistently access a JMS connection factory from a servlet, JSP script, or enterprise bean enables any of these components to become a JMS client.

In addition to web components and enterprise bean components, J2EE introduces the application client component . The application client component runs on the client machine in its own container (see Figure 8.2). It is simply a Java application that has a deployment descriptor and a JNDI ENC that allows it the same ease of access to resources that other components enjoy. The application client can access JMS through its JNDI ENC, so it too can become a JMS client.

The J2EE platform

Figure 8.2. The J2EE platform

The J2EE specification ensures a certain amount of portability between vendors. A J2EE application that runs on Vendor A's platform should, with a little work, be able to run on Vendor B's J2EE platform. As long as proprietary extensions are not used, web, enterprise bean, and application client components developed to the J2EE specification will run on any J2EE platform.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset