Download as pdf or txt
Download as pdf or txt
You are on page 1of 10

Unit-|

Chapter
1
Understanding
Java EE

Chapter Outline
1.1 What is an Enterprise Application?
AL Árchitecture of an Enterprise Application
1.3 What is Java Enterprise Edition?
A4 Java EE Technologies
1.5 Java EE Evolution
1.6 Glassfish Server
1.7 Chapter Based Questions

What is an Enterprise Application?


The Java EE platform is designed to help developers create large-scale, multi-tiered,
scalable, reliable, and secure network applications. A shorthand name for such applications
is "enterprise applications," so called because these applications are designed to solve the
problems encountered by large enterprises.
Enterprise applications are not only useful for large corporations, agencies, and governments,
however.
The benefits of an enterprise application are helpful, even essential, for individual
developers and small organizations in an increasingly networked world.
The features that make enterprise applications powerful, like security and reliability, often
make these applications complex.
The Java EE platform reduces the complexity of enterprise application development by
providing a development model, API, and runtime environment that allow developers to
concentrate on functionality.
Enterprise as work means communities and organizations. Therefore we can say enterprise
applications respond to the requirements of organizations, enterprise problems and focuses
these.
Enterprise JAVA

The common features of enterprise Application:


Extreme amount of data
2. Complicated data relations
3 Spccific busincss domain
4 Distributcd systems and integration with other systems
5. Concurrent access
6. Multiple interface for user group

2Architecture of an Enterprise Application


Architecture is the extension of the concept of multi-tier architecture and available
technologies resulting in acustom made platform that can run across hardware and software
framework found across an cnterprise, often spanning geographical boundaries.
Adistributed, multi-tiered, application model can be described as an enterprise application.
Application logic is divided into components according to functions and the various
application components put together make up the enterprise application.
These components are physically installed on different computers, at different physical
locations, depending on the tier in the multi-tiered environment to which the application
component belongs. All components work together in harmony across the enterprise.
Enterprises architecture is divided into the following tiers:
1. Client Tier Services run on the client machine
2. Web Tier Services run on the server
3. Business Tier Services run on the server
4. Enterprise Information System Tier Software run on the EIS server

1.3 What is Java Enterprise Edition?


Java EE is a set of coordinated technologies and practices that enable
deploying managing multi-tier Server centric enterprise applications. developing,
It is a collection of standardized components,
containers and
deployingdistributed applications within a well-defined distributedservices for creating and
computing architecture.
Java Enterprise Edition has brought in a powerful set of APIs that has helped the
not only reduce the development time and the application developers
complexity but also the
application performance.
Commercial applications that have to function at this level do not run on a single PCas they
require significantly more computing power and throughput than what a single PCcan provide.
Commercial application is normally sectioned into functional segments, each such found to
a specific Master or Child busineSs proceSs at a specific
location, then on appropriate
hardware platform(s) at that location.
Finally, the business data generated and manipulated at that location would be streamed and
into one central point say tor example Enterprise headquarters. This is the essence
distributed computing.
Understanding Java EE

Java EE provides a collection of:


Startdardized componcnts that facilitate thecrafting of such commercial applications
Standard interfaces that define how the various application modules interconncct
Standard services that define how the differcnt software modules communicate
Java EE significantly reduces the cost and complexity deployed of developing and deploying
multi-tier solutions, resulting in services that can be rapidly and easily enhanced,

1.4 Java EE Technologies


