Monday, 4 February 2013

J2EE ARCHITECTURE | Java J2EE Tutorial pdf

J2EE ARCHITECTURE

A typical commercial J2EE, platform includes one or more containers. But what exactly is a container? A J2EE container is a runtime to manage application components developed according to the API specifications, and to provide access to the J2EE APIs. Beyond the Identity associated with the runtime, J2EE does not specify any identity for containers. This gives a great amount of flexibility to achieve a variety of features within the container runtime. The following figure shows the architecture of J2EE in terms of its containers and APIs:

                                 J2EE Architecture Diagram
This architecture shows four containers :
=> A web container for hosting Java servlets and JSP pages.
=> An EJB container for hosting Enterprise JavaBeans components.
=> An applet container for hosting Java applets.
=> An application client container for hosting standard Java applications.
Each of these containers provides a run-time environment for the respective components. J2EE components are also called managed objects, as these objects are created and managed within the container runtime.
In this architecture, there are primarily two types of clients:
Web clients normally run in web browsers.
For these clients, the user interface is generated on the server side as HTML or XML, and it’s downloaded and then rendered by the browsers. These clients use HTTP to communicate with web containers. Application components in web containers include Java servlets and JSP pages. These components implement the functionality required for the clients. Web containers are responsible for accepting requests from web clients, and generating responses with the help of the application components.
EJB clients are applications that access EJB components in EJB container.
There are three possible types of EJB clients. First categories application clients. Application clients are standalone applications accessing the EJB components using RMI-IIOP protocol. The second category of application clients are components in the web container. That is, Java servlets and JSP pages can also access the EJB components via the RMI-IIOP protocol in the same way as the application clients. The final category is other EJBs running within the EJB container.
These communicate via standard Java method calls through a local interface.

J2EE Technologies

J2EE technologies that provide the mechanics we need to build large, distributed enterprise applications. This large collection, of quite disparate technologies, can be divided according to use:
=> The component technologies
These technologies are used to hold the most important part of the application-the business logic. There are three types of components: JSP pages, servlets and Enterprise JavaBeans.
=> The service technologies
These technologies provide the applications components with supported services to function efficiently.
=> The communication technologies
These technologies, which are mostly transparent to the application programmer, provide the mechanisms for communication among different parts of the application, whether they are local or remote.

No comments: