Book Image

Java EE 7 First Look

By : Armel Fabrice NDJOBO
Book Image

Java EE 7 First Look

By: Armel Fabrice NDJOBO

Overview of this book

For several years, the development of robust, scalable, and secured applications was a headache for software companies. They had to use proprietary solutions with non-standard methods. With Java EE, many of these solutions have been standardized, simplified, adapted to the needs of the developer, and made freely available to the community. Thus, it is now possible to develop truly robust, secure, and scalable applications at a lower cost using tools such as: Eclipse, NetBeans, and GlassFish.Java EE 7 First Look is a practical guide which, through the creation of an online pre-registration website, will introduce you to the novelties of Java EE 7 and give you ideas for utilizing them.Giving you an insight on new features introduced in Java EE 7, this book begins with the objectives of Java EE 7 and then covers the new specifications added in Java EE 7. Next, you will move on to the improvements made in APIs and EJBs and how to work with them. You will also learn how to ensure that the quality of data is maintained that has been manipulated by your application and gives you the opportunity to put a small part of AOP (Aspect Oriented Programming) in action.Finally, the book will give you some ideas to realize n-tier applications using the Java EE platform and will also provide some guidance for the integration of your Java EE application to heterogeneous systems with which your application will interact.After reading Java EE 7 First Look, you'll have a good idea about the changes brought in by Java EE 7, as well as how to make the best use of these to build a large-scale application.
Table of Contents (16 chapters)

Contexts and Dependency Injection


The Contexts and Dependency Injection(CDI) for Java EE 1.1 Specification was developed under JSR 346. This section just gives you an overview of improvements in the API. The complete document specification (for more information) can be downloaded from http://jcp.org/aboutJava/communityprocess/final/jsr346/index.html.

What is CDI ?

Introduced in the Java EE platform from Version 6, Contexts and Dependency Injection for Java EE (CDI) is a specification that has brought to the platform a set of services that simplify the management of the lifecycle of objects, and standardize and encourage the use of dependency injection in the Java EE environment. In concrete terms, this specification gives us the ability to easily link in a loosely coupled and type-safe way the different layers (presentation, business and data access) of n-tier architectures. In order to do this, the CDI primarily relies on two services that are:

  • Context: This is used for the management of the...