About Abhishek Gupta

Java EE 7: What’s new???

I am a little ‘late to the party’ so to say… as far as ‘blogging’ about Java EE 7 is concerned. It has almost been 10 odd months since it was released back in June 2013, but it is still relatively new. Personally speaking, I am thrilled about it, simply because of the ease-of-use and the gamut of features it has bought in. But does it really matter whether I am excited or not ? LOL…. It’s not just me, but the entire Java community (well, almost!) is counting on Java EE 7 to usher us into the next generation of rich enterprise software development. After having ‘played around’ with it for some time now, I think it’s high time I started writing about it.

Java EE 7 (JSR 342) is in itself an ‘umbrella’ specification which encompasses 33 individual specifications. I will provide a brief peek into few of these specifications with a special focus on the ‘new’ specifications and the ones which have undergone ‘significant’ overhaul and changes.

This post is not a ‘deep dive’ into each and every specification. I am going to ‘introduce‘ the brand new specifications introduced in Java EE 7.

Let’s begin . . . . . . . . .

Java EE 7: Key Drivers and USP

Developer Productivity

Annotated POJOs, which have proven to be the cornerstone of ease-of-development paradigm since Java EE 5, continue to rule the roost and further penetrate Java EE

Contexts and Dependency Injection (CDI)reputation of being the ‘magic glue’ has been taken to the next level – it’s now ‘default’ in Java EE 7 and its goal is to drive cohesiveness throughout the entire EE platform

JMS 2.0 (JSR 343) has been completely ‘revamped‘. A ‘new version’ of the API known as the ‘Simplified API‘ is more succinct, easy-to-use and will ensure that developers have to deal with ‘significantly lesser‘ amounts of ‘boilerplate‘ code

HTML5 Focus

JAX-RS 2.0 (JSR 339) – The RESFTful API in Java EE 7 has been further enriched, including addition of a brand new ‘client’ side API, asynchronous capabilities, Servlet Filters and Interceptors

Java WebSocket API 1.0 (JSR 356)

Client can send a message to server at any point after the connection is established

Server can send messages to its connected clients/peers without any ‘explicit request’ from them i.e. totally independent of the client

The WebSocket API in Java EE 7 supports ease-of-development by allowing support for intuitive annotations which transform simple POJOs into Server or Client web socket end points. The framework also supports ‘Programmatic’ endpoints which works on the basis of

Capability to intercept WebSocket lifecycle events with the help of annotations

Support for text and binary messages along with health check (ping-pong) messages

The Java API for JSON Processing (JSR 353)

Provides a ‘standard‘ way to parse and generate data in JSON format

Developers are not ‘required’ to use third party JSON libraries (Jackson etc), however, they can choose to ‘plugin’ an implementation of their choice if need be

Modeled on similar lines to the JAXP API and has support for Streaming API and DOM API

As the name suggests, the Streaming API helps process/generate JSON in a streaming fashion (similar to the StAX API from JAXP). It is a low level API which works on the ‘events‘ obtained from the JSON data stream

The DOM API, creates an in-memory Java object model for the JSON data (similar to the XML DOM API). It’s a easy to use high level API

Support for a ‘binding‘ API (JSON-Bsimilar to JAXB) is in progress and should be ‘standardized’ in Java EE 8

Batch Applications For the Java Platform (JSR 352)

Suitable for execution of ‘long running’ bulkjobswhich do not require human intervention and can be scheduled as per requirement e.g. ETL jobs, end of day jobs etc

Defines a Job Specification Language which is the basis for defining ‘jobs’ within an XML. This Job XML captures the entire batch process.

Supports two contrasting ‘processing’ mechanisms.

Chunk Style Processinginvolves, ‘reading’ the input ‘bulk’ data, ‘processing’ it and finally ‘writing’ it as the final step in the process. All these operations are abstracted through specific interfaces, namely, ItemReader, ItemProcessor and ItemWriter

A ‘batchlet‘ style processing model is also supported by this API which defines’ tasks’ which once completed, mark the end of the job

Newsletter

Join them now to gain exclusive access to the latest news in the Java world, as well as insights about Android, Scala, Groovy and other related technologies.

Email address:

Recent Jobs

No job listings found.

Join Us

With 1,240,600 monthly unique visitors and over 500 authors we are placed among the top Java related sites around. Constantly being on the lookout for partners; we encourage you to join us. So If you have a blog with unique and interesting content then you should check out our JCG partners program. You can also be a guest writer for Java Code Geeks and hone your writing skills!

Disclaimer

All trademarks and registered trademarks appearing on Java Code Geeks are the property of their respective owners. Java is a trademark or registered trademark of Oracle Corporation in the United States and other countries. Examples Java Code Geeks is not connected to Oracle Corporation and is not sponsored by Oracle Corporation.