by Reza Rahman
"Things that we in Oracle see"
Sparing us from the unnecessary historical overview we can actually jump in the features, that are under discussion for the next Java 7 release (JSR-342). By the way the discussion was very broad, also including technologies and improvements that are going to be released in the 8th version and beyond (as you might already know the Java EE7 is planned for April 2013).
The JMS 2 API for example would be modernized, including dependency injection and some API refactoring. Other changes to the API include:
- any implementation of the API would also need to implement the JCA adapter
- changes related to asynchronous sending of messages, delay settings, etc.
- some changes to the code display - visually fewer lines of code, by injecting the whole JMS context and removing the boilerplate code for creating messages
- JMS resource definition - a very quick and easy way to define a resource using annotations
There would also be a Java API for WebSockets that uses declarative style for creating WebSockets. Did you know what WebSockers are? Me neither ... but apperantly they are very important for online gaming and full duplex communication over the TCP protocol.
"The big new thing" in JAX RS 2 will be the client API, but there would be other enhancements too such as (but not limited to) : filtering, interceptors, hypermedia support, etc. As part of the presentation there was a very good example of building up a client, but unfortunately I was not able to find this example. It was pretty impressive though.
Another big new thing (that would hopefully be part of Java EE7) was the Java Temporary Caching API (see JSR-107). It would be highly configurable by using annotations - e.g. defining a cache eviction strategy in a declarative fashion.
The same as last year there was some talk about JPA 2. There are some neat new features such as
- Schema generation - the persistence manager generating the schema based on the JPA mappings, which was already feature of some of the implementations of JPA, but now the standard would define it.
- There would also be support for stored procedures! Yes, we all have some bad memories from working with stored procedures, but they are there and we can't ignore them.
- The persistence context would not be auto-flushed and thus we would be able to define the policy in the persistence manager
- Last, but certainly not least, there would be a way to define entity conversion strategies, e.g. converting database types to Java types
The JTA 1.2 API would also be present in the release, another old API that needed actualization. It would now have declarative transactions outside the EJB and would also allow for the definition of transaction scope.
My favorite bittersweet API - the JSF 2.2 API - would also be improved:
- HTML5 support! Yes, yes, the new big thing ... yet another new big thing
- @FlowScoped vs @ViewScoped for CDI (stands for "Contexts and Dependency Injection" if you did not know, see JSR-299) - basically define your own regions in the whole web application and thus identify which objects need to be destroyed while navigating through the regions.
- Finally! A FileUpload component would be defined by the API and the framework implementations would confirm to a single API, unlike the various custom implementations that are currently used.
- View actions and multitemplating
- Speaking of HTML5 - there is the option to use the native components and still bind them (using the framework IDs) with the rest of the application, effectively integrating them in the framework
There was also a lot of talks about some interesting candidate APIs that might or might not make it in the next release, such as
- API for robust batch processing (JSR 352? not sure ...) specifically designed for the EE platform and would allow for defining components via annotations, etc.
- Bean validation
- Servlet 3.1 - non blocking I/O, Web sockets again, etc.
- CDI 1.1 - Servlet events, ordering of interceptors, etc.
- EL 3.0, EJB 3.2, etc.
What about Java EE8? It would come 2 years after Java EE7 (if I am correct this would be April 2015) and would bring us to the cloud - PAAS, multitenancy, IAAS - but would also provide updates on HTML5, bring more modularity, etc.