Book Review:Java EE 7 with GlassFish 4 Application

Java EE have been released for one year, and some applications are being upgrading to Java EE.

I also tried some new features in my projects, such as JSF 2.2, Websocket. And I have written some posts in my Blogspot about my experience of Java EE 7, the sample codes are hosted on my github.com account,

https://github.com/hantsy/ee7-sandbox

Currently only Wildfly 8(the new name of the former JBoss AS) and Glassfish 4 have passed Java EE 7 certification. Glassfish 4 is the Java EE 7 reference implementation. The book Java EE 7 with GlassFish 4 Application Server is the excellent resource to master the core skills of Java EE 7 , either you are a experienced Java EE5/6 developer or a newbie to Java EE world.

JSF 2.2. introduces some new features, such as resource contract, faces flow, and two new CDI compatible scopes(ViewScoped, FlowScoped). And a new FacesFlow is added, if you was using Spirng Web Flow or Seam 2, you may be interested in it. Chapter two covers the JSF framework, including general JSF knowledge, and also introduced the new features of JSF 2.2, such as HTML5 support, and FacesFlow. But for my experience, you could have to use the latest Glassfish 4.1 to avoid some bugs known in the early JSF 2.2. Glassfish 4.0 used an old version JSF 2.2.

JPA 2.1 only adds some minor modification and improvement, such as introducing a Converter to converte a property of bean and a field of database table, and EntityGraph is another attractive feature in JPA 2.1, you can define the fetch plan, and more detailed sql scripts configuration for data initialization was added in JPA 2.1, you can avoid use Hibernate specific configuration for table generation and modification. Please read the Chap three to learn JPA knowledge.

EJB 3.2. also adds some alignment to the latest CDI 1.1(and CDI 1.2, there are a small upgrade after Java EE 7 was released), such as added CDI compatible @Transational. Please read Chap 4 for more details.

CDI is activated by default in Java EE 7 , and no need an extra beans.xml in the classpath. CDI 1.1 add scan feature that only the scanned classes can be recognized as CDI beans. Please read the chap 5 to learn it.

Chap 6 introduces JSON-P, it is a new spec in Java EE7. JSON is widely used in RESTful API as the data exchange format, Java EE 7 introduced a new SPEC and provide the ability to parse JSON data and write Object to JSON stream, but this is a lower API, and does not support direct mapping between Object and JSON stream. Java EE 8 will introduce another JSON-B to resolve this issue.

Chapter 7 introduces WebSocket, which is also a new spec in Java EE7. Before WebSocket, maybe you could use Atmosphere like framework to complete server side push work. WebSocket makes thing simple. WebSocket is part of HTML 5, the client could be a browser and also can be other client applications, such as Android app or desktop applications.

Chapter 8 introduces JMS. JMS 2.0 is a big upgrade, and provides simple API to handle message sending and receiving. In this Chapter, yon can learn how to configure JMS in Glassfish.

Chapter 9 demonstrates the security in Java EE 7. You maybe complained there are too much configuration for security in application server, and there are some discussion in future Java EE, there are maybe more controls provided for developers.

Chapter 10 introduces JAX-WS which is a maintained specin Java EE7. In my opinion, JAX-WS is dead, JAX-WS is never a consideration in my new project. Chapter 11 introduces JAX-RS, which introduce new client API in the new version, and also complete some alignment to the new CDI spec.

你可能感兴趣的:(Book Review:Java EE 7 with GlassFish 4 Application)