It can be classified into different categorics as follows:
1. Web Application Technologies
Java Servlet
JavaServer Pages Technology
JavaServer Pages Standard Tag Library
JavaServer Faces Technology
Java Message Service API
JavaMail API and the JavaBeans Activation Framework
Java API for XML Processing
Java Naming and Directory Interface
2. Enterprises Application Technologies
Contexts and Dependency Injection for Java (Web Beans)
Dependency Injection for Java 1.0
Bean Validation
Enterprise JavaBeans
Java EE Connector Architecture
Java Persistence API
Common Annotations for the Java Platform
Java Message Service API
Java Transaction API (JTA)
JavaBeans Activation Framework (JAF)
JavaMail
3. Java EE Web Services Technologies
Java APIfor RESTful Web Services (JAX-RS)
Implementing Enterprise Web Services
Java API for XMLBased Web Services (JAX-WS)
Java Architecture for XML Binding (JAXB)
Web Seryices Metadata for the Java Platform
Java API for XMI-Based RPC (JAX-RPC)
Java APls for XML. Messaging [or SOAP with Attachments APl for Java (SAAJ))
Java API fr XML Registries (JAXR)
Streaming APIfor XMI (StAX) in Java SE)
Enterprise JAVA

4. Java EE Management and Security Technologies


Java Authentication Service Provider Interface for Containers
Java Authorization Contract for Containers
Java EE Application Deployment
J2EE Management
Here we arc going to explain few of the famous technologies of Java EE from each category
which is listed above.

1. Web Application Technologies


JavaServlet API: The Java Serviet runs on the server side without an application of its own as
HTML user interface (U) or an application GUI. They are used to extend the applications
hosted by the web servers. Several web applications are developed with Java Servlet extensions.
JavaSerrver Pages Technology: It gives the simple and fast way to create document.the dynamic
content. It facilitates the addition of snippets of servlet code into the text-based
JavaServer Pages Standard Tag Library: It has the iterator and conditional tags to handle
flow control, tags for accessing databases with SQL, manipulate XML documents,
internalization, and commonly used functions.
JavaServer Faces Technology: It forms the UI framework to build web applications.
Java Message Service API: The combination of Java technology with enterprise messaging,
the JMS API forms the powerful tool to solve the enterprise computing problems.
JavaMail API and the JavaBeans Activation Framework: It is used to send e-mail
notifications. In conjunction, one may use the JavaBeans Activation Framework (JAF) APL
which detenines the type of data, encapsulate the access, and discover the operations available.
Java API for XML Processing: It is flexible and JAXP facilitate the use of any XML
compliant parser or the XSL processor within the application and supports the W3C schema.
Java Naming and Directory Interface: It provides the functionality of naming and
directory, enable the applications to access several naming and directory services.
2. Enterprises Application Technologies
Conterts and Dependency Injection for Java (Web Beans): This specification unifies the
JavaServer Faces (JSF)-managed bean component model with the Enterprise JavaBeans
(EJB) component model to simplify the programming model for web-based applications.
Enterprise JavaBeans: Enterprise JavaBeans (EJB) technology is the server-side
component architecture for the Java Platform, Enterprise Edition (Java EE). EJB technology
enables rapid and simplified development of distributed, transactional, secure and portable
applications based on Java technology. The Java Persistence API, which provides a POJO
persistence model for object-relational mapping, is also part of JSR 220, although its use is
not limited to EJB software componcnts.
Java Persistence API: The Java Persistence API provides a POJO
object-relational mapping. Thc Java Persistence APl was developed bypersistence
the EJB
model for
3.0 softwae
expert group as part of JSR 220, but its use is not limited to EJB
can also be used directly by web applications and application software components. It
clients, and even outside the
UnderstandingJava EE

