Top Banner
<Insert Picture Here> Future<JavaEE> Jerome Dochez, GlassFish Architect
28

Future€¦ ·  · 2014-09-16jersey-2.1.5 javaee-web-7.0 ... (w/Grizzly WebSocket API) ... Java EE 7 Platform Roadmap • JAX-RS 2.0 and JPA 2.1 filed few months back

May 29, 2018

Download

Documents

trinhnhi
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Future<JavaEE>€¦ ·  · 2014-09-16jersey-2.1.5 javaee-web-7.0 ... (w/Grizzly WebSocket API) ... Java EE 7 Platform Roadmap • JAX-RS 2.0 and JPA 2.1 filed few months back

<Insert Picture Here>

Future<JavaEE>Jerome Dochez, GlassFish Architect

Page 2: Future<JavaEE>€¦ ·  · 2014-09-16jersey-2.1.5 javaee-web-7.0 ... (w/Grizzly WebSocket API) ... Java EE 7 Platform Roadmap • JAX-RS 2.0 and JPA 2.1 filed few months back

2

The following/preceding 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 3: Future<JavaEE>€¦ ·  · 2014-09-16jersey-2.1.5 javaee-web-7.0 ... (w/Grizzly WebSocket API) ... Java EE 7 Platform Roadmap • JAX-RS 2.0 and JPA 2.1 filed few months back

3

Java EE for the Cloud

• Tighter requirements for resource and state management

• Better isolation between applications• Potential standard APIs for NRDBMS, caching, other• Common management and monitoring interfaces• Evolution, not revolution

Page 4: Future<JavaEE>€¦ ·  · 2014-09-16jersey-2.1.5 javaee-web-7.0 ... (w/Grizzly WebSocket API) ... Java EE 7 Platform Roadmap • JAX-RS 2.0 and JPA 2.1 filed few months back

4

Better Packaging for the Cloud

• Apps are versioned• Multiple versions can coexist• Must deal with data versioning, upgrades, etc.• Need ability to specify QoS properties• Apps both expose and connect to services

Page 5: Future<JavaEE>€¦ ·  · 2014-09-16jersey-2.1.5 javaee-web-7.0 ... (w/Grizzly WebSocket API) ... Java EE 7 Platform Roadmap • JAX-RS 2.0 and JPA 2.1 filed few months back

5

Cloud Platform

Application

Virtualization Layer

State Management

JavaService

PersistenceService

QueueingService …

Page 6: Future<JavaEE>€¦ ·  · 2014-09-16jersey-2.1.5 javaee-web-7.0 ... (w/Grizzly WebSocket API) ... Java EE 7 Platform Roadmap • JAX-RS 2.0 and JPA 2.1 filed few months back

6

Cloud Platform

ApplicationCodeModule

CodeModule Schema Migration QoS

InformationSecurityCodeModule …

Virtualization Layer

State Management

JavaService

PersistenceService

QueueingService …

Page 7: Future<JavaEE>€¦ ·  · 2014-09-16jersey-2.1.5 javaee-web-7.0 ... (w/Grizzly WebSocket API) ... Java EE 7 Platform Roadmap • JAX-RS 2.0 and JPA 2.1 filed few months back

7

Cloud Platform

Application Application Application

Virtualization Layer

State Management

JavaService

PersistenceService

QueueingService …

Page 8: Future<JavaEE>€¦ ·  · 2014-09-16jersey-2.1.5 javaee-web-7.0 ... (w/Grizzly WebSocket API) ... Java EE 7 Platform Roadmap • JAX-RS 2.0 and JPA 2.1 filed few months back

8

Cloud Platform

Application Application Application Application Application

Virtualization Layer

State Management

JavaService

PersistenceService

QueueingService …

Page 9: Future<JavaEE>€¦ ·  · 2014-09-16jersey-2.1.5 javaee-web-7.0 ... (w/Grizzly WebSocket API) ... Java EE 7 Platform Roadmap • JAX-RS 2.0 and JPA 2.1 filed few months back

9

Cloud Platform

Managed Environment

Application Application Application

Virtualization Layer

State Management

JavaService

PersistenceService

QueueingService …

Application Application

Page 10: Future<JavaEE>€¦ ·  · 2014-09-16jersey-2.1.5 javaee-web-7.0 ... (w/Grizzly WebSocket API) ... Java EE 7 Platform Roadmap • JAX-RS 2.0 and JPA 2.1 filed few months back

10

DemoGlassFish Virtual Edition

GroupMaster

Libvirt

PC - 1

LibVirt

PC - n

LibVirt

VM1 VM2 VM3

PC - 1

LibVirt

VM1 VM2 VM3

Page 11: Future<JavaEE>€¦ ·  · 2014-09-16jersey-2.1.5 javaee-web-7.0 ... (w/Grizzly WebSocket API) ... Java EE 7 Platform Roadmap • JAX-RS 2.0 and JPA 2.1 filed few months back

