Java EE - Overview

Terms

RI - Reference Implementation : glassfish.java.net/downloads/ri/
JCP - Java Community Process : work on making decisions of JSR
JSR - Java Specification Request : request for smth

JEE Application Server

It is a piece of software which takes care of the business logic.

Tiers
- 2-tier system: client - database
- 3-tier system: client - application server - database.
- 3-tier systems are also called N-tier or Multi-tier.
* all components of the system can be on the same machine.

Application server consists of:
  • container of web-apps (JSP, JSF etc)
  • EJB-container
EJB can be treated as:
  • component - addition to POJO, described with annotation
    • session beans - for business logic description
      • stateful - preserve state between client calls
      • stateless - do not preserve their state between calls
    • message-driven beans - also used for business logic but never are called by clients directly
    • entities - data storage
  • framework - technology which provides a lot of ready-to-use implementations (security, transactions handling, work with data etc)
So, in a few words:
EJB is for core logic of an application.
EJB container can inject datasources (for instance JDBC datasources) and other resources, that the program only references by name, and that are really defined in the application server.

JPA is a part of EJB specification

JPA is just a specification, here is a list of implementations used in different application servers:
App ServerJPA Implementation
GlassFish v3/v4EclipseLink
JBossHibernate
WebLogic 10.3.1+OpenJPA/Kodo or EclipseLink
WebSphere 6.1+OpenJPA
 ! JPA 2.0 RI is EclipseLink 

Comments