+ All Categories
Home > Documents > Java EE 7 is ready2013.java-forum-stuttgart.de/_data/2013_A3-Peter_Doschkinow.pdf · JPA 2.1 JMS...

Java EE 7 is ready2013.java-forum-stuttgart.de/_data/2013_A3-Peter_Doschkinow.pdf · JPA 2.1 JMS...

Date post: 29-May-2020
Category:
Upload: others
View: 5 times
Download: 0 times
Share this document with a friend
24
Transcript
Page 1: Java EE 7 is ready2013.java-forum-stuttgart.de/_data/2013_A3-Peter_Doschkinow.pdf · JPA 2.1 JMS 2.0 JCA 1.7 Managed Beans 1.0 Concurrency 1.0 Common Annotations 1.1 Interceptors
Page 2: Java EE 7 is ready2013.java-forum-stuttgart.de/_data/2013_A3-Peter_Doschkinow.pdf · JPA 2.1 JMS 2.0 JCA 1.7 Managed Beans 1.0 Concurrency 1.0 Common Annotations 1.1 Interceptors

Java EE 7 is ready – What to do next?

Peter Doschkinow

Senior Java Architect

Page 3: Java EE 7 is ready2013.java-forum-stuttgart.de/_data/2013_A3-Peter_Doschkinow.pdf · JPA 2.1 JMS 2.0 JCA 1.7 Managed Beans 1.0 Concurrency 1.0 Common Annotations 1.1 Interceptors

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.

Page 4: Java EE 7 is ready2013.java-forum-stuttgart.de/_data/2013_A3-Peter_Doschkinow.pdf · JPA 2.1 JMS 2.0 JCA 1.7 Managed Beans 1.0 Concurrency 1.0 Common Annotations 1.1 Interceptors

Agenda

Java EE 7 Overview

Getting started with Java EE 7

– Available bundles and sample applications

Using Java EE 7 for HTML5 application development

– HTML5 and Thin Server Architecture

– Demo

Page 5: Java EE 7 is ready2013.java-forum-stuttgart.de/_data/2013_A3-Peter_Doschkinow.pdf · JPA 2.1 JMS 2.0 JCA 1.7 Managed Beans 1.0 Concurrency 1.0 Common Annotations 1.1 Interceptors

The Java EE Journey

Java EE 7

2005-2012

Ease of

Development

Lightweight

Developer Productivity & HTML5

1998-2004

Enterprise

Java Platform

Robustness

Web

Services

2013 - Future

Page 6: Java EE 7 is ready2013.java-forum-stuttgart.de/_data/2013_A3-Peter_Doschkinow.pdf · JPA 2.1 JMS 2.0 JCA 1.7 Managed Beans 1.0 Concurrency 1.0 Common Annotations 1.1 Interceptors

Java EE 7 Themes

Batch

Concurrency

Simplified JMS

More annotated POJOs

Less boilerplate code

Cohesive integrated

platform

DEVELOPER

PRODUCTIVITY

WebSockets

JSON

Servlet 3.1 NIO

REST

MEETING

ENTERPRISE

DEMANDS

Java EE 7

Page 7: Java EE 7 is ready2013.java-forum-stuttgart.de/_data/2013_A3-Peter_Doschkinow.pdf · JPA 2.1 JMS 2.0 JCA 1.7 Managed Beans 1.0 Concurrency 1.0 Common Annotations 1.1 Interceptors

New JTA Annotations

JAX-RS Client API

Default Resources

More annotated POJOs

Faces Flow

Top Ten Features in Java EE 7

WebSocket client/server API

Batch Applications

JSON Processing

Concurrency Utilities

Simplified JMS API

Page 8: Java EE 7 is ready2013.java-forum-stuttgart.de/_data/2013_A3-Peter_Doschkinow.pdf · JPA 2.1 JMS 2.0 JCA 1.7 Managed Beans 1.0 Concurrency 1.0 Common Annotations 1.1 Interceptors

Java EE 7 JSRs

EJB 3.2

Servlet 3.1

CDI

Extensions

Bea

n V

ali

dati

on

1.1

Batch 1.0

Web

Fragments

JCA 1.7 JMS 2.0 JPA 2.1

Managed Beans 1.0

Concurrency 1.0 Common

Annotations 1.1

Interceptors

1.2, JTA 1.2 CDI 1.1

JSF 2.2,

JSP 2.3,

EL 3.0

JAX-RS 2.0,

JAX-WS 2.2 JSON 1.0

WebSocket

1.0

Page 9: Java EE 7 is ready2013.java-forum-stuttgart.de/_data/2013_A3-Peter_Doschkinow.pdf · JPA 2.1 JMS 2.0 JCA 1.7 Managed Beans 1.0 Concurrency 1.0 Common Annotations 1.1 Interceptors

Built in open source

World’s first Java EE 7 App Server