Java EE platform, for cxample, in Java SEapplications. The Java Data Objects (JDO) APIis
another standard for Java persistence, devclopcd under the Java Community Process.
# Java Message Service API: The Java Message Service (JMS) API is a messaging standard
that allows application components based on the Java 2 Platform, Enterprise Edition (JI2EE)
to create, scnd, receive, and read messages. It cnables distributed communication that is
looscly coupled, reliablc, and asynchronous.
Java Transaction API(JTA): JTA specifies standard Java interfaces between a transaction
manager and the parties involved in a distributcd transaction system: the resource manager,
the application server, and the transactional applications. The JTA specification was
developcd by Sun Microsystems in cooperation with leading industry partners in the
transaction proccssing and databasc system arcna.
3. Java EE Web Services Technologies
Java API for RESTful Web Services (JAX-RS): Java API for RESTful Web Services
(JAX-RSJ defincs APIs for the development of web services built according to the
Representational State Transfer IRFSTI architectural style.
Java API for XM-Based Web Services (JAX-WS): It provides support for web services
using the SOAP/HTTP protocol.
Java API for XML Registries (JAXR): The JAXR API provides a set of distributed
registry services that enables business-to-business integration.
4. Java EE Management and Security Technologies
a standard
Java Authentication Service Provider Interface for Containers: To define
interface by which authentication modules may be integrated with containers such that these
modules may establish the authentication identities used by containers.
Contract for
Java Authorization Contract for Containers: The Java Authorization
Containcrs (Java ACC) specification defines new java.security.Permission classes to satisfy
the Java 2 Platform, Enterprise Edition (J2EE) authorization model. The Java ACC
specification defines the binding of container access decisions to operations on instances of
these permission classes. It defines the semantics of policy providers that employ the new
permission classes to address the authorization requirements of J2EE.

1.5 Java EE Evaluation


Java EES
2. Java EE6
3. Java EH7

1. Java EE5
It ís íntroduced in May 11, 2006 by Oracle.
The ain of the Java EH 5 platform is to provide developers a powerful set of APIs while
reducing development time, rcducing application complexity, and improving application
performane,
6

Enterprise JAVA
Java EE 5 SDK
Features
First robust,
commercial, compatible Java EE 5implementation. It is free for
2
deployment, and redistribution.
Ease of development with major revamp of programming model.
development,
3
EJB 3.0 support for POJOs means less to learn, less to code, and less to
4 naintain.
New Java Persistence API makes obicct-relational mapping cleaner and
casicr.
New and updated web services (JAX-wS 2.0 and JAXB 2.0) simplifies SOA
6
JavaServer Faces 1.2 facilitates building Web 2.0 applications with Ajax. implementation
7.
Higher throughput, faster response time, and improved management features to
deployment. streamline
8 30 percent faster startup time with 30
percent less
9. Web services performance increased by up to 5 memory
10. times.
Improved web services management.
I1. Integrated with Sun's NetBeans open
source IDE and supports an Eclipse plug-in,
developers the choice of complete end-to-end development and
offering
12.
Provides a visual SOA development and deployment runtime environment.
environment. environment with integrated NetBeans
13. Integrated composite
14. The code for
application support through JBI and BPEL
Sun GlassFish Enterprise Server
source Project GlassFish. v2.1.1 is 100 percent derived from open
2. Java EE6
It is introduced in December 10,
2009.
The most important goal of the Java
EE 6
acommnon
foundation for the various kinds platform is to
of componentssimplify development by
Developers benefit from productivity in the Java EE platform. providing
improvements with more annotations and less XML
configuration, more Plain Old Java Objects
Features of Java EE6 (POJOs), and simplified packaging.
1. Profiles: configurations
of Java EE
Specificaly, the Java EE 6the platform platform targeted at specific classes of
generation web
applications, as well introduces
as a
a
lightweight
Full Profile
applications.
Web Profile targeted at next-
and provides the ful! power of the that contains all
2. New Java EE 6platform for Java EE technologes
technologies, including the
(a) Java API for following: enterprise applications.
RESTful Web Services (JAX-RS)
(b) Managed Beans
(c) Contexts and
known as CD! Dependency Injection for the Java EE
(d) Dependency njection for Java (JSR 330) Platform (JSR 299), informally
(e) Bean Validation (JSR 303)
() Java Authentication Service
Provider Interface for
Containers (JASPIC)
Understarnding Java EE

New features for Enterprise JavaBeans (EJB) Components


1. An Enterprise JavaBeans (EJB) componcnt, or cnterprise bean, is a body of code having
ficlds and methods to implement modules of business logic. You can think of an enterprise
bean as a building block that can be uscd alone or with other enterprise beans to execute
business logic on the Java EE server.
2. In the Java EE 6platform, new enterprise bean features include the following:
(a) The ability to package local enterprise beans in a WAR file
(b) Singleton session beans, which provide easy access to shared state
(c) A lightweight subset of Enterprise JavaBeans functionality (EJB Lite) that can be
provided within Java EE Profiles, such as the Java EE Web Profile.
3The Java EE 6 platform requires Enterprise JavaBeans 3.1 and Interceptors 1.1. The
Interceptors specification, which is part of the EJB 3.1 specification, makes more generally
available the interceptor facility originally defined as part of the EJB 3.0 specification.
New Features for Servlets
1. Java Servlet technology lets you define HTTP-specific servlet classes. A serviet class
extends the capabilities of servers that host applications accessed by way of arequest
response programming model. Although servlets can respond to any type of request, they
are commonly used to extend the applications hosted by web servers.
2. In the Java EE 6 platform, new Java Servlet technology features include the following:
(a) Annotation support
(b) Asynchronous support
(c) Ease of configuration
(d) Enhancements to existing APls
(e) Pluggability
3. The Java EE 6 platform requires Servlet 3.0.
New Features for JavaServer Faces Components
1. JavaServer Faces technology is a user interface framework for building web applications.
Themain components of JavaServer Faces technology are as follows:
2. AGUI component framework.
3. A flexíble model for rendering components in different kinds of HTML or different markup
languages and technologies. A Renderer object generates the markup to render the component
and converts the data stored in a model object to types that can be represented in a view.
4. A standard RenderKit for generating HTML/4.01 markup.
5. The following features support the GUI components:
(a) Input validation
(b) Event handling
(c) Data conversion between model objects and components
(d) Managed model object creation
(e) Page navigation configuration
(f) Expression Language (EL)
Enterprise JAVA
(p) A this functionality is available using standard Java APIs and XML-based

configuration files. Faces includethe following:


In the Java EE 6 JavaServer
(a) The ability toplatform, new fcaturcs
use anotations of of a configuration file to spccify managed beans
instcad
and other componcnts
(JSP) technology using
cClets, a display technology that replaces JavaServer Pages
XHTML files
(c) Ajax support
(d) Composite componcnts
(c) Implicit navigation
7. Ihe Java EE 6 platform requircs JavaServer Faces 2.0 and Expression Language Z.2.
Java EE7
This technology is introduced in May 28, 2013.
Themost important goal of the Java EE 7platform is to simplify development by providing
a common foundation for the various kinds of components in the Java EE platform.
Developers bencfit from productivity impro vements with more annotations and less XML
configuration, more Plain Old Java Objects (POJOs), and simplified packaging.
The Java EE 7 Platform includes the following New Features
1 New technologies, including the following:
(a) Batch Applications for the Java Platform
(b) Concurrency Utilities for Java EE
(c) Java API for JSON Processing (JSON-P)
(d) Java API for WebSocket
2 Implement the new Java API for Batch Applications, JSON and Websocket in your code
(JSRs 352, 353 and 356).
3 Enable JAX-RS 2.0, EL 3.0 and JMS 2.0 Major enhancements in your code.
4. Implement the enhancements in JSF and JSP in your code.
5 Implement the enhancements in CDIand Bean Validation in your code.
6. Implement the enhancements in EJBand JPA in your code.
7. Describe and leverage the enhancements in the Java EE 7 platform.
Understand the new features for Java EE 7: JSON, WebSockets, HTML 5. JSF & Servlets.
9 Update existing applications to EE 7
10. Write applícations for Java EE 7and take advantage of the benefits of a cloud
and of the Java EE 7 improved simplification. Extend the range of the Java EEenvironment
platform to
encompass emerging technologies in the web space.

1.6 Glassfish Server


ClassFish is a Java application server projcct created by Sun Microsystems that allows
many
developers to generate enterprise technologies that are convenient and scalable. as well as
additional services that can be installed based on preference
Understanding Java EE 9

Glassfish Server Open Source Edition is an open source application server built within the
GlassFish community.
Oracle GlassFish Server is based on GlassFish Server Open Source Edition.
GlassFish Server users benefit from a vibrant community that offers self-support,
contributes code and product features, product ideas and feedback, bug reports, and more.
It is a free, dual-licenscd software under the GNUGeneral Public License (GPL) and the
Common Development and Distribution License (CDDL). GlassFish was acquired by
Oracle in 2010.
GlassFish was developed based on a source code that was released by Sun and Oracle's
Toplink persistence system.
The projcct was launched in 2005 and the first version that supported Java EE S was
released in 2006.
The reference implementation of Java EE is GlassFish, so it supports JMS, JavaServer Pages,
Enterprise JavaBcans, RMI, JPA and serviets. Because of its nature, developers can create
scalable and portable applications that casily integrate with legacy systems and technologies.
Oracle GlassFish Server provides a server for the development and deployment of Java
Platform, Enterprise Edition (Java EE platform) applications and web technologies based on
Java technology.
GlassFish Server 3.1 provides the following:
A lightweight and extensible core based on OSGi (Open Service Gateway Initiative)
Alliance standards
Aweb container
An easy-to-use Administration Console for configuration and management
Update Tool connectivity for updates and add-on components
Support for high availability clustering and load balancing
Features and Resources
GlassFish Server 4.1 provides a server for the development and preparation of Java T"
Platform Enterprise Edition (Java EE) and dynamic and scalable HTML5 applications.
Key features inchude applied science Java seven compatibility, modularity, and rapid
repetitive development.
Main Features
GlassFish Server supports Java EE seven, which provides the basis for delivering dynamic
and scalable hypertext language applications.
For example, the Java APIfor WebSocket allows bidirectional low-latency communication.
The Java API for JSON processing simplifies information analysis for transportable
applications. The Java APIfor RESTful Net Services two.0, the performance utilities for
Java EE and Servlet 3.1l add competency options to change extremely scalable applications
to handle additional HTMLS buyers at the same time.
Java EE seven and GlassFish Server four.1 embrace the following new and updated Java
applied science standards:
10
Enterprise JAVA
New or Significant Updates
Java APIfor processing JSON
(JSON-P)
Java APIfor WebSockct Batch application for Java plattorm
Java EE Compctency Utilitics
Java Message Service (JMS) 2.0
Java APIfor RESTful Net Services
(JAX-RS)
Updated
1. Enterprise Java
Beans (EJB) 3.2
2. Contexts and Dependency
3. Java
Injection for Java EE (CDI) one.2
4.
Persistence API(JPA) 2.1
Java Server Faces (JSF) 2.2
5. Java Servlet 3.1
6.
Bean Validation (BV) 1.1
7. Language of
8.
expression (EL) 3.0
Interceptors 1.0
9. Java Transaction (JTA) one.2
10. Java Server Pages (JSP) 2.3
11. JavaMail 1.5
Modularity
1. The modular design of
Alliance and ensures thatGlassFish Server is based
the GlassFish Server onlyprimarily on the standards of the OSGi
footage required for applications that only starts with the modules than the
measures the measurement. square
2. As a result, the boot times and
the memory
3. There are lots of his services available
as
consumption decrease.
freelance services.
Fast Repetitive Development
1. Using fashion days,
such as NetBeans and Eclipse, the
simplified for the web application
2. The browser-edit-save-update.
GlassFish server allows such a simple
development cycle s
protection communication when an existing development cycle for protocol session data
application is redistributed.
1.7 Chapter Based Questions
1. Explain Enterprise application of java and its
2. Write short notes on java enterprise edition. architecture.
3. Explain java enterprise application technologies.
4. Write short notes on Java EE Evolution.
5 Explain Glass fish server and its use.

You might also like