0

An introduction to the JEE Paltform

Posted by Guillermo García on 12:05 PM in
¿What is the "JEE Platform"?

Is an architecture for implementing enterprise-class application using Java Technology, trying to provide a vendor-neutral, component-based application model. Obviously, this platform fits with others Java Platforms, like Micro Edition and Standard Edition in order to satisfy any need.

The primary goal of the JEE Platform, also known as "JEE Model", is simplifying the development life cycle of enterprise applications. Knowing the complexity of publishing a business logic to a wide number of users throughout an enterprise, we can take off the technical issues from the equation using a model like the JEE Platform.


JEE Technology Elements

At the core of the JEE Platform we found the Java Standard Edition Platform (JSE), pillar for all the JEE Platform's functionality. The next list show the modules of the JSE included as part of the JEE Platform:
  • Java Naming and Directory Interface (JNDI API)
  • Remote Method Invocation (RMI)
  • Common Object Request Broker Architecture (CORBA)
  • Structured Query Language (SQL)
  • Java Transaction API (JTA)
On top of the JSE, the JEE Platform build rich functionality for enterprise-class application. These functionalities are also called "Java EE Technology Suite". This Suite is logically separated into three groups (sometimes called "features"):

  • Application Components: used to create the application business logic and control elements. Their main components are: Servlets and JSP, Entity Classes, EJB Components.
  • Integration Elements: Allow a Java EE application to interact and incorporate functionalities from other applications and systems. Their main elements are: JavaMail, JMS API, Web Services, ebXML, JAX-WS, Connectors.
  • Container management: Provide runtime support to Java EE applications components. Their main elements are: Declarative Transaction, Declarative Security, JMX Specification.
JEE Specification

The JEE Model has a well defined specification that indicates the roles and responsabilities of vendors, tools providers and component developers. The specification outline the rules that each of these participants must follow when they develop Java EE Technology Elements and supporting services. The specification is maintained by the Java Community Process.

The specification defines three things: Components, APIs and Infractructure Requirements. The components and APIs allow a component developer to create enterprise-class application, and the infrastructure requirements define a reliable runtime environment for distributed enterprise application.


JEE APIs

The JEE APIs define the contract between the component developer and the platform provider. This strategy allows vendor-independant components implementations, capable of running in any JEE Specification-complaint platform. These contracts are defined as "java interfaces" of the java programming language.

JEE Containers

All JEE components reside in a container. These containers provide runtime support for the components which interact with any other component or system through the protocols and methods provided by the container and, thanks to that, the container is enabled to inject services and/or runtime support for any interactions which may need it.

The JEE Platform has three types of containers, each of them provides specific features to each type of components it supports.
  1. Web Container: supports Servlets and JSP Pages
  2. EJB Container: supports Entity and EJB Components
  3. Application Client Container: supports client applications (JSE)
JEE Services

Java EE Services can be group into four categories:
  • Deployment-Based Services: services the application developer can request from a XML file called "deployment descriptor". These services usually include persistence, transaction and security services.
  • API-Based Services: services the application developer request programmatically adding code into a component. These services usually include naming and messaging services, and a wide number of connectors.
  • Inherent Services: services automatically supplied by the container to components on as-needed basis. These services usually include life-cycle management, multithreading handling and RMI or CORBA communications.
  • Vendor-Specific Services: considerated features of the vendor platform (server) and usually provide Scalability, Failover and Load Balancing services.
JEE API-Based Services

Java EE Components and Containers have access to a range of important API-Based services as defined by the JEE Specification. These services are in constant evolution through the JEE Plaform versions. The next list show these API separeted by JEE Platform version:

J2EE 1.3
  • Java Database Connectivity (JDBC): provide vendor-neutral access to database operations.
  • Java Naming Directory Interface (JNDI): provide vendor-neutral access to directory services as NIS+ and LDAP.
  • Remote Method Invocation (RMI over IIOP and IDL): provide a cross-language manner to invoke remote methods.
  • JavaBeans Activation Framework (JAF): is a standard extension to the Java platform that lets you take advantage of standard services to: determine the type of an arbitrary piece of data; encapsulate access to it; discover the operations available on it; and instantiate the appropriate bean to perform the operation(s).
  • JavaMail API: Allows send email in a vendor-independent way.
  • Java EE Connector Architecture: provide integration modules, called resourse adapters, for legacy systems.
  • Java Message Services (JMS): Allow send and receive asynchronous messages.
  • Java Transaction API (JTA): Allow initiate and monitor distributed transactions.
J2EE 1.4
  • Java Authentication and Authorization Services (JAAS): Allow integrate an application server to a external security infrastructure.
  • Java API for XML Processing (JAXP): provide access to XML parsers.
  • Simple Object Access Protocol (SOAP), SOAP with Attachments API for Java (SAAJ), Java API for XML Registries (JAXR), Java API for XML Web Services (JAX-WS): These four features allow application to initiate and responds XML-based RPC calls.
  • Java Management Extensions (JMX): exposes the internal operation of a application server an its components to an external management tool.
  • Timer Services: Allow run scheduled background tasks.
Java EE 5
  • Java Persistent API (JPA): provide access to object-relational mapping services.



The N-Tier Architectural Model

Usually, all JEE enterprise application implements the N-Tier Architectural model. This model separated the fucntionalities of an application in tiers, based in servers specializations and the division of labor motivated by these servers. The tiers of this model are:
  • Client Tier: Responsible of use or consume services
  • Presentation Tier: Responsible of the interface between the service implementation and the client
  • Business Tier: Responsible of the "business logic" of the service (service implementation)
  • Integration Tier: Responsible of the interface between the service implementation and any other component or external system (like a database)
  • Resource Tier: Responsible of the data persistent or data consuming.
These tiers fit in different containers of the JEE Platform, but this depends on the JEE Tiered Architecture implemented by the application. The four most known architectures are:
  • Web-centric architecture: Presentation, Business and Integration Tier reside in the web container.
  • EJB Component-centric architecture: Presentation Tier reside in the web container, and the Business and Integration Tier reside in the EJB Container.
  • B2B Application Architecture: Is an extended EJB Componet-centric architecture that uses one JEE Server in each business location, and allows communication between the web and ejb containers. The web containers communicate using XML over HTTP (loosely coupled) and the ejb containers communicate directly (tightly coupled).
  • Web Service Architecture: All the tiers resides in the EJB container. The presentation is through a web services (using wsdl), the services implementation (business tiers) must be in a EJB Component or a Stateless EJB (former versions).

JEE Patterns


Even with a framework, the component developer will be confronted with a lot of common issues, mainly related to logic separation and encapsulation. This kind of issues are very common in the developer community and the "solutions" are already designed. These "designed solutions" are called Design Patterns, and they are, conceptually, platform independent. But obviously, when you decide which platform you will use to develop an application, these patterns will have a "concrete design" that considers the available components in that platform.

The JEE Patterns are the "concrete designs" for the most used design patterns of the "Gang of Four" catalog (GoF), that considers the available components and technologies in the JEE Platform.

One "JEE Pattern" solves a particular and well defined problem, if is correctly implemented. So an application developer must implement one pattern for each problem present in the software (avoiding the unnecessary use of patterns, in order to simplify the application).

NOTE: The JEE Pattern Catalog classify patterns by tier.

JEE BluePrints Catalog for JEE 5

Sun developer Networks has a Catalog of guidelines and examples code that helps any JEE Component Developer to achieve the creation of a good JEE Application.

0 Comments

Copyright © 2009 ggarciao.com
- Cup of Java -
All rights reserved.