jug darmstadt - java ee 7 - auf in die wolken!

55
msg systems ag, 17.10.2011 1 Markus Eisele, Insurance - Strategic IT-Architecture

Upload: markus-eisele

Post on 11-May-2015

3.596 views

Category:

Technology


1 download

DESCRIPTION

My Java EE 7 overview for the Java User Group Darmstadt!

TRANSCRIPT

Page 1: JUG Darmstadt - Java EE 7 - Auf in die Wolken!

msg systems ag, 17.10.2011 1 Markus Eisele, Insurance - Strategic IT-Architecture

Page 2: JUG Darmstadt - Java EE 7 - Auf in die Wolken!

Markus Eisele, Oracle ACE Director FMW & SOA 2

Disclaimer

The thoughts expressed here are

the personal opinions of the author

and no official statement

of the msg systems ag.

msg systems ag

Page 3: JUG Darmstadt - Java EE 7 - Auf in die Wolken!

msg systems ag, 17.10.2011 Markus Eisele, Insurance - Strategic IT-Architecture 3

http://blog.eisele.net

http://twitter.com/myfear

[email protected]

Page 4: JUG Darmstadt - Java EE 7 - Auf in die Wolken!

Markus Eisele, Insurance - Strategic IT-Architecture 4

Agenda

1. Java EE – Past, Present and Future

2. Java EE 7 – Platform as a Service

3. All the Specs

4. GlassFish 4.0

msg systems ag

Page 5: JUG Darmstadt - Java EE 7 - Auf in die Wolken!

Markus Eisele, Insurance - Strategic IT-Architecture 5

Java EE Past, Present and Future

JPE

Project

J2EE 1.2

Servlet, JSP,

EJB, JMS

RMI/IIOP

J2EE 1.3

CMP,

Connector

Architecture

J2EE 1.4

Web Services,

Management,

Deployment,

Async.

Connector

Java EE 5

Ease of

Development

Annotations

EJB 3.0

Persistence API

New and

Updated

Web Services

Robustness

Web

Services

Enterprise

Java

