Wednesday, 16 July 2014

Java EE

             Java Enterprise Edition is Oracles's enterprise Java computing platform. It was earlier called J2EE , Java 2 Platform, Enterprise Edition. But since the 5th edition , "2" has been dropped from its name.Some people have started to call it JEE .There is nothing named JEE ! Never use that name ! The correct name is Java EE.

             One of the big reasons that the name was changed is because we wanted to emphasize on the fact that all the platforms are "Java" . The old names J2EE, J2ME and J2SE don't do that .

INTRODUCTION

Java EE is an ongoing standard for producing scalable, highly-available and secure enterprise applications .The standard defines that "Services should be provided by Servers" that support Java EE. These servers supply Java EE containers in which Java EE components will execute.


DISTRIBUTED MULTI-TIERED APPLICATIONS

The Java EE platform uses a multitiered distributed application model for both enterprise applications. Application logic is divided into components according to function, and the various application components that make up a Java EE application are installed on different machines depending on the tier in the multitiered Java EE environment to which the application component belongs.
    
        - Client-tier components run on the client machine.

        - Web-tier components run on the Java EE server.

        - Business-tier components run on the Java EE server.

        - Enterprise information system (EIS)-tier software runs on the EIS server.


MULTI-TIERED APPLICATIONS


Java EE COMPONENTS


Java EE applications are made up of components. A Java EE component is a self-contained functional software unit that is assembled into a Java EE application with its related classes and files and that communicates with other components. The Java EE specification defines the following components:

         - Application clients and applets are components that run on the client.
        
         - Java Servlet and JavaServer Pages (JSP) technology components are Web components that run on the server.

         - Enterprise JavaBeans (EJB) components (enterprise beans) are Business components that run on the server.


          J2EE components are written in the Java programming language and are compiled in the same way as any program in the language. The difference between J2EE components and "standard" Java classes is that J2EE components are assembled into a J2EE application, verified to be well formed and in compliance with the J2EE specification, and deployed to production, where they are run and managed by the J2EE server.


CLIENT COMPONENTS

It is of two types : web client and application client 

Web Client : 

A Web client consists of two parts:

- Dynamic Web pages containing various types of markup language (HTML, XML, and so on), which are generated by Web components running in the Web tier, and a

- Web browser, which renders the pages received from the server.


A Web client is sometimes called a thin client. Thin clients usually do not do things like query databases, execute complex business rules, or connect to legacy applications. 

Application Client :

A Java EE application client runs on a client machine and provides a way for users to handle tasks that require a richer user interface than can be provided by a markup language. 

It typically has a graphical user interface (GUI) created from Swing or Abstract Window Toolkit (AWT) APIs, but a command-line interface is certainly possible.

Application clients directly access enterprise beans running in the business tier. However, if application requirements warrant it, a Java EE application client can open an HTTP connection to establish communication with a servlet running in the Web tier.
























WEB COMPONENTS

Java EE Web components can be either servlets or JSP pages.

-  Servlets are Java programming language classes that dynamically process requests and construct responses.

-  JSP pages are text-based documents that execute as servlets but allow a more natural approach to creating static content.

NOTE : Static HTML pages and applets are bundled with Web components during application assembly, but are not considered Web components by the Java EE specification. Server-side utility classes can also be bundled with Web components and, like HTML pages, are not considered Web components.




BUSINESS COMPONENTS

Business code, which is logic that solves or meets the needs of a particular business domain such as banking, retail, or finance, is handled by enterprise beans running in the business tier. 

                          Enterprise bean receives data from client programs, processes it (if necessary), and sends it to the enterprise information system tier for storage. An enterprise bean also retrieves data from storage, processes it (if necessary), and sends it back to the client program.




There are three kinds of enterprise beans: 

-  Session beans :
     It represents a transient conversation with a client. When the client finishes executing, the session bean and its data are gone. 

-  Entity beans :
    It represents persistent data stored in one row of a database table. If the client terminates or if the server shuts down, the underlying services ensure that the entity bean data is saved.

-  Message-driven beans :
   It combines features of a session bean and a Java Message Service ("JMS") message listener, allowing a business component to receive JMS messages asynchronously.


 For information on message-driven beans


ENTERPRISE INFORMATION SYSTEM TIER

It handles Java EE architecture connectivity to the resources that are not a part of Java EE .These include variety of services such as :

- Enterprise Resource Planning (ERP)
- Database Systems
- Legacy Information Systems

Java EE application components might need access to enterprise information systems for database connectivity.


We have used a lot of new terms in this post but as you will read more thing will become clearer.
Here are some links that I found useful :

http://docs.oracle.com/javaee/6/tutorial/doc/
http://www.deknight.com/java/jee-architecture-java-enterprise-edition-architecture.html
http://www.slideshare.net/keshabnath/j2-ee-container-components

No comments:

Post a Comment