Date post: | 18-Jul-2015 |
Category: |
Software |
Upload: | ankara-jug |
View: | 129 times |
Download: | 5 times |
Java EE 7 in ActionBluePrints Reimagined
Reza RahmanJava EE [email protected]@reza_rahman
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Public
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Safe Harbor Statement
The following is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. The development, release, and timing of any features or functionality described for Oracle’s products remains at the sole discretion of Oracle.
Public
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Program Agenda
Java EE 7
Cargo Tracker
The API Changes + The Code!
Looking Ahead…
1
2
3
4
Public
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Java EE Past, Present and Future
J2EE 1.3
CMP,JCA
J2EE 1.4
Web Services Mgmt, DeploymentAsyncConnector
Java EE 5
Ease of Use, EJB 3, JPA, JSF, JAXB, JAX-WS, StAX, SAAJ
Java EE 6
Pruning,Ease of Use,JAX-RSCDIValidation
Web Profile
Servlet 3,EJB 3.1 Lite
Java EE 7
JMS 2, Batch, TX, ConcurrentInterceptorWebSocketJSON
Web Profile
JAX-RS 2
J2EE 1.2
Servlet, JSP, EJB, JMS, RMI
Public
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Java EE Past, Present, & Future
J2EE 1.3
CMP,JCA
J2EE 1.4
Web Services, Mgmt, Deplymnt
Java EE 5
Ease of Use,EJB 3, JPA, JSF, JAXB,JAX-WS
Java EE 6
Pruning,Ease of Use,JAX-RS,CDI,Bean-Validation
Web Profile
Servlet 3,EJB 3.1 Lite
Java EE 7
JMS 2, Batch, TX, Concurr,Web-Sockets,JSON
Web Profile
JAX-RS 2
J2EE 1.2
Servlet, JSP, EJB, JMS, RMI
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Java EE Past, Present, & Future
J2EE 1.3
CMP,JCA
J2EE 1.4
Web Services, Mgmt, Deplymnt
Java EE 5
Ease of Use,EJB 3, JPA, JSF, JAXB,JAX-WS
Java EE 6
Pruning,Ease of Use,JAX-RS,CDI,Bean-Validation
Web Profile
Servlet 3,EJB 3.1 Lite
Java EE 7
JMS 2, Batch, TX, Concurr,Web-Sockets,JSON
Web Profile
JAX-RS 2
J2EE 1.2
Servlet, JSP, EJB, JMS, RMI
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Java EE Past, Present, & Future
J2EE 1.3
CMP,JCA
J2EE 1.4
Web Services, Mgmt, Deplymnt
Java EE 5
Ease of Use,EJB 3, JPA, JSF, JAXB,JAX-WS
Java EE 6
Pruning,Ease of Use,JAX-RS,CDI,Bean-Validation
Web Profile
Servlet 3,EJB 3.1 Lite
Java EE 7
JMS 2, Batch, TX, Concurr,Web-Sockets,JSON
Web Profile
JAX-RS 2
J2EE 1.2
Servlet, JSP, EJB, JMS, RMI
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Java EE Past, Present, & Future
J2EE 1.3
CMP,JCA
J2EE 1.4
Web Services, Mgmt, Deplymnt
Java EE 5
Ease of Use,EJB 3, JPA, JSF, JAXB,JAX-WS
Java EE 6
Pruning,Ease of Use,JAX-RS,CDI,Bean-Validation
Web Profile
Servlet 3,EJB 3.1 Lite
Java EE 7
JMS 2, Batch, TX, Concurr,Web-Sockets,JSON
Web Profile
JAX-RS 2
J2EE 1.2
Servlet, JSP, EJB, JMS, RMI
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Java EE 7 Themes
DEVELOPER DEVELOPER PRODUCTIVITYPRODUCTIVITY
Java EE 7Java EE 7
MEETING MEETING ENTERPRISE ENTERPRISE DEMANDSDEMANDS
Public
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Java EE 7
Connector 1.7
Connector 1.7
Managed Beans 1.0Managed Beans 1.0 EJB 3.2EJB 3.2
Servlet 3.1Servlet 3.1
PortableExtensionEcosystem
PortableExtensionEcosystem
JSF 2.2JSF 2.2 JAX-RS 2.0
JAX-RS 2.0
JMS 2.0JMS 2.0JPA 2.1JPA 2.1
EL 3.0EL 3.0
JTA 1.2JTA 1.2
JSP 2.2JSP 2.2
Interceptors 1.1Interceptors 1.1 CDI 1.1CDI 1.1Common Annotations 1.1
Common Annotations 1.1
UpdatedMajorRelease
New
Concurrency Utilities
(JSR 236)
Concurrency Utilities
(JSR 236)
Batch Applications(JSR 352)
Batch Applications(JSR 352)
Java API for JSON(JSR 353)
Java API for JSON(JSR 353)
Java API for WebSocket(JSR 356)
Java API for WebSocket(JSR 356)
Public
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Java EE 7 Platforms
GlassFish
Java EE 7
Java EE 6
TomEE
Public
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
GlassFish 4.1 and WebLogic 12.1.3• Glassfish 4.1– Addressing security, must-fix and important bugs,– 800+ bugs fixed!– JDK 8 Support– Updates to projects: Jersey, Mojarra, WebSocket 1.1, Tyrus,
Grizzly, CDI 1.2, Weld 2.2
• WebLogic 12.1.3–WebSocket, JSON-P, JAX-RS 2, JPA 2.1– JDK 8 support– Server-Sent Events (SSE)–WebSocket fallback– Improved Maven support, official Docker images
Public
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Java EE in Action
http://cargotracker.java.net
Public
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
JMS 2• API modernization– Dependency injection– Fluent APIs– Intelligent defaults– Unchecked exceptions
• New features– Delivery delay, async send
• Platform alignment–MDB activation properties, JMS resource definition, default
JMS resources
Public
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Java API for WebSocket• High level API for HTML 5 WebSockets– Full-duplex TCP-like communication on the Web utilizing HTTP
• Both client and server-side (Java SE and Java EE)
• Both declarative and programmatic
• Pluggable and extensible
Public
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Java API for JSON Processing• Low level API to parse, generate, transform, query
JSON– JSON equivalent of JAXP
• Object Model and Streaming API– Similar to DOM and StAX
• Binding JSON to Java objects forthcoming– JSON equivalent of JAXB
Public
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Bean Validation 1.1• Method constraints– Very useful for JAX-RS and WebSocket
• CDI Alignment– All Bean Validation artifacts now injection capable
• EL 3 integration– More expressive validation messages
Public
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
JAX-RS 2• Client API
• Message Filters & Entity Interceptors– Servlet filters and CDI interceptors for JAX-RS
• Asynchronous Processing – Server & Client
• Hypermedia support– Transitional and structural links
• Content negotiation
Public
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
JPA 2.1• Schema generation
• Stored procedures
• Unsynchronized persistence contexts
• Entity Graphs
• Entity converters
Public
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
JSF 2.2• HTML5 Support– Pass-through elements and attributes
• Managed beans deprecated/CDI alignment–@ViewScoped for CDI
• @FlowScoped
• Stateless views
• Resource library contracts
• View actions
• File upload component
Public
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Batch Applications for the Java Platform • API for robust batch processing targeted to Java EE,
Java SE
• Common architecture–Operator, repository, job, step, reader-processor-writer
pattern
• Common features– Chunking, check-pointing, transactions, retries, exceptions,
workflow, parallelism
Public
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Concurrency Utilities for Java EE • Provides simple, safe API for concurrency in Java EE
• Builds on Java SE concurrency–ManageExecutorService–ManagedScheduledExecutorService–ManagedThreadFactory
• Relatively low-level API
• Important enabler for Java EE ecosystem
Public
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Concurrency Utilities for Java EE Managed Task Executor
public class TestServlet extends HTTPServlet { @Resource ManagedExecutorService executor;
Future future = executor.submit(new MyTask());
class MyTask implements Runnable { public void run() { ... // Task logic } }}
Public
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Yet More…• JTA 1.2–@Transactional, @TransactionScoped
• EL 3.0– Standalone API, lambda expressions, collections, operators
• Servlet 3.1– Non-blocking I/O, upgrade to WebSocket, security
• CDI 1.1– Global enablement, @AroundConstruct, @Vetoed
• EJB 3.2– Truncating CMP/BMP
Public
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Java EE 8 Community Survey
https://java.net/downloads/javaee-spec/JavaEE8_Community_Survey_Results.pdf
https://blogs.oracle.com/ldemichiel/entry/results_from_the_java_ee
Public
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Java EE 8 Possibilities• Web Standards/HTML5 Alignment– HTTP2, SSE, JSON-B, JSON-P, action-oriented web framework,
hypermedia
• Cloud– Simple security providers, REST management/monitoring
• CDI Alignment– CDI 2, EJB services outside EJB, security interceptors, EJB
pruning
• Enterprise– JCache, Configuration, JMS
• Java SE 8 alignment
Public
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Java EE/GlassFish Roadmap
JSR Submissions
20172017
Final Release• Reference Implementation/GlassFish 5 Open Source Edition• JavaOne 2016
Expert groups up and running (JavaOne)
Early Drafts
Public Review Draft
Proposed FinalDraft
Final DraftsSubmitted
201620162015201520142014
GlassFish 4.1 Open Source Edition
Public
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Resources• Java EE Tutorials– https://docs.oracle.com/javaee/7/tutorial/index.html
• Digging Deeper– https://docs.oracle.com/javaee/7/firstcup/index.html– https://glassfish.java.net/hol/– https://java.net/projects/cargotracker/
• Java EE Transparent Expert Groups– http://javaee-spec.java.net
• Java EE Reference Implementation– http://glassfish.org
• The Aquarium– http://blogs.oracle.com/theaquarium
Public