JavaOne
Ted Vinke Erwin Barten
EE 8 + 9
JEE 8 end 2017
Java EE
Java EE 8 JSRs● JavaEE 8 Platform and Web Profile● Contexts and Dependency Injection 2.0 (CDI)● Java API for JSON● Binding 1.0 (JSON-B)● Java Message Service 2.1 (JMS)● Java Servlet 4.0● Java API for RESTful Web Services 2.1 (JAX-RS)● Model-View-Controller 1.0 (MVC)● JavaServerFaces 2.3 (JSF)● Java EE ManagementAPI 2.0● Java API for JSON Processing 1.1 (JSON-P)● Java EE Security API 1.0● Bean Validation 2.0
JSRs● Contexts and Dependency Injection 2.0 (CDI)
○ API to bootstrap a CDI container in Java SE, Observer ordering, Asynchronous event firing…
● Java API for JSON Processing 1.1 (JSON-P)○ Support for IETF standards i.e. JSON Pointer, better Java SE 8 Stream operations support...
● Java API for JSON Binding 1.0 (JSON-B)○ Natural follow on to JSON-P, default mapping classes and JSON, support to handle
“application/json” media type for JAX-RS...
● Java API for RESTful Web Services 2.1 (JAX-RS)○ Server-sent events, non-blocking I/O in providers...
● Java Server Faces 2.3 (JSF)○ Better CDI, WebSocket, Java Date/Time integration, class-level Bean Validation…
Servlet 4.0● Support for HTTP/2
○ Request/response multiplexing○ Server push○ Upgrade from HTTP 1.1
● Compatibility with latest HTTP 1.1 RFCs
● Smaller community-requested improvements (JIRA issues)
HTTP/2 Multiplexing
MVC 1.0● Provide action-based MVC framework
○ HTTP requests are routed to controllers and turned into actions by application code○ Alternative/complement to JSF's component-based MVC framework
CLOUD + MICRO-SERVICES
*New* Java EE Community SurveyCloses on Oct 21 2016
“When we first proposed Java EE 8, we got feedback that an action-based web UI MVC framework standard would be a good addition to Java EE. [...] We're now questioning whether it is still important to complete the MVC API (JSR 371)”
MVC 1.0● Provide action-based MVC framework
○ HTTP requests are routed to controllers and turned into actions by application code○ Alternative/complement to JSF's component-based MVC framework
JMS 2.1● New API for receiving messages asynchronously
○ More flexible and general than MDBs ○ Alignment with CDI
● Improved portability of JMS providers between appservers● Improved support for using JMS in XA transacHons ● Improved handling of "bad" messages
Java EE Management API 2.0● REST-based management APIs
○ Supersede current management EJB-based APIs of J2EE Management 1.0 ○ Superset of functonality of J2EE Management 1.0
● Simple deployment API
Resiliency
Security
Circuit breakers
Health checking
CONFIGURATION
Multi-tenancy
Oauth OpenID
Java EE 8 Update● Java EE 8 Update
https://java.net/downloads/javaee-spec/JavaEE8Update.pdf● Track the JSR as they progress
https://java.net/projects/javaee-spec/pages/Specifications● Results Java EE 8 Community Survey
https://java.net/downloads/javaee-spec/JavaEE8_Community_Survey_Results.pdf
● *New* Java EE Community Surveyhttps://glassfish.java.net/survey/
Java 9
Modularity with project JigSaw
The primary goals of this Project are to:
● Make the Java SE Platform, and the JDK, more easily scalable down to small computing devices;● Improve the security and maintainability of Java SE Platform Implementations in general, and the
JDK in particular;● Enable improved application performance; and● Make it easier for developers to construct and maintain libraries and large applications, for both the
Java SE and EE Platforms.
Classpath hell
● not always clear which version of a component is used ● different components may use different versions of the same component● component version is not enforceable
Current modularity● classes● packages● jar-files● runtime configuration tools e.g. Maven
Modules● making it very easy to scale Java SE down to smaller
devices (jlink command line tool)● same applies to Cloud applications● improving security by forbidding access to internal JDK
API’s● improving application performance
○ implement intelligent API’s○ precompiling lambda’s○ ...
JDK modules
Module inside
A module’s declaration does not include a version string, nor constraints upon the version strings of the modules upon which it depends. This is intentional: It is not a goal of the module system to solve the version-selection problem, which is best left to build tools and container applications.
module-info.java:● what is it’s name (also folder name)● what does it export● what does it require
● NO versioning
Other JSR’s
● Compact Strings● Java console Read-Eval-Print-Loop● Enhanced deprecation● Immutable Collection Factories
List<Integer> listOfNumbers = List.of(1, 2, 3, 4, 5);
Thank you