Lightweight, modular, easy to use

Production ready

Open Source Project

GlassFish Server 4.0

Page 10: Java EE 7 is ready2013.java-forum-stuttgart.de/_data/2013_A3-Peter_Doschkinow.pdf · JPA 2.1 JMS 2.0 JCA 1.7 Managed Beans 1.0 Concurrency 1.0 Common Annotations 1.1 Interceptors

NetBeans 7.3.1

– Add Java EE 7 profiles

– Bundle GlassFish 4.0 runtime

– New/Updated Wizards

Eclipse Kepler

– Add Java EE 7 support to Eclipse WTP

– GlassFish Plugin via Eclipse Market (OEPE 12.1.2)

Developer Tools

Page 11: Java EE 7 is ready2013.java-forum-stuttgart.de/_data/2013_A3-Peter_Doschkinow.pdf · JPA 2.1 JMS 2.0 JCA 1.7 Managed Beans 1.0 Concurrency 1.0 Common Annotations 1.1 Interceptors

Java EE 7 SDK

– With GUI installer for Windows, Linux and Mac OS X

– Web and full profile, english and multi-language

– API docs, tutorial and samples

GlassFish 4.0 OSE with GUI installer or as Zip archive

Java EE 7 RI binaries and sources for the web and full profile

Maven dependencies and javadocs

– javaee-api-7.0.jar, javaee-web-api-7.0.jar, javaee-api-7.0-javadoc.jar

http://www.oracle.com/technetwork/java/javaee/downloads/index.html

Java EE 7 Implementation Deliverables

Page 12: Java EE 7 is ready2013.java-forum-stuttgart.de/_data/2013_A3-Peter_Doschkinow.pdf · JPA 2.1 JMS 2.0 JCA 1.7 Managed Beans 1.0 Concurrency 1.0 Common Annotations 1.1 Interceptors

Included in Java EE 7 SDK or available

through GlassFish Update Center

41 example applications for the new and

updated technologies

– Common documentation structure Description, key features

Building, deploying and running

Troubleshooting

– Maven based

– Can be run from command line or IDE

file:///C:/<javaee7-sdk>/samples/docs/list.html

Java EE 7 Samples

Page 13: Java EE 7 is ready2013.java-forum-stuttgart.de/_data/2013_A3-Peter_Doschkinow.pdf · JPA 2.1 JMS 2.0 JCA 1.7 Managed Beans 1.0 Concurrency 1.0 Common Annotations 1.1 Interceptors

Build, deploy and run a sample application

– Using NetBeans 7.3.1

– GlassFish 4.0

Java EE 7 features in Netbeans 7.3.1

Java EE 7 features in GlassFish admin console

Build, deploy and run a sample application

Java EE 7 Demo

Page 14: Java EE 7 is ready2013.java-forum-stuttgart.de/_data/2013_A3-Peter_Doschkinow.pdf · JPA 2.1 JMS 2.0 JCA 1.7 Managed Beans 1.0 Concurrency 1.0 Common Annotations 1.1 Interceptors

HTML5 Architectural Implications

HTML5 is the new UI across devices

– Designed to address the cross-platform jungle

Multimedia, Graphics, Offline, Real-time Communication, Device Access, File

access, Semantic markup, CSS3

– Applications == HTML5 + JavaScript + CSS3 + Server Resources

Requires a different programming approach

Servers no longer generating markup language

Clients responsible for presentation logic and execution

JavaScript is part of the domain model, JSON is the payload

No need for browser plugin

The Browser Is the Platform

Page 15: Java EE 7 is ready2013.java-forum-stuttgart.de/_data/2013_A3-Peter_Doschkinow.pdf · JPA 2.1 JMS 2.0 JCA 1.7 Managed Beans 1.0 Concurrency 1.0 Common Annotations 1.1 Interceptors

Main idea: move the presentation layer to the client. The server is

responsible for providing access to the application data and for serving

the static resources that implement the presentation layer.

Similar architectures

– SOFEA: Service-Oriented Front-End Architecture

– RIA: Rich Internet Application (Flash, Silverlight, JavaFX)

– SPA: Single Page Application

AJAX, browser plugins (for Flash, Silverlight, JavaFX)

www.thinserverarchitecture.com (2008)

Background

Thin Server Architecture (TSA)

Page 16: Java EE 7 is ready2013.java-forum-stuttgart.de/_data/2013_A3-Peter_Doschkinow.pdf · JPA 2.1 JMS 2.0 JCA 1.7 Managed Beans 1.0 Concurrency 1.0 Common Annotations 1.1 Interceptors

Thin Server Architecture Diagram

JavaScript

HTML

CSS

HT

ML5

DO

M A

PI

User In

terfa

ce

Browser

WebSocket

Server Push

Static

Resource

Services D

ata

Access

RESTful

Data Services

DB

EIS

Web

Storage

Runtime application