11

Modularity

• Build on Java SE 8 work• Applications made of modules• Dependencies are explicit• Versioning is built-in• Classloaders straightened out

Page 12: Future<JavaEE>€¦ ·  · 2014-09-16jersey-2.1.5 javaee-web-7.0 ... (w/Grizzly WebSocket API) ... Java EE 7 Platform Roadmap • JAX-RS 2.0 and JPA 2.1 filed few months back

12

Modular Applications

j1demo.app

j1demo-web-1.0.3

Page 13: Future<JavaEE>€¦ ·  · 2014-09-16jersey-2.1.5 javaee-web-7.0 ... (w/Grizzly WebSocket API) ... Java EE 7 Platform Roadmap • JAX-RS 2.0 and JPA 2.1 filed few months back

13

Modular Applications

j1demo.app

requirestwitter-client-2.3.0

j1demo-web-1.0.3

j1demo-persist-1.4.0

Page 14: Future<JavaEE>€¦ ·  · 2014-09-16jersey-2.1.5 javaee-web-7.0 ... (w/Grizzly WebSocket API) ... Java EE 7 Platform Roadmap • JAX-RS 2.0 and JPA 2.1 filed few months back

14

Modular Applications

j1demo.app

javaee-web-7.0

requires

twitter-client-2.3.0

j1demo-persist-1.4.0

j1demo-web-1.0.3

Page 15: Future<JavaEE>€¦ ·  · 2014-09-16jersey-2.1.5 javaee-web-7.0 ... (w/Grizzly WebSocket API) ... Java EE 7 Platform Roadmap • JAX-RS 2.0 and JPA 2.1 filed few months back

15

Modular Applications

j1demo.app

requires

requires

javaee-web-7.0

twitter-client-2.3.0

jax-rs-2.0jpa-2.1

j1demo-web-1.0.3

j1demo-persist-1.4.0

Page 16: Future<JavaEE>€¦ ·  · 2014-09-16jersey-2.1.5 javaee-web-7.0 ... (w/Grizzly WebSocket API) ... Java EE 7 Platform Roadmap • JAX-RS 2.0 and JPA 2.1 filed few months back

16

Modular Applications

j1demo.app

javaee-web-7.0

implements

twitter-client-2.3.0

jax-rs-2.0jpa-2.1

…………

gf-appserver-4.0.1

j1demo-web-1.0.3

j1demo-persist-1.4.0

Page 17: Future<JavaEE>€¦ ·  · 2014-09-16jersey-2.1.5 javaee-web-7.0 ... (w/Grizzly WebSocket API) ... Java EE 7 Platform Roadmap • JAX-RS 2.0 and JPA 2.1 filed few months back

17

Modular Applications

j1demo.app

gf-appserver-4.0.1

implements

eclipselink-2.1.3

jersey-2.0.5

javaee-web-7.0

implements

twitter-client-2.3.0

jax-rs-2.0jpa-2.1

…………

j1demo-web-1.0.3

j1demo-persist-1.4.0

Page 18: Future<JavaEE>€¦ ·  · 2014-09-16jersey-2.1.5 javaee-web-7.0 ... (w/Grizzly WebSocket API) ... Java EE 7 Platform Roadmap • JAX-RS 2.0 and JPA 2.1 filed few months back

18

Modular Applications

j1demo.app

jersey-2.1.1

javaee-web-7.0

twitter-client-2.4.0 jax-rs-2.1

jpa-2.1

…………

gf-appserver-4.0.1eclipselink-2.1.3

j1demo-web-1.0.3

j1demo-persist-1.4.0

Page 19: Future<JavaEE>€¦ ·  · 2014-09-16jersey-2.1.5 javaee-web-7.0 ... (w/Grizzly WebSocket API) ... Java EE 7 Platform Roadmap • JAX-RS 2.0 and JPA 2.1 filed few months back

19

Modular Applications

jersey-2.1.5

javaee-web-7.0

twitter-client-2.4.0

jax-rs-2.1jpa-2.1

…………

gf-appserver-4.1.5eclipselink-2.1.3

jersey-2.1.1

jax-rs-2.1

j1demo.app

j1demo-web-1.0.3

j1demo-persist-1.4.0

Page 20: Future<JavaEE>€¦ ·  · 2014-09-16jersey-2.1.5 javaee-web-7.0 ... (w/Grizzly WebSocket API) ... Java EE 7 Platform Roadmap • JAX-RS 2.0 and JPA 2.1 filed few months back

20

Web Tier

• Web socket support• Standard JSON API• HTML5 support• NIO.2-based web container

Page 21: Future<JavaEE>€¦ ·  · 2014-09-16jersey-2.1.5 javaee-web-7.0 ... (w/Grizzly WebSocket API) ... Java EE 7 Platform Roadmap • JAX-RS 2.0 and JPA 2.1 filed few months back

