This article shows programmers how to assemble and deploy J2EE applications based on EJBs, servlets, and JSP. We will begin with a brief introduction to the J2EE platform and J2EE applications, then dive straight into the mechanics of assembly and deployment.
But why J2EE? The various specifications were doing just fine on their own, right? Individually that's true. For example, EJBs helped to separate and isolate the business logic portion of an application and to hide the unnecessary plumbing infrastructure. Servlets and JSPs both provided a means to create Web-based applications easily. Java Transaction Architecture (JTA) and Java Transaction Service (JTS) provided transactional capabilities to Java applications. JNDI helped applications find each other, while JDBC allowed connectability to relational databases. Individually, each technology performed its task satisfactorily, but the synergy created with their combination finally allows true Java-based enterprise applications. J2EE is the glue that ties them all together in a coherent bundle by defining how they work together to form a complete enterprise platform.
J2EE applications are applications written using the J2EE platform and deployed on a J2EE application server. They are composed of one or more J2EE components (classes developed based on the J2EE platform) and a J2EE application deployment descriptor. The deployment descriptor lists the application's components as modules. A J2EE module represents a J2EE application's basic unit of composition.
The J2EE component model also allows the various modules to be deployed as individual components, component libraries, or J2EE applications. J2EE modules include:
That means that J2EE applications can not only be Web-based applications based on the J2EE platform, but also client-server applications, as long as they are based on the J2EE platform. Note that a J2EE application does not necessarily need to have EJBs -- it can contain just JSPs, servlets, and HTML files. It can also be simply a Java program (client-server) that accesses the J2EE platform, a gaggle of EJBs that work together, all three, or any two combinations.
This article describes packaging and deployment for EJBs and Web applications only. The deployment platform uses the Sun J2EE Reference Implementation (RI) Server version 1.2.1 running on Windows NT 4.0.
gettheappBy Anonymous on April 9, 2010, 10:24 amgettheapp.com
Reply | Read entire comment
View all comments