presentation

input

display

App download

HTTP

XHR

WebSocket

Server-Sent-Events

App Server

Page 17: Java EE 7 is ready2013.java-forum-stuttgart.de/_data/2013_A3-Peter_Doschkinow.pdf · JPA 2.1 JMS 2.0 JCA 1.7 Managed Beans 1.0 Concurrency 1.0 Common Annotations 1.1 Interceptors

Improved performance

– Caching, no presentation data transmitted again and again

Scalability

– Less data to transfer, session state is on the client

Reduced complexity

– UI control is not split bethween client and server, UI events stay on client

Improved user experience

Offline support only possible with TSA

Advantages

Thin Server Architecture

Page 18: Java EE 7 is ready2013.java-forum-stuttgart.de/_data/2013_A3-Peter_Doschkinow.pdf · JPA 2.1 JMS 2.0 JCA 1.7 Managed Beans 1.0 Concurrency 1.0 Common Annotations 1.1 Interceptors

With Java EE

Thin Server Architecture

Data Sources

HTTP/S

Web

Sockets

SSE

Clients

JA

X-R

S

Data Services

JMS

JPA

JAXB

POJO/EJB

Java EE Server

EIS

JSON

XML JCA

Page 19: Java EE 7 is ready2013.java-forum-stuttgart.de/_data/2013_A3-Peter_Doschkinow.pdf · JPA 2.1 JMS 2.0 JCA 1.7 Managed Beans 1.0 Concurrency 1.0 Common Annotations 1.1 Interceptors

Collaborative drawing

Two-page application

– List of drawings

– Drawing

Demonstrating

– Server-side: JAX-RS, JSON, WebSocket, SSE Java API

– Client-side: HTML5 with AngularJS, JAX-RS, WebSocket, SSE Java and

JavaScript API

– JavaFX hybrid Java/HTML5 application

http://github.com/jersey/hol-sse-websocket

Drawing Board Demo

Page 20: Java EE 7 is ready2013.java-forum-stuttgart.de/_data/2013_A3-Peter_Doschkinow.pdf · JPA 2.1 JMS 2.0 JCA 1.7 Managed Beans 1.0 Concurrency 1.0 Common Annotations 1.1 Interceptors

TSA - Architecture

Drawing Board Demo

HTTP/S

Web

Sockets

SSE

Clients

JA

X-R

S/S

SE

Je

rsey

Data Service

GlassFish 4.0

JSON

JSON

DataProvider

POJO

WS

En

dp

oin

t

HTML5 Browser

JavaFX

WebView/WebKit

webSocketSend.send(...)

send(...) onEvent(...)

DrawingService.query(...)

Page 21: Java EE 7 is ready2013.java-forum-stuttgart.de/_data/2013_A3-Peter_Doschkinow.pdf · JPA 2.1 JMS 2.0 JCA 1.7 Managed Beans 1.0 Concurrency 1.0 Common Annotations 1.1 Interceptors

JAX-RS: CRUD for drawings

SSE: distributing the list of drawings to all connected clients

WebSocket: distributing the updates of a drawing to all connected

clients

JSON: implementing of encoder/decoder of the WebSocket server

endpoint

Java – JavaScript bridge(WebEngine): modifying the AngularJS client

by replacing the WebSocket/SSE JavaScript client communication with

a Java implementation in the JavaFX client

Technology usage

Drawing Board Demo

Page 22: Java EE 7 is ready2013.java-forum-stuttgart.de/_data/2013_A3-Peter_Doschkinow.pdf · JPA 2.1 JMS 2.0 JCA 1.7 Managed Beans 1.0 Concurrency 1.0 Common Annotations 1.1 Interceptors

Java EE 7 – http://javaee-spec.java.net

– http://www.oracle.com/technetwork/java/javaee/downloads/index.html

– http://vshow.on24.com/vshow/oraclejava?partnerref=Java_EE7_Launch_eVite_06122013&l=en

GlassFish 4.0 – http://https://glassfish.java.net/

– http://wikis.oracle.com/display/GlassFish

– http://glassfish.java.net/quality/portal

– http://www.youtube.com/GlassFishVideos

HTML5 – http://www.w3.org/TR/html5/

Thin Server Architecture – http://www.thinserverarchitecture.com

Links

Page 23: Java EE 7 is ready2013.java-forum-stuttgart.de/_data/2013_A3-Peter_Doschkinow.pdf · JPA 2.1 JMS 2.0 JCA 1.7 Managed Beans 1.0 Concurrency 1.0 Common Annotations 1.1 Interceptors
Page 24: Java EE 7 is ready2013.java-forum-stuttgart.de/_data/2013_A3-Peter_Doschkinow.pdf · JPA 2.1 JMS 2.0 JCA 1.7 Managed Beans 1.0 Concurrency 1.0 Common Annotations 1.1 Interceptors

Recommended