21

Web Socket Sample (w/Grizzly WebSocket API)

public class ChatApplication extends WebSocketApplication<ChatWebSocket> { protected ChatWebSocket createWebSocket(Connection c, ServerWebSocketMeta m) { return new ChatWebSocket(c, m, this); }

public void onMessage(ChatWebSocket s, DataFrame frame) { String msg = frame.getAsText(); s.sendJson(s.getUser(), msg); }

public void onClose(ChatWebSocket s) { s.sendJson(“system”, s.getUser() + “ left the chat”); }}

Page 22: Future<JavaEE>€¦ ·  · 2014-09-16jersey-2.1.5 javaee-web-7.0 ... (w/Grizzly WebSocket API) ... Java EE 7 Platform Roadmap • JAX-RS 2.0 and JPA 2.1 filed few months back

22

Async Web Sample (w/Atmosphere)

@Path("/{topic}")@Produces("text/plain;charset=ISO-8859-1")public class PubSub { private @PathParam("topic") Broadcaster topic;

@GET @Suspend public Broadcastable subscribe() { return new Broadcastable("",topic); }

@POST @Broadcast @Consumes(MediaType.APPLICATION_FORM_URLENCODED) public Broadcastable publish( @FormParam("message") String message) { return new Broadcastable(message,topic); }}

Page 23: Future<JavaEE>€¦ ·  · 2014-09-16jersey-2.1.5 javaee-web-7.0 ... (w/Grizzly WebSocket API) ... Java EE 7 Platform Roadmap • JAX-RS 2.0 and JPA 2.1 filed few months back

23

JAX-RS 2.0 Client API (w/Jersey)

WebResource r = Client.create().resource("http://example.com");WebResource content = r.path("containers").path("quotes");content.path("1") .type(MediaType.TEXT_PLAIN) .put("Something is rotten in the state of Denmark");

ClientResponse response = content.path("1") .header("If-Modified-Since", lastModified) .header("If-None-Match", etag) .get(ClientResponse.class);

assertEquals(Response.Status.NOT_MODIFIED, response.getResponseStatus());

Page 24: Future<JavaEE>€¦ ·  · 2014-09-16jersey-2.1.5 javaee-web-7.0 ... (w/Grizzly WebSocket API) ... Java EE 7 Platform Roadmap • JAX-RS 2.0 and JPA 2.1 filed few months back

24

JSF 2.2

• HTML5 support– Semantic tags, browser feature detection– Use of HTML5 by components– Audio and video

• JSR-276 (tool support)• Mobile renderkits• Page resolver and application context manager API• Performance

Page 25: Future<JavaEE>€¦ ·  · 2014-09-16jersey-2.1.5 javaee-web-7.0 ... (w/Grizzly WebSocket API) ... Java EE 7 Platform Roadmap • JAX-RS 2.0 and JPA 2.1 filed few months back

25

JMS 2.0

• Much needed update!• Ease of development makeover• Better integration with application servers• Standardize some common vendor extensions

Page 26: Future<JavaEE>€¦ ·  · 2014-09-16jersey-2.1.5 javaee-web-7.0 ... (w/Grizzly WebSocket API) ... Java EE 7 Platform Roadmap • JAX-RS 2.0 and JPA 2.1 filed few months back

26

JPA 2.1 Candidate Features

• Converters / custom types• “Fetch” plans / profiles• Additional mapping metadata• User-defined naming strategies• More flexibility in use of generated values• Immutable attributes; readonly entities• More flexible XML descriptors• Additional event listeners and callbacks• Improved control of persistence context synchronization• Support for dynamic definition of persistence unit• Extension of Metamodel API to ORM• Methods for dirty detection• Additional unwrap methods

• Support for stored procedures• Additional built-in functions• Database and vendor function invocation support• Downcasting• Outer joins with ON conditions• Update and delete criteria queries• Mapping between JPQL and criteria queries• Improved result type mapping for native queries

Page 27: Future<JavaEE>€¦ ·  · 2014-09-16jersey-2.1.5 javaee-web-7.0 ... (w/Grizzly WebSocket API) ... Java EE 7 Platform Roadmap • JAX-RS 2.0 and JPA 2.1 filed few months back

27

Java EE 7 Platform Roadmap

• JAX-RS 2.0 and JPA 2.1 filed few months back• Java EE 7, EJB 3.2 filed last week.• Target completion in 2012

Page 28: Future<JavaEE>€¦ ·  · 2014-09-16jersey-2.1.5 javaee-web-7.0 ... (w/Grizzly WebSocket API) ... Java EE 7 Platform Roadmap • JAX-RS 2.0 and JPA 2.1 filed few months back

28

Java EE 6 Platform

Available Today

http://www.oracle.com/javaee