DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones AWS Cloud
by AWS Developer Relations
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones
AWS Cloud
by AWS Developer Relations
The Latest "Software Integration: The Intersection of APIs, Microservices, and Cloud-Based Systems" Trend Report
Get the report
  1. DZone
  2. Coding
  3. Java
  4. Java EE: The Basics

Java EE: The Basics

Abhishek Gupta user avatar by
Abhishek Gupta
CORE ·
Apr. 29, 14 · Interview
Like (3)
Save
Tweet
Share
38.08K Views

Join the DZone community and get the full member experience.

Join For Free

wanted to go through some of the basic tenets, the technical terminology related to java ee. for many people, java ee/j2ee still mean servlets, jsps or maybe struts at best. no offence or pun intended!

this is not a java ee 'bible' by any means. i am not capable enough of writing such a thing! so let us line up the 'keywords' related to java ee and then look at them one by one

  • java ee
  • java ee apis (specifications)
  • containers
  • services
  • multitiered applications
  • components

let's try to elaborate on the above mentioned points.

 ok. so what is java ee? 

'ee' stands for enterprise edition. that essentially makes java ee - java enterprise edition. if i had to summarize java ee in a couple of sentences, it would go something like this

 "java ee is a platform which defines 'standard specifications/apis' which are then implemented by vendors and used for development of enterprise (distributed, 'multi-tired', robust) 'applications'. these applications are composed of  modules or 'components' which use java ee 'containers' as their run-time infrastructure." 

 what is this 'standardized platform' based upon? what does it constitute? 

  • the platform revolves around  'standard' specifications or apis  .
  • think of these as  contracts defined by a standard body  e.g. enterprise java beans (ejb), java persistence api (jpa), java message service (jms) etc.
  • these contracts/specifications/apis are  implemented by different vendors  e.g. glassfish, oracle weblogic, apache tomee etc

 alright. what about containers? 

  • containers can be visualized as  'virtual/logical partitions'  .
  • each container supports a subset of the apis/specifications defined by the java ee platform
  • they provide  run-time 'services'  to the 'applications' which they host

the java ee specification lists 4 types of containers

  • ejb container
  • web container
  • application client container
  • applet container

 java ee containers 

image

i am not going to dwell into details of these containers in this post.

 services?? 

  • well,  'services'  are nothing but a result of the vendor implementations of the standard 'specifications' (mentioned above). examples of specifications are -  jersey  for jax-rs (restful services),  tyrus  (web sockets),  eclipselink  (jpa),  weld  (cdi) etc.
  • the 'container' is the interface between the deployed application ('service' consumer) and the application server.

here is a list of 'services' which are rendered by the 'container' to the underlying 'components' (this is not an exhaustive list)

  •  persistence  - offered by the java persistence api (jpa) which drives object relational mapping (orm) and an abstraction for the database operations.
  •  messaging  - the java message service (jms) provides asynchronous messaging between disparate parts of your applications.
  •  contexts & dependency injection  - cdi provides loosely coupled and type safe injection of resources.
  •  web services  - jaxrs and jaxws provide support for rest and soap style services respectively
  •  transaction  -  provided by the java transaction api (jta) implementation

 what is a typical java ee 'application'? what does it comprise of? 

applications are composed of different '  components  ' which in turn are supported by their corresponding '  container  '

supported 'component' types are:

  •  enterprise applications  - make use of the specifications like ejb, jms, jpa etc and are executed within an ejb container
  •  web applications  - they leverage the servlet api, jsp, jsf etc and are supported by a web container
  •  application client  - executed in client side. they need an application client container which has a set of supported libraries and executes in a java se environment.
  •  applets  - these are gui applications which execute in a web browser.

 how are java ee applications structured? 

as far as java ee 'application' architecture is concerned, they generally  tend follow the n-tier model consisting of client tier, server tier and of course the database (back end) tier 

  •  client tier  - consists of web browsers or gui (swing, java fx) based clients. web browsers tend to talk to the 'web components' on the server tier while the gui clients interact directly with the 'business' layer within the server tier
  •  server tier  - this tier comprises of the  dynamic web components  (jsp, jsf, servlets) and the  business layer  driven by ejbs, jms, jpa, jta specifications.
  •  database tier  - contains 'enterprise information systems' backed by databases or even legacy data repositories.

 generic 3-tier java ee application architecture 

overview-multitieredapplications

java ee - bare bones, basics.... as quickly and briefly as i possibly could. that's all for now! :-)

stay tuned for more java ee content, specifically around the latest and greatest version of the java ee platform -->   java ee 7  

you may want to check out this introductory post about java ee 7 to begin with.

happy reading!

Java EE Java (programming language) application Container Web Service Java Message Service Java Persistence API Web container Relational database Dependency injection

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • Key Elements of Site Reliability Engineering (SRE)
  • How Agile Architecture Spikes Are Used in Shift-Left BDD
  • 7 Ways for Better Collaboration Among Your Testers and Developers
  • Browser Engines: The Crux of Cross-Browser Compatibility

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends: