With HTML5 gaining lot of momentum in the market Java EE 7 is themed after HTML5 and boost in productivity. Java EE 7 features were focused on WebSocket, JSON support, Batch processing, Concurrency utilities, JAX-RS 2.0 and JMS 2.0.
Lot of dependency injection introduced in the platform which means a lesser boilerplate code, thanks to Spring who introduced dependency injection concept which is incorporated by Oracle in Java EE7. Provides more defaults in the platform like default datasource, jms connection factory etc this helps in creating quick POC’s without worrying about what values needs to be passed.
Enables duplex bi directional communication over a single TCP channel. Typically when we do a http request it is 2 step process; establish a new TCP connection and then http connection. This will make more heavier since the headers will ride on the these protocols. In websocket there is a connection established and there can be as many data which can be sent and the overhead is only once.
Java api for processing json is built on top of JAXB. Json processing provides streaming api and object model. Selection criteria between streaming api and object model is based on the trade of between the performance and memory.
Typically POJO’s which gets persisted via a jpa persist mechanism to the database didn’t have a mechanism to validate the attributes of the bean. This cost a heavier mechanism of database which throws exception and then propagate this to user interface. Bean validator provides a mechanism to validate the beans and this is annotation driven.
Image Courtesy: Oracle
What to look for in Java EE 8
The main focus on EE 8 release is on cloud and defining standards based on cloud programming model. It makes a great sense since the world is excited towards cloud and support in Java EE 8 is vital.
Other highlights of the Java EE8 :
- Paas Enablement
- Thin Server Architecture
- JSON B
Author : Manigandan Mani Srinivasan – Head, Java Practice, Marlabs Bangalore