Platform `

Java EE 6

Pruning

Extensibility

Profiles

Ease-of-dev

EJB Lite

RESTful WS

CDI

Web Profile

&

Managed

Beans 1.0

Ease of

Development

Flexible

Dec 2009

28 specs

May 1998 Dec 1999

10 specs

Sep 2001

13 specs

Nov 2003

20 specs

May 2006

23 specs

Java EE 7

Multi-tenancy,

Isolation

Application

Versioning,

Packaging

Virtualization

Modularity

New Roles

Cloud

Q3 2012

28+ specs

msg systems ag

Page 6: JUG Darmstadt - Java EE 7 - Auf in die Wolken!

Markus Eisele, Insurance - Strategic IT-Architecture 6

• Provide way for customers and users to

leverage public, private, and hybrid clouds

• PaaS support entails evolutionary change

• Next logical step for Java EE

J2EE -> Java EE 6 : The Java EE Platform provides

services

Java EE 7 : The Java EE Platform IS a service

Java EE 7 Focus : Platform as a Service

msg systems ag

Page 7: JUG Darmstadt - Java EE 7 - Auf in die Wolken!

Markus Eisele, Insurance - Strategic IT-Architecture 7

[I|P|S]aas - Introduction

msg systems ag

Page 8: JUG Darmstadt - Java EE 7 - Auf in die Wolken!

Markus Eisele, Insurance - Strategic IT-Architecture 8

• Define new platform roles to accommodate

PaaS model

• Add metadata

For service provisioning and configuration

For QoS, elasticity

For sharing of applications and resources

For (re)configurability and customization

• Add useful APIs for cloud environment

JAX-RS client API, Caching API, State

Management, JSON,…

• Extend existing APIs with support for

multitenancy

Java EE 7 PaaS Roadmap

msg systems ag

Page 9: JUG Darmstadt - Java EE 7 - Auf in die Wolken!

Markus Eisele, Insurance - Strategic IT-Architecture 9

Java EE 7 Roles

msg systems ag

Page 10: JUG Darmstadt - Java EE 7 - Auf in die Wolken!

msg systems ag Markus Eisele, Insurance - Strategic IT-Architecture 10

• In the cloud tenant

applications consume

services

• PaaS administrators host,

configure, and manage

application and

infrastructure services

• Existing APIs in Java EE

need to be updated to be

service-enabled and

tenant-aware

Example: pluggable

services, late binding and

tenant id injection

Cloud Services – not just APIs

Page 11: JUG Darmstadt - Java EE 7 - Auf in die Wolken!

msg systems ag Markus Eisele, Insurance - Strategic IT-Architecture 11

• Old Java EE Model

Configure Java EE

resources – JDBC, JMS

etc

Deploy Application EAR

• Java EE 7 Model

Provision and deploy

application resources

(e.g. LDAP stripe, data

source instantiation and

connection …)

• Extensible Deployment

Models Supporting

Multiple Frameworks

Spring, Seam, Play …

Existing Java EE Model

Page 12: JUG Darmstadt - Java EE 7 - Auf in die Wolken!

Markus Eisele, Insurance - Strategic IT-Architecture 12

Auto-Provision Services from Application Dependencies

• Java EE 7 Model

Provision and deploy

application resources

(e.g. LDAP stripe, data

source instantiation and

connection …)

• Extensible Deployment

Models Supporting

Multiple Frameworks

Spring, Seam, Play …

msg systems ag

Page 13: JUG Darmstadt - Java EE 7 - Auf in die Wolken!

Markus Eisele, Insurance - Strategic IT-Architecture 13

• Service Levels

• Minimum and Maximum Instances

• Futures – Self Adjustment, Capacity On Demand

Elasticity

msg systems ag

Page 14: JUG Darmstadt - Java EE 7 - Auf in die Wolken!

Markus Eisele, Insurance - Strategic IT-Architecture 14

• Alignment of ManagedBeans across CDI,

EJB, JSF,…

POJO -> ManagedBean -> Enterprise JavaBean

Extension of container-managed transactions

beyond EJB

• Further simplifications for ease-of-

development

JMS 2.0 focus on ease-of-development

Expanded use of dependency injection

Expanded service metadata; improved configuration

• Pruning

EJB CMP and BMP, JAX-RPC, Deployment API

• Update to Web Profile

And … not only clouds:

msg systems ag

Page 15: JUG Darmstadt - Java EE 7 - Auf in die Wolken!

msg systems ag Markus Eisele, Insurance - Strategic IT-Architecture 15

Java EE 7 at a Glance

Page 16: JUG Darmstadt - Java EE 7 - Auf in die Wolken!

Markus Eisele, Insurance - Strategic IT-Architecture 16

• The main theme is to easily run applications on private or

public clouds

• The platform will define application metadata descriptor to

describe PaaS execution environment such as multi-tenancy,

resources sharing, quality-of-service, and dependencies

between applications

• Embrace latest standards like HTML5, WebSocket, JSON and

have a standards-based API for each one of them

• Remove inconsistencies between Managed Beans, EJB,

Servlets, JSF, CDI, and JAX-RS

• Possible inclusion of JAX-RS 2.0 in the Web Profile, revised

JMS 2.0 API

• Technology Refresh for several existing technologies (more

on this below) and possible inclusion of Concurrency Utilities

for Java EE (JSR 236) and JCache (JSR 107)

Java EE 7 – JSR 342

msg systems ag

Page 18: JUG Darmstadt - Java EE 7 - Auf in die Wolken!

Markus Eisele, Insurance - Strategic IT-Architecture 18

• Multi-Tenancy (Table discriminator)

• Stored Procedures and vendor functions

• Update and Delete Critieria queries

• Custom types and transformation methods - Query by

Example

• Dynamic PU Definition

• Persistence Context synchronization

• CDI injection into listeners

• Schema Generation (Additional mapping metadata to

provide better standardization)

JPA 2.1 – JSR 338

msg systems ag

Page 20: JUG Darmstadt - Java EE 7 - Auf in die Wolken!

Markus Eisele, Insurance - Strategic IT-Architecture 20

• This could be considered as the most mature spec in

general. It had a long 9 years to go since it's last

maintenance release (April 2002).

Ease of development - changes to the JMS

programming model to make the application

development simpler and easier

• Remove/Clarify ambiguities in the existing specification

• Integration with CDI

• Clarification of the relationship between JMS and other

Java EE specs

• A new mandatory API to allow any JMS provider to be

integrated with any Java EE container

• Multi-tenancy and other cloud-related features from the

platform

Java Message Server 2.0 -JSR 343

msg systems ag

Page 22: JUG Darmstadt - Java EE 7 - Auf in die Wolken!

Markus Eisele, Insurance - Strategic IT-Architecture 22

• Enhancements to the EJB architecture to enable PaaS,

such as multi-tenancy

• Factorization of container-managed transactions to use

outside EJB

• Further use of annotations

• Alilgnment and integration with other specifications in

the platform

• Incremental factorization (Interceptors)

• Proposed Optional: BMP/CMP

• Proposed Optional: Web Services invocation using

RPC

EJB 3.2 – JSR 345

msg systems ag

Page 24: JUG Darmstadt - Java EE 7 - Auf in die Wolken!

Markus Eisele, Insurance - Strategic IT-Architecture 24

• Global ordering of interceptors and decorators

• API for managing built-in contexts

• Embedded mode to allow startup outside Java EE

container

• Declarative control over which packages/beans are

scanned in an archive

Injection for static members such as loggers

• Send Servlet events as CDI event

CDI 1.1 – JSR 346

msg systems ag

Page 25: JUG Darmstadt - Java EE 7 - Auf in die Wolken!

Markus Eisele, Insurance - Strategic IT-Architecture 25

• Approved by the JCP, Early Draft Available

Spec lead: Pete Muir (RedHat)

• Project: CDI 1.1 Development

Mailing List Archive:

http://lists.jboss.org/pipermail/cdi-dev/

https://twitter.com/jsr346

CDI 1.1 – JSR 346

msg systems ag

Page 26: JUG Darmstadt - Java EE 7 - Auf in die Wolken!

Markus Eisele, Insurance - Strategic IT-Architecture 26

• Optimize the PaaS model for Web applications

• Multi tenancy for security, session, resources, etc.

• Asynchronous IO based on NIO2

• Simplfiied asynchronous Servlets

• Utilize Java EE concurrency utilities

• Enable support for WebSockets

Servlet 3.1 – JSR 340

msg systems ag

Page 28: JUG Darmstadt - Java EE 7 - Auf in die Wolken!

Markus Eisele, Insurance - Strategic IT-Architecture 28

• Ease of Development - making configuration options

dynamic, make cc:interface in composite components

optional, shorthand URLs for Facelet tag libraries,

integration with CDI, OSGi support for JSF artifacts

Support implementation of Portlet Bridge 2.0 (JSR 329)

• Support for HTML5 features like HTML5 Forms,

Metadata, Heading and Section content model

• Flow management, Listener for page navigation events,

and new components like FileUpload and BackButton

Java Server Faces 2.2 - JSR 344

msg systems ag

Page 29: JUG Darmstadt - Java EE 7 - Auf in die Wolken!

Markus Eisele, Insurance - Strategic IT-Architecture 29

• Approved by the JCP, Early Draft Available

• http://jcp.org/en/jsr/detail?id=344

• Spec lead: Ed Burns (Oracle)

• Project: javaserverfaces-spec-public.java.net

• Mailing List Archive:

[email protected]

[email protected]

Java Server Faces 2.2 - JSR 344

msg systems ag

Page 30: JUG Darmstadt - Java EE 7 - Auf in die Wolken!

Markus Eisele, Insurance - Strategic IT-Architecture 30

• Client API - low level using builder pattern and possibly

a higher level on top of that

• Hypermedia - easily create and process links

associated with resources

Form or Query parameter validation using Bean

Validation

• Closer integration with @Inject, etc

• Server-side asynchronous request processing

• Server-side content negotiation using "qs"

JAX-RS 2.0 – JSR 339

msg systems ag

Page 32: JUG Darmstadt - Java EE 7 - Auf in die Wolken!

Markus Eisele, Insurance - Strategic IT-Architecture 32

• Separate ELContext into parsing and evaluation

contexts

• Customizable EL coercion rules

• Reference static methods and members directly in EL

expressions

• Adding operators like equality, string concatenation, and

sizeof etc.

• Integration with CDI such as generating events

before/during/after the expressions are evaluated

Expression Language 3.0 – JSR 341

msg systems ag

Page 34: JUG Darmstadt - Java EE 7 - Auf in die Wolken!

Markus Eisele, Insurance - Strategic IT-Architecture 34

• Integration with other Java EE specs

JAX-RS: Validate parameters and return values on

HTTP calls

JAXB: Convert constraints into XML schema

descriptor

• Method level validation

• Apply constraints on group collection

• Extend the model to support AND and OR style

composition

Bean Validation 1.1 – JSR 349

msg systems ag

Page 35: JUG Darmstadt - Java EE 7 - Auf in die Wolken!

Markus Eisele, Insurance - Strategic IT-Architecture 35

• Approved by the JCP

• http://jcp.org/en/jsr/detail?id=349

• Spec lead: Emmanuel Bernard (RedHat)

• Project: beanvalidation.org

Mailing List Archive:

http://lists.jboss.org/pipermail/beanvalidation-dev/

Bean Validation 1.1 – JSR 349

msg systems ag

Page 36: JUG Darmstadt - Java EE 7 - Auf in die Wolken!

Markus Eisele, Insurance - Strategic IT-Architecture 36

• Common Annotations 1.2 MR

• JAX-WS 2.3 MR

• JTA 1.2 MR

• JSP 2.3 MR

• JASPIC 1.2 MR

MR Releases

msg systems ag

Page 37: JUG Darmstadt - Java EE 7 - Auf in die Wolken!

msg systems ag Markus Eisele, Insurance - Strategic IT-Architecture 37

• JCache 1.0 (JSR 107)

• Concurrency Utilities 1.0 (JSR-236)

• State Management 1.0 (JSR 350)

• Batch Processing 1.0 (JSR 352)

• Java API for JSON Processing 1.0 (JSR 353)

Candiadates

Page 38: JUG Darmstadt - Java EE 7 - Auf in die Wolken!

Markus Eisele, Insurance - Strategic IT-Architecture 38

• API and semantics for temporary, in-memory caching of

Java objects, including object creation, shared access,

spooling, invalidation, and consistency across JVMs

• Package: javax.cache

JCache - JSR 107

msg systems ag

Page 39: JUG Darmstadt - Java EE 7 - Auf in die Wolken!

Markus Eisele, Insurance - Strategic IT-Architecture 39

• Approved by the JCP

• http://jcp.org/en/jsr/detail?id=107

• Spec lead: Yannis Cosmadopoulos, Cameron Purdy

(Oracle) and Gregory Luck (Software AG)

• Project page: jsr107spec

• Mailing List Archive:

[email protected]

JCache - JSR 107

msg systems ag

Page 40: JUG Darmstadt - Java EE 7 - Auf in die Wolken!

Markus Eisele, Insurance - Strategic IT-Architecture 40

• API that can be used by applications and Java EE

containers to offload the responsibility of statement

management into third party providers with different

QoS characteristics

• Java SE-based callers can access the state data by

querying the state providers

• Providers with different QoS can be added and API

callers can query to meet their criteria

• Package: javax.state and javax.state.provider

State Management - JSR 350

msg systems ag

Page 41: JUG Darmstadt - Java EE 7 - Auf in die Wolken!

Markus Eisele, Insurance - Strategic IT-Architecture 41

• Approved by the JCP

• http://jcp.org/en/jsr/detail?id=350

• Spec lead: Mitch Upton (Oracle)

• Project page: java-state-management.java.net

• Mailing List Archive:

[email protected],

[email protected]

State Management - JSR 350

msg systems ag

Page 42: JUG Darmstadt - Java EE 7 - Auf in die Wolken!

Markus Eisele, Insurance - Strategic IT-Architecture 42

• Programming model for batch applications and a

runtime for scheduling and executing jobs

• Defines Batch Job, Batch Job Step, Batch Application,

Batch Executor, and Batch Job Manager for the

standard programming model

• Package: javax.batch

Batch Application for the Java Platform - JSR 352

msg systems ag

Page 43: JUG Darmstadt - Java EE 7 - Auf in die Wolken!

Markus Eisele, Insurance - Strategic IT-Architecture 43

• Approved by the JCP

• http://jcp.org/en/jsr/detail?id=352

• Spec lead: Chris Vignola (IBM)

• Project page: jbatch.java.net

• Mailing List Archive:

[email protected]

Batch Application for the Java Platform - JSR 352

msg systems ag

Page 44: JUG Darmstadt - Java EE 7 - Auf in die Wolken!

Markus Eisele, Insurance - Strategic IT-Architecture 44

• Provides a clean, simple, independent API by building

on JSR 166, making it appropriate for use within any

Java EE container.

• Package: javax.util.concurrent

Concurrency Utilities for Java EE - JSR 236

msg systems ag

Page 45: JUG Darmstadt - Java EE 7 - Auf in die Wolken!

Markus Eisele, Insurance - Strategic IT-Architecture 45

• Approved by the JCP

• http://jcp.org/en/jsr/detail?id=236

• Spec lead: Anthony Lai, Naresh Revanuru (Oracle)

• Project page:

• Mailing List Archive:

Concurrency Utilities for Java EE - JSR 236

msg systems ag

Page 46: JUG Darmstadt - Java EE 7 - Auf in die Wolken!

Markus Eisele, Insurance - Strategic IT-Architecture 46

• Produce and consume JSON text in a streaming

fashion(similar to StAX API for XML)

• Build a Java object model for JSON text using API

classes(similar to DOM API for XML)

Java API for JSON Processing - JSR 353

msg systems ag

Page 47: JUG Darmstadt - Java EE 7 - Auf in die Wolken!

Markus Eisele, Insurance - Strategic IT-Architecture 47

• Under JCP Review

• http://jcp.org/en/jsr/detail?id=353

• Spec lead: Jitendra Kotamraju

• Project Page: http://java.net/projects/json-processing-

spec

• Mailing List Archive

Java API for JSON Processing - JSR 353

msg systems ag

Page 48: JUG Darmstadt - Java EE 7 - Auf in die Wolken!

Markus Eisele, Insurance - Strategic IT-Architecture 48

• Nearly all JSRs up and running

• Final release target: Q3 2012

• Date-driven release: anything not ready will be

deferred to Java EE 8

Status and Schedule

msg systems ag

Page 49: JUG Darmstadt - Java EE 7 - Auf in die Wolken!

Markus Eisele, Insurance - Strategic IT-Architecture 49

• The Expert Groups for most of the JSRs have already been formed

but you can still participate by joining the publicly visible aliases and

reviewing the drafts. All the JSRs following JCP 2.8 are run more

transparently and some of the highlights on that front are:

• Names of the EG members are publicly visible

• EG business reported on publicly readable alias

• Schedule is public, current and updated regularly

• Public can read/write to a wiki to discuss the status so far

• Discussion board on jcp.org

• Public read-only issue tracker

JCP 2.8

msg systems ag

Page 50: JUG Darmstadt - Java EE 7 - Auf in die Wolken!

Markus Eisele, Insurance - Strategic IT-Architecture 50

• Enterprise Software Development mit Java Blog:

http://blog.eisele.net

• Markus‘ Twitter

http://twitter.com/myfear

• Java EE 7 Expert Group Page

http://javaee-spec.java.net

One project per spec – e.g., jpa-spec, jax-rs-spec, jms-spec…

• Java EE 7 Reference Implementation

http://glassfish.org

• The Aquarium

http://blogs.oracle.com/theaquarium

• Arun Gupta‘s Blog „Miles to go…“

http://blogs.oracle.com/arungupta

• Java Community Process

http://jcp.org

Links and Readings

msg systems ag

Page 51: JUG Darmstadt - Java EE 7 - Auf in die Wolken!

msg systems ag, 17.10.2011 Markus Eisele, Insurance - Strategic IT-Architecture 51

Page 52: JUG Darmstadt - Java EE 7 - Auf in die Wolken!

msg systems ag, 17.10.2011 Markus Eisele, Insurance - Strategic IT-Architecture 52

Conference Planning in the Cloud - JavaOne 2011 Demo

Page 53: JUG Darmstadt - Java EE 7 - Auf in die Wolken!

msg systems ag, 17.10.2011 Markus Eisele, Insurance - Strategic IT-Architecture 53

Service Provisioning

Page 54: JUG Darmstadt - Java EE 7 - Auf in die Wolken!

msg systems ag, 17.10.2011 Markus Eisele, Insurance - Strategic IT-Architecture 54

GlassFish Server – Java EE RI - Roadmap

Page 55: JUG Darmstadt - Java EE 7 - Auf in die Wolken!

www.msg-systems.com

Vielen Dank für Ihre Aufmerksamkeit

Markus Eisele, Insurance - Strategic IT-Architecture 55

Markus Eisele

http://twitter.com/myfear

http://blog.eisele.net/

www.msg-systems.com

msg systems ag