SlideShare a Scribd company logo
What’s New in the Java EE Platform
Alpes JUG - March 2014
!
David Delabassee
@delabassee
Software Evangelist - Oracle
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!2
Program Agenda
A look at some of the important
new features of Java EE 7
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!3
Java EE 7 Momentum
ACTIVEPROJECTS
26
Active and
transparent
mailing lists
JSRsADOPTED
22
JUGs
19
Adopt a JSR
PROMOTEDBUILDS
89
GlassFish
YOU
187
COMPANIES
32
EXPERTS
SPECLEADS
16
ACTIVEJSRs
14
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!4
Java EE 7 Momentum
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!5
Java EE 7 Themes
ENTERPRISE
EDITION
▪ 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
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
Java EE 7 JSRs

New or Updated
▪ JPA 2.1
▪ JAX-RS 2.0
▪ EJB 3.2
▪ JMS 2.0
▪ Servlet 3.1
▪ EL 3.0
▪ JSF 2.2
▪ CDI 1.1
▪ Bean Validation 1.1
▪ WebSocket 1.0
▪ JSON 1.0
▪ Batch Applications 1.0
▪ Concurrency Utilities 1.0
!6
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
Java EE 7 Maintenance Releases
▪ Common Annotations 1.2
▪ JTA 1.2
▪ Interceptors 1.2
▪ Connector 1.7
▪ JSP 2.3
▪ JASPIC 1.2
▪ JACC 1.4
▪ JavaMail 1.5
▪ Web Services 1.4
!7
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!8
JSON Processing 1.0
▪ API to parse and generate JSON
▪ Streaming API (javax.json.stream)
– Low-level, efficient way to parse/generate JSON
– Similar to StAX API in XML world
▪ Object model API (javax.json)
– Simple, easy to use high-level API
– Similar to DOM API in XML world
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!9
JSON Processing 1.0
▪ Created using
– Json.createParser(…)!
– Json.createParserFactory().createParser(…)!
▪ Parses JSON in streaming way from input sources
Event event = parser.next(); // START_OBJECT!
event = parser.next(); // KEY_NAME!
event = parser.next(); // VALUE_STRING!
▪ Parser state events
– START_OBJECT, END_OBJECT, START_ARRAY, END_ARRAY,
KEY_NAME, VALUE_STRING, VALUE_NUMBER, …
Streaming API: Parsing
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!10
JSON Processing 1.0
{!
“firstName”:“John”,“lastName”: “Smith”,“age”: 25,!
“phoneNumber”: [!
{“type”: “home”, “number”: “212 555-1234” },!
{“type”: “fax”, “number”: “646 555-4567” }!
]!
}
Streaming Parser
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!11
JSON Processing 1.0
{!
“firstName”:“John”,“lastName”: “Smith”,“age”: 25,!
“phoneNumber”: [!
{“type”: “home”, “number”: “212 555-1234” },!
{“type”: “fax”, “number”: “646 555-4567” }!
]!
}
Streaming Parser
START_OBJECT
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!12
JSON Processing 1.0
{!
“firstName”:“John”,“lastName”: “Smith”,“age”: 25,!
“phoneNumber”: [!
{“type”: “home”, “number”: “212 555-1234” },!
{“type”: “fax”, “number”: “646 555-4567” }!
]!
}
Streaming Parser
KEY_NAME
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!13
JSON Processing 1.0
{!
“firstName”:“John”,“lastName”: “Smith”,“age”: 25,!
“phoneNumber”: [!
{“type”: “home”, “number”: “212 555-1234” },!
{“type”: “fax”, “number”: “646 555-4567” }!
]!
}
Streaming Parser
VALUE_STRING
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!14
JSON Processing 1.0
{!
“firstName”:“John”,“lastName”: “Smith”,“age”: 25,!
“phoneNumber”: [!
{“type”: “home”, “number”: “212 555-1234” },!
{“type”: “fax”, “number”: “646 555-4567” }!
]!
}
Streaming Parser
VALUE_NUMBER
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!15
JSON Processing 1.0
{!
“firstName”:“John”,“lastName”: “Smith”,“age”: 25,!
“phoneNumber”: [!
{“type”: “home”, “number”: “212 555-1234” },!
{“type”: “fax”, “number”: “646 555-4567” }!
]!
}
Streaming Parser
START_ARRAY
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!16
JSON Processing 1.0
{!
“firstName”:“John”,“lastName”: “Smith”,“age”: 25,!
“phoneNumber”: [!
{“type”: “home”, “number”: “212 555-1234” },!
{“type”: “fax”, “number”: “646 555-4567” }!
]!
}
Streaming Parser
END_ARRAY
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
JSON Processing 1.0
JsonGenerator gen = Json.createGenerator…!
.writeStartObject()!
.write("firstName", "John") !
.write("lastName", "Smith") !
.write("age", 25) !
.writeStartArray(“phones”)!
.writeStartObject()!
!! .write(“type",“home") !
.write(“number”, “222…”)!
.writeEnd()!
.writeStartObject() …!
.writeEnd()!
.writeEnd()!
.writeEnd();!
!
Using Streaming API to generate JSON
!
{ “firstName”:“John”,!
“lastName”:”Smith”,!
“age”:25, !
“phones”:[ !
{“type”:“home”,“number”:“…”},!
{“type”:“fax”,“number”:“…”} ]!
}
!17
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!18
Interactive Web Sites
• Flavors of Server Push
• Polling
• Long polling
• AJAX
!
!
• Complex, inefficient, wasteful
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!19
WebSockets to the rescue
▪ Bidirectional full-duplex messaging
– Over a single TCP connection
▪ IETF defined protocol: RFC 6455
▪ Part of HTML5
▪ W3C defined JavaScript API
▪ Adoption
▪ http://caniuse.com/websockets
Bring interactivity to the Web
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!20
WebSockets
Handshake Request
Http Request!
GET /mychat HTTP/1.1!
Host: server.example.com!
Upgrade: websocket!
Connection: Upgrade!
Sec-WebSocket-Key: x3JJHMbDL1EzLkh9GBhXDw==!
Sec-WebSocket-Protocol: megachat, chat!
Sec-WebSocket-Extensions : compress, mux!
Sec-WebSocket-Version: 13!
Origin: http://example.com
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!21
WebSockets
Handshake Response
Http Response!
HTTP/1.1 101 Switching Protocols!
Upgrade: websocket!
Connection: Upgrade!
Sec-WebSocket-Accept: HSmrc0sMlYUkAGmm5OPpG2HaGWk=!
Sec-WebSocket-Protocol: chat!
Sec-WebSocket-Extensions: compress, mux
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!22
Java API for WebSocket 1.0
▪ WebSocket Java client & server API
▪ Part of Java EE 7
▪ Annotation-based & interface-based programming model
▪ Under consideration for Java SE 9
▪ Reference Implementation
▪ http://tyrus.java.net
▪ Supported in GlassFish 4.0
JSR 356
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!23
Java API for WebSocket 1.0
▪ Establish a WebSocket connection
▪ Send messages backwards and forwards
▪ End the connection
What’s the basic idea?
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!24
Java API for WebSocket 1.0
▪ Session
– Represents the active conversation
▪ Endpoint
– Intercepts websocket lifecycle events
▪ RemoteEndpoint
– Represents the other end of the conversation
▪ MessageHandler
– Handles incoming messages for endpoint
Main API classes
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!25
WebSocket Endpoints
public class MyClient extends Endpoint {!
public void onOpen(Session session, EndpointConfig ec) {!
session.addMessageHandler(new MessageHandler.Whole<String>() {!
public void onMessage(String payload) {!
System.out.println("From the server : " + payload);!
}!
}!
session.getBasicRemote().sendText("Hello!");!
}!
!
public void onClose(Session session, CloseReason closeReason) {!
super.onClose(session, closeReason);!
}!
}
Programmatic API
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!26
WebSocket Endpoints as POJOs
@ClientEndpoint!
public class MyClient { !
@OnOpen!
public void onOpen(Session session) {!
session.getBasicRemote().sendText(“Hello”);!
}!
@OnMessage!
public void onMessage(String payload, Session session) { !
System.out.println("From the server : " + payload);!
} !
}
Annotated client endpoint
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!27
WebSocket Endpoints as POJOs
@ServerEndpoint(“/chat")!
public class ChatServer { !!
static Set<Session> peers = Collections.synchronizedSet(…);!!!
! ! ! @OnOpen!
!!! public void onOpen(Session peer) {!
peers.add(peer);!
}!
!
@OnMessage!
!!! public void onMessage (String message, Session client) { !
for (Session peer : peers) {!
peer.getBasicRemote().sendObject(message);!
} !
}!
!
@OnClose!
!!! public void onClose(Session peer) {!
peers.remove(peer);!
}!
}
Annotated server endpoint
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!28
Java API for WebSocket 1.0
▪ Payload
▪ Text
▪ Binary
▪ Ping-Pong
▪ Synchronous / Asynchronous
▪ Whole message / Sequence of partial messages
▪ No delivery guarantee
Messaging
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!29
Java API for WebSocket 1.0
▪ Use Session’s RemoteEndpoint interface
mySession.getBasicRemote().sendText(”Hello”);
!
▪ Return a value from @OnMessage method
@OnMessage!
public String echo(String incomingMessage) {!
return(“Hello”);!
}
Sending messages
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!30
Java API for WebSocket 1.0
Means of sending RemoteEndpoint method to use
as whole string sendText(String message)
as binary data sendBinary(ByteBuffer message)
in string fragments sendText(String part, boolean last)
in binary data fragments sendBinary(ByteBuffer part, boolean last)
as a blocking stream of text Writer getSendWriter())
as a blocking stream of binary data OutputStream getSendStream()
as a custom object of type T sendObject(T customObject)
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!31
Java API for WebSocket 1.0
▪ Annotation - @onMessage
@OnMessage!
public void whenGettingText(String message)…!
!
▪ Implement a MessageHandler, add it to the Session
MyMessageHandler implements MessageHandler.Whole<String>!
…!
session.addMessageHandler( new MyMessageHandler() );
Receiving messages
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!32
Java API for WebSocket 1.0
▪ Encoder
▪ Object to Binary: Encoder.Binary<T>, Encoder.BinaryStream<T>!
▪ Object to Text: Encoder.Text<T>, Encoder.TextStream<T>!
▪ Decoder
▪ Text to Object: Decoder.Text<T>, Decoder.TextStream<T>!
▪ Binary to Object: Decoder.Binary<T>, Decoder.BinaryStream<T>!
▪ Lifecycle
▪ init() and destroy() methods
▪ willDecode()
Custom payload
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!33
Java API for RESTful Web Services (JAX-RS) 2.0
▪ Client API
▪ Filters and Interceptors
▪ Asynchronous Processing
▪ Hypermedia
▪ Validation
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!34
JAX-RS 1.1
URL url = new URL("http://. . ./atm/balance"); !
HttpURLConnection conn = (HttpURLConnection) url.openConnection();!
conn.setDoInput(true); !
conn.setDoOutput(false); !
conn.setRequestMethod("GET"); !
BufferedReader br = new BufferedReader(new!
!!! ! ! ! ! ! ! ! ! InputStreamReader(conn.getInputStream())); !
String line; !
while ((line = br.readLine()) != null) {    !
//. . . !
}
Previous Client API
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!35
JAX-RS 2.0
Client client = ClientFactory.newClient();!
!
String name = client.target("http://.../orders/{orderId}/customer")!
.resolveTemplate(“orderId”, “10”)!
.request()!
.get(String.class);
JAX-RS 2.0 Client API
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!36
Client client = ClientFactory.newClient();!
…!
WebTarget target = client.target(“http://…/orders/{orderId}/customer”)!
! ! .register(LoggingFilter.class);!
!
String name = target.resolveTemplate(“orderId”, “10”)!
!! !! ! ! ! .request()!
!! !! ! ! ! .get(String.class);
JAX-RS 2.0
JAX-RS 2.0 Client API
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!37
JAX-RS 2.0
@Path("/")!
class MyResourceClass {!
!
@POST!
@Consumes(MediaType.APPLICATION_FORM_URLENCODED)!
public void registerUser(!
@NotNull @FormParam("firstName") String firstName,!
@NotNull @FormParam("lastName") String lastName,!
@Email @FormParam("email") String email) {!
... }!
…!
}
Bean Validation
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!38
Servlet 3.1
▪ Protocol Upgrade
▪ Non-blocking I/O
▪ Miscellaneous
▪ Security
▪ Upload
▪ …
JSR 340
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!39
Alignment and Simplification of Managed Beans
▪ CDI is core component model
▪ CDI enabled by default
▪ Expanded use of CDI Interceptors
– Transactional interceptors
– Method-level validation interceptors
▪ New CDI scopes: @TransactionScoped, @FlowScoped
Cohesive, integrated model
Java EE 7
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!40
Managed Bean Alignment
▪ CDI injection and CDI interceptors apply to all Java EE components
and related managed classes when CDI is enabled
▪ CDI is enabled by default in implicit bean archives
– Use of CDI bean-defining annotations (@SessionScoped,
@Dependent,…) and session beans result in implicit bean archives
▪ Library jars, EJB jars, WEB-INF/classes
– beans.xml not required
Expanded use of CDI
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!41
Transactional Interceptors
@Transactional(rollbackOn={SQLException.class},!
dontRollbackOn={SQLWarning.class})!
public class ShoppingCart {…}!
…!
!
@Inherited!
@InterceptorBinding!
@Target({TYPE, METHOD}) @Retention(RUNTIME)!
public @interface Transactional {!
TxType value() default TxType.REQUIRED;!
Class[] rollbackOn() default {};!
Class[] dontRollbackOn() default {};!
}
Annotations and semantics defined in JTA 1.2
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!42
Bean Validation 1.1

Method-level Validation
@Stateless!
public class OrderService {!
…!
@ValidOrder!
public Order placeOrder(!
@NotNull String productName,!
@Max(10) int quantity,!
@NotNull String customerName,!
@Address String customerAddress) {!
…!
}!
}
Via CDI Interceptors
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!43
Interceptor Ordering
▪ Interceptor.Priority.PLATFORM_BEFORE = 0
– Platform-defined interceptors to be executed at beginning of interceptor chain
– Transactional interceptors: Interceptor.Priority.PLATFORM_BEFORE+200
▪ Interceptor.Priority.LIBRARY_BEFORE = 1000
– Intended for use by extension libraries
▪ Interceptor.Priority.APPLICATION = 2000
– Intended for application-defined interceptors
▪ Interceptor.Priority.LIBRARY_AFTER = 3000
▪ Interceptor.Priority.PLATFORM_AFTER = 4000
– Bean Validation defined interceptors: Interceptor.Priority.PLATFORM_AFTER+800
Well-defined priority ordering
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!44
Resource Definition Metadata
▪ Specifies resources needed by application
– Enhances configurability in Java EE 7 apps
– Facilitates provisioning in cloud environments
– Java EE 6 introduced DataSourceDefinition
!
@DataSourceDefinition (!
name=“java:app/jdbc/myDB”,!
className=“oracle.jdbc.pool.OracleDataSource”,!
isolationLevel=TRANSACTION_REPEATABLE_READ, initialPoolSize=5)!
!
@Stateless public class MySessionBean {!
@Resource(lookup=“java:app/jdbc/myDB”) DataSource my DB;!
…!
}
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!45
Resource Definition Metadata
▪ Java EE 7 adds:
– JMSConnectionFactoryDefinition!
– JMSDestinationDefinition!
– MailSessionDefinition!
– ConnectionFactoryDefinition!
– AdministeredObjectDefinition
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!46
Default Resources
▪ JDBC/JPA
– java:comp/DefaultDataSource!
▪ JMS
– java:comp/DefaultJMSConnectionFactory!
▪ Concurrency Utilities
– java:comp/DefaultManagedExecutorService!
– java:comp/DefaultManagedScheduledExecutorService!
– java:comp/DefaultManagedThreadFactory!
– java:comp/DefaultManagedContextService
Preconfigured resources for use by application
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!47
Simplification through Pruning
▪ Process defined in Java EE 6
– Platform version N defines feature as “Proposed Optional”
– Platform version N+1 determines whether to make feature Optional
▪ Optional APIs as of Java EE 7
– EJB Entity Beans (CMP, BMP, EJB QL)
– JAX-RPC
– JAXR
– Deployment (JSR 88)
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!48
Java Message Service 2.0
▪ Less code, less boilerplate
▪ Fewer objects to manage
▪ Increased developer productivity
▪ “Classic API” has also been improved
New JMS Simplified API targeted at ease of development
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!49
JMS 2.0
▪ New JMSContext interface
▪ Use of CDI injection; new TransactionScope
▪ AutoCloseable JMSContext, Connection, Session, …
▪ Use of runtime exceptions
▪ Method chaining on JMSProducer
▪ Simplified message sending
Simplifications include….
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!50
JMS 1.1
@Resource(lookup = “java:global/jms/myConnectionFactory”)!
ConnectionFactory connectionFactory; !
!
@Resource(lookup = “java:global/jms/myQueue”)!
Queue queue; !
!
public void sendMessage(String text) { !
try {!
Connection connection = connectionFactory.createConnection();!
Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);!
MessageProducer messageProducer = session.createProducer(queue);!
TextMessage textMessage = session.createTextMessage(text);!
messageProducer.send(textMessage);!
} finally {!
connection.close();!
} catch (JMSException ex) { … }!
}!
Sending a message in the JMS 1.1 “classic” API
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!51
JMS 2.0
@Resource(lookup = “java:global/jms/myConnectionFactory”)!
ConnectionFactory connectionFactory; !
!
@Resource(lookup = “java:global/jms/myQueue”)!
Queue queue; !
!
public void sendMessage(String text) { !
try (JMSContext context = connectionFactory.createContext();) {!
context.createProducer().send(queue, text);!
} catch (JMSRuntimeException ex) {!
…!
}!
}
Sending a message using Simplified API and JMSContext
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!52
JMS 2.0
@Inject !
@JMSConnectionFactory(“java:global/jms/myConnectionFactory”)!
JMSContext context;!
!
@Resource(lookup = “java:global/jms/myQueue”)!
Queue queue; !
!
public void sendMessage(String text) { !
context.createProducer().send(queue, text);!
}
Even simpler….
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!53
JMS 2.0
@Inject !
JMSContext context;!
!
@Resource(lookup = “java:global/jms/myQueue”)!
Queue queue; !
!
public void sendMessage(String text) { !
context.createProducer().send(queue, text);!
}
Even simpler still….
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!54
Concurrency Utilities for Java EE 1.0
▪ Extension of Java SE Concurrency Utilities API
▪ Provides managed objects for submitting tasks and obtaining
managed threads
– ManagedExecutorService!
– ManagedScheduledExecutorService!
– ManagedThreadFactory!
– ContextService
Provides asynchronous capabilities to Java EE components
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!55
Concurrency Utilities for Java EE 1.0
public class AccountTask implements Callable {!
...!
public AccountInfo call() {!
// task logic!
}!
...!
}!
!
//in calling component:!
@Resource!
ManagedExecutorService mes;!
...!
Future<AccountInfo> acctFuture = mes.submit(new AccountTask(...));!
AccountInfo accountInfo = acctFuture.get(); // Wait for the results.!
...!
// Process the results!
...
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!56
Batch Applications for the Java Platform 1.0
▪ Designed for non-interactive, bulk-oriented and long-running tasks
▪ Sequential, parallel, and/or decision-based batch execution
▪ Processing styles
– Item-oriented (“chunked”)
– Task-oriented (“batchlet”)
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!57
Batch 1.0
▪ Job : Entire batch process
– Defined through XML Job Specification Language
▪ Step : Independent, sequential phase of a job
▪ JobOperator : Interface for managing job processing
▪ JobRepository : Information about past and present jobs
Key concepts
Job Repository
Job Operator Job Step
ItemReader
ItemWriter
ItemProcessor
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!58
Batch 1.0
▪ Chunked : Item-oriented processing
– ItemReader/ItemProcessor/ItemWriter pattern
– Configurable checkpointing and transactions
▪ Batchlet : Task-oriented processing
– Roll-your-own batch pattern
– Runs to completion and exits
▪ Job can include both types of steps
Job steps
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!59
Batch Applications
▪ Read and Process one item
▪ Do the above ‘n’ times (‘commit interval’)
▪ Write the ‘n’ processed items
▪ Commit the transaction
Primary Processing Style
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!60
Batch 1.0
<job id="myJob" xmlns="http://xmlns.jcp.org/xml/ns/javaee" version="1.0">!
<step id="step1" next="step2">!
<chunk item-count="3">!
<reader ref="myItemReader"></reader> !
<processor ref="myItemProcessor"></processor>!
<writer ref="myItemWriter"></writer> !
</chunk>!!
</step>!
<step id="step2" next=“step3”>!
<batchlet ref="myBatchlet"/>!
</step>!
<step id="step3" >!
<chunk item-count="3">!
<reader ref="myOtherItemReader"></reader> !
<processor ref="myOtherItemProcessor"></processor>!
<writer ref="myOtherItemWriter"></writer> !
</chunk>!!
</step>!
</job>
Job specification language
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!61
Batch 1.0
<step id=”sendStatements”>!
<chunk item-count=“3”>

<reader ref=”accountReader”/>!
<processor ref=”accountProcessor”/>

<writer ref=”myWriter”/>!
</step>
…implements ItemReader {

public Object readItem() {

// read account using JPA
}
…implements ItemProcessor {!
Public Object processItems(Object account) {

// read Account, return Statement!
}!
…implements ItemWriter {!
public void writeItems(List accounts) {

// use JavaMail to send email or save on disk!
}!
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!62
Batch 1.0
<step id=”transferFile”>!
<batchlet ref=“MyFileTransfer” />!
</step>
@Dependent!
@Named("MyFileTransfer")!
public class MyBatchlet implements javax.batch.api.chunk.Batchlet {!
@Inject!
private JobContext jobCtx;!!
@Override!
public void process() throws Exception {!
String fName = jobCtx.getProperties().getProperty("out_file");!
// transfer file!
}!
}!
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!63
Batch 1.0
Interface Abstract Classes
JobListener AbstractJobListener
StepListener AbstractStepListener
ChunkListener AbstractChunkListener
ItemRead/Write/ProcessListener AbstractItemRead/Write/ProcessListener
SkipRead/Write/ProcessListener AbstractSkipRead/Write/ProcessListener
RetryRead/Write/ProcessListener AbstractRetryRead/Write/ProcessListener
Listeners
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!64
Batch 1.0
JobOperator
private long startNewBatchJob() throws Exception { !
! ! JobOperator jobOperator = BatchRuntime.getJobOperator(); !
! ! Properties props = new Properties(); !
! ! props.setProperty(”someInputFileName", someInputFileName); !
! ! return jobOperator.start(JOB_NAME, props); !
}
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!65
And more…
▪ Servlet 3.1
▪ JPA 2.1
▪ JSF 2.2
▪ EJB 3.2
▪ EL 3.0
▪ JCA 1.7
▪ …
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!66
Java EE 7 Summary
ENTERPRISE
EDITION
▪ 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
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!67
Transparency in JSR processes
▪ java.net used for all Oracle-led JSRs
– http://java.net/projects/javaee-spec/pages/Home
▪ Publicly viewable Expert Group mailing archives
▪ Users observer lists get copies of all Expert Group emails
▪ Public download areas, JIRAs
▪ Wikis, source repositories, etc. at the group discretion
▪ Commitment to JCP 2.8/2.9 processes
All Java EE JSRs run with high level of transparency
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!68
DOWNLOAD
Java EE 7 SDK
oracle.com/javaee
!
GlassFish 4.0
Full Platform or Web Profile
glassfish.org
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!69
WebLogic Server 12.1.3
WebLogic Server
12.1.3
Clients
HTML5
clients
ADF Mobile
Proxies
HTTP/S, JSON/XML
WebSocket, Server-Sent
Events, Long polling
OTD
Apache
OHS
Web Sockets (JSR 356)
TopLink Data Services
Server-Sent Events
JAX-RS 2.0
Avatar (post-GA)
HTML5client
emulation
JPA
Change

Notification
Database
• Server-Sent Events
• JAX-RS 2.0
• WebSocket – JSR 356
• JPA 2.1, JSON-P
• WebSocket Client Emulation
• Avatar
• Maven improvements
• Classloader Analysis Tool
updates
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!70
Program Agenda
Java EE 8 and beyond
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!71
Java EE 8
▪ New JSRs
▪ JCACHE (JSR 107)
▪ Data Grid API (JSR 347)
▪ State Management API (JSR 350)
▪ Identity API (JSR 351)
▪ Java API for JSON Binding
▪ Java EE Configuration
▪ …
▪ Profiles & Pruning
Ideas… just ideas!
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!72
Java EE 8
▪ HTML 5
▪ Server-sent events?
▪ JavaScript on the server?
▪ Something else?
▪ User Interface
▪ MVC?
▪ Client API for TSA?
▪ Templating? Facelet?
Ideas (cont.)
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!73
Java EE 8
▪ CDI
▪ NoSQL ?
▪ Cloud
▪ PaaS, SaaS, Multi-tenancy ?
▪ Logging
▪ Security
▪ Testability
▪ Deployment, Management, Monitoring
▪ ???
Ideas (cont.)
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!74
https://glassfish.org/survey
Java EE 8 Survey
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!75
Merci!
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.Copyright © 2014, Oracle and/or its affiliates. All rights reserved.Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12!76
Graphic Section Divider

More Related Content

What's hot (20)

PPTX
Servlet 4.0 at GeekOut 2015
Edward Burns
 
PDF
MVC 1.0 / JSR 371
David Delabassee
 
PDF
Server Side JavaScript on the JVM - Project Avatar - QCon London March 2014
David Delabassee
 
PDF
JavaCro'15 - Java EE 8 - An instant snapshot - David Delabassee
HUJAK - Hrvatska udruga Java korisnika / Croatian Java User Association
 
PDF
JavaCro'15 - HTTP2 Comes to Java! - David Delabassee
HUJAK - Hrvatska udruga Java korisnika / Croatian Java User Association
 
PDF
Java EE 8 Overview (Japanese)
Logico
 
PDF
JavaCro'15 - Everything a Java EE Developer needs to know about the JavaScrip...
HUJAK - Hrvatska udruga Java korisnika / Croatian Java User Association
 
PPT
Reactive Java EE - Let Me Count the Ways!
Reza Rahman
 
PDF
Java EE 8 Adopt a JSR : JSON-P 1.1 & MVC 1.0
David Delabassee
 
PDF
JavaCro'15 - Java Certification – in theory and practice - Branko Mihaljević,...
HUJAK - Hrvatska udruga Java korisnika / Croatian Java User Association
 
PDF
WebSockets in Enterprise Applications
Pavel Bucek
 
PDF
WebSockets - Realtime em Mundo Conectado
Bruno Borges
 
PDF
Oracle Cloud: Anything as a Service
Bruno Borges
 
PPTX
HTTP/2 comes to Java. What Servlet 4.0 means to you. DevNexus 2015
Edward Burns
 
PDF
What's Coming in Java EE 8
PT.JUG
 
PPT
GlassFish BOF
glassfish
 
PDF
Supercharge your Code to get optimal Database Performance
gvenzl
 
PDF
Tweet4Beer - Beertap powered by Java goes IoT and JavaFX
Bruno Borges
 
PDF
JavaCro'15 - HUJAKing – Expansion of Java Community - Branko Mihaljević, Alek...
HUJAK - Hrvatska udruga Java korisnika / Croatian Java User Association
 
PDF
Another compilation method in java - AOT (Ahead of Time) compilation
Logico
 
Servlet 4.0 at GeekOut 2015
Edward Burns
 
MVC 1.0 / JSR 371
David Delabassee
 
Server Side JavaScript on the JVM - Project Avatar - QCon London March 2014
David Delabassee
 
JavaCro'15 - Java EE 8 - An instant snapshot - David Delabassee
HUJAK - Hrvatska udruga Java korisnika / Croatian Java User Association
 
JavaCro'15 - HTTP2 Comes to Java! - David Delabassee
HUJAK - Hrvatska udruga Java korisnika / Croatian Java User Association
 
Java EE 8 Overview (Japanese)
Logico
 
JavaCro'15 - Everything a Java EE Developer needs to know about the JavaScrip...
HUJAK - Hrvatska udruga Java korisnika / Croatian Java User Association
 
Reactive Java EE - Let Me Count the Ways!
Reza Rahman
 
Java EE 8 Adopt a JSR : JSON-P 1.1 & MVC 1.0
David Delabassee
 
JavaCro'15 - Java Certification – in theory and practice - Branko Mihaljević,...
HUJAK - Hrvatska udruga Java korisnika / Croatian Java User Association
 
WebSockets in Enterprise Applications
Pavel Bucek
 
WebSockets - Realtime em Mundo Conectado
Bruno Borges
 
Oracle Cloud: Anything as a Service
Bruno Borges
 
HTTP/2 comes to Java. What Servlet 4.0 means to you. DevNexus 2015
Edward Burns
 
What's Coming in Java EE 8
PT.JUG
 
GlassFish BOF
glassfish
 
Supercharge your Code to get optimal Database Performance
gvenzl
 
Tweet4Beer - Beertap powered by Java goes IoT and JavaFX
Bruno Borges
 
JavaCro'15 - HUJAKing – Expansion of Java Community - Branko Mihaljević, Alek...
HUJAK - Hrvatska udruga Java korisnika / Croatian Java User Association
 
Another compilation method in java - AOT (Ahead of Time) compilation
Logico
 

Similar to Java EE 7 (Lyon JUG & Alpes JUG - March 2014) (20)

PDF
Project Avatar (Lyon JUG & Alpes JUG - March 2014)
David Delabassee
 
PDF
Avatar 2.0
David Delabassee
 
PDF
JAX-RS.next
Michal Gajdos
 
PPTX
Construindo aplicações com HTML5, WebSockets, e Java EE 7
Bruno Borges
 
PDF
Server Side JavaScript on the Java Platform - David Delabassee
JAXLondon2014
 
PDF
Automated infrastructure is on the menu
jtimberman
 
PDF
Getting Started with WebSocket and Server-Sent Events using Java by Arun Gupta
Codemotion
 
PDF
HTTP/2 Comes to Java - What Servlet 4.0 Means to You
David Delabassee
 
PDF
Getting started with Websocket and Server-sent Events using Java - Arun Gupta
jaxconf
 
PDF
Tweet4Beer (atualizada): Torneira de Chopp Controlada por Java, JavaFX, IoT ...
Marco Antonio Maciel
 
PDF
Pushing JavaEE outside of the enterprise: Home Automation & IoT - David Delab...
Codemotion Tel Aviv
 
PDF
WSO2Con Asia 2014 - WSO2 AppDev Platform for the Connected Business
WSO2
 
PDF
WSO2 AppDev platform
Sagara Gunathunga
 
PPTX
REST Enabling your Oracle Database (2018 Update)
Jeff Smith
 
PDF
Leverage integration cloud_service_for_ebs_
aioughydchapter
 
PDF
GeekAustin DevOps
Matt Ray
 
PDF
Workshop KrakYourNet2016 - Web applications hacking Ruby on Rails example
Anna Klepacka
 
PDF
Kick Start your Application Development and Management Strategy
WSO2
 
PDF
Big Data Web applications for Interactive Hadoop by ENRICO BERTI at Big Data...
Big Data Spain
 
PDF
Getting Started with WebSocket and Server-Sent Events in Java
Arun Gupta
 
Project Avatar (Lyon JUG & Alpes JUG - March 2014)
David Delabassee
 
Avatar 2.0
David Delabassee
 
JAX-RS.next
Michal Gajdos
 
Construindo aplicações com HTML5, WebSockets, e Java EE 7
Bruno Borges
 
Server Side JavaScript on the Java Platform - David Delabassee
JAXLondon2014
 
Automated infrastructure is on the menu
jtimberman
 
Getting Started with WebSocket and Server-Sent Events using Java by Arun Gupta
Codemotion
 
HTTP/2 Comes to Java - What Servlet 4.0 Means to You
David Delabassee
 
Getting started with Websocket and Server-sent Events using Java - Arun Gupta
jaxconf
 
Tweet4Beer (atualizada): Torneira de Chopp Controlada por Java, JavaFX, IoT ...
Marco Antonio Maciel
 
Pushing JavaEE outside of the enterprise: Home Automation & IoT - David Delab...
Codemotion Tel Aviv
 
WSO2Con Asia 2014 - WSO2 AppDev Platform for the Connected Business
WSO2
 
WSO2 AppDev platform
Sagara Gunathunga
 
REST Enabling your Oracle Database (2018 Update)
Jeff Smith
 
Leverage integration cloud_service_for_ebs_
aioughydchapter
 
GeekAustin DevOps
Matt Ray
 
Workshop KrakYourNet2016 - Web applications hacking Ruby on Rails example
Anna Klepacka
 
Kick Start your Application Development and Management Strategy
WSO2
 
Big Data Web applications for Interactive Hadoop by ENRICO BERTI at Big Data...
Big Data Spain
 
Getting Started with WebSocket and Server-Sent Events in Java
Arun Gupta
 
Ad

More from David Delabassee (19)

PDF
JVMs in Containers - Best Practices
David Delabassee
 
PDF
JVMs in Containers
David Delabassee
 
PDF
Serverless Java Challenges & Triumphs
David Delabassee
 
PDF
Serverless Java - Challenges and Triumphs
David Delabassee
 
PDF
Randstad Docker meetup - Serverless
David Delabassee
 
PDF
Java Serverless in Action - Voxxed Banff
David Delabassee
 
PPTX
Serverless Kotlin
David Delabassee
 
PDF
REST in an Async World
David Delabassee
 
PDF
JAX-RS 2.1 Reloaded
David Delabassee
 
PDF
Java EE Next
David Delabassee
 
PDF
Java EE Next - BeJUG JavaOne Afterglow 2016
David Delabassee
 
PDF
EJB and CDI - Alignment and Strategy
David Delabassee
 
PDF
HTTP/2 Comes to Java
David Delabassee
 
PDF
Java EE 8 - What’s new on the Web front
David Delabassee
 
PDF
HTTP/2 Comes to Java
David Delabassee
 
PDF
What's coming in Java EE 8
David Delabassee
 
PDF
Java EE 8 - An instant snapshot
David Delabassee
 
PDF
Java EE 8 - An instant snapshot
David Delabassee
 
PDF
Pushing Java EE outside of the Enterprise - Home Automation
David Delabassee
 
JVMs in Containers - Best Practices
David Delabassee
 
JVMs in Containers
David Delabassee
 
Serverless Java Challenges & Triumphs
David Delabassee
 
Serverless Java - Challenges and Triumphs
David Delabassee
 
Randstad Docker meetup - Serverless
David Delabassee
 
Java Serverless in Action - Voxxed Banff
David Delabassee
 
Serverless Kotlin
David Delabassee
 
REST in an Async World
David Delabassee
 
JAX-RS 2.1 Reloaded
David Delabassee
 
Java EE Next
David Delabassee
 
Java EE Next - BeJUG JavaOne Afterglow 2016
David Delabassee
 
EJB and CDI - Alignment and Strategy
David Delabassee
 
HTTP/2 Comes to Java
David Delabassee
 
Java EE 8 - What’s new on the Web front
David Delabassee
 
HTTP/2 Comes to Java
David Delabassee
 
What's coming in Java EE 8
David Delabassee
 
Java EE 8 - An instant snapshot
David Delabassee
 
Java EE 8 - An instant snapshot
David Delabassee
 
Pushing Java EE outside of the Enterprise - Home Automation
David Delabassee
 
Ad

Recently uploaded (20)

PPTX
"Autonomy of LLM Agents: Current State and Future Prospects", Oles` Petriv
Fwdays
 
PDF
Complete JavaScript Notes: From Basics to Advanced Concepts.pdf
haydendavispro
 
PDF
SWEBOK Guide and Software Services Engineering Education
Hironori Washizaki
 
PDF
"AI Transformation: Directions and Challenges", Pavlo Shaternik
Fwdays
 
PDF
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
PDF
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 
PDF
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
PDF
Chris Elwell Woburn, MA - Passionate About IT Innovation
Chris Elwell Woburn, MA
 
PPTX
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
PDF
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
PDF
HubSpot Main Hub: A Unified Growth Platform
Jaswinder Singh
 
PDF
Building Real-Time Digital Twins with IBM Maximo & ArcGIS Indoors
Safe Software
 
PDF
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
PDF
Timothy Rottach - Ramp up on AI Use Cases, from Vector Search to AI Agents wi...
AWS Chicago
 
PPTX
UiPath Academic Alliance Educator Panels: Session 2 - Business Analyst Content
DianaGray10
 
PDF
The Builder’s Playbook - 2025 State of AI Report.pdf
jeroen339954
 
PDF
Using FME to Develop Self-Service CAD Applications for a Major UK Police Force
Safe Software
 
PPTX
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit Team
 
PDF
NewMind AI - Journal 100 Insights After The 100th Issue
NewMind AI
 
PDF
Fl Studio 24.2.2 Build 4597 Crack for Windows Free Download 2025
faizk77g
 
"Autonomy of LLM Agents: Current State and Future Prospects", Oles` Petriv
Fwdays
 
Complete JavaScript Notes: From Basics to Advanced Concepts.pdf
haydendavispro
 
SWEBOK Guide and Software Services Engineering Education
Hironori Washizaki
 
"AI Transformation: Directions and Challenges", Pavlo Shaternik
Fwdays
 
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
Chris Elwell Woburn, MA - Passionate About IT Innovation
Chris Elwell Woburn, MA
 
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
HubSpot Main Hub: A Unified Growth Platform
Jaswinder Singh
 
Building Real-Time Digital Twins with IBM Maximo & ArcGIS Indoors
Safe Software
 
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
Timothy Rottach - Ramp up on AI Use Cases, from Vector Search to AI Agents wi...
AWS Chicago
 
UiPath Academic Alliance Educator Panels: Session 2 - Business Analyst Content
DianaGray10
 
The Builder’s Playbook - 2025 State of AI Report.pdf
jeroen339954
 
Using FME to Develop Self-Service CAD Applications for a Major UK Police Force
Safe Software
 
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit Team
 
NewMind AI - Journal 100 Insights After The 100th Issue
NewMind AI
 
Fl Studio 24.2.2 Build 4597 Crack for Windows Free Download 2025
faizk77g
 

Java EE 7 (Lyon JUG & Alpes JUG - March 2014)

  • 1. What’s New in the Java EE Platform Alpes JUG - March 2014 ! David Delabassee @delabassee Software Evangelist - Oracle
  • 2. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!2 Program Agenda A look at some of the important new features of Java EE 7
  • 3. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!3 Java EE 7 Momentum ACTIVEPROJECTS 26 Active and transparent mailing lists JSRsADOPTED 22 JUGs 19 Adopt a JSR PROMOTEDBUILDS 89 GlassFish YOU 187 COMPANIES 32 EXPERTS SPECLEADS 16 ACTIVEJSRs 14
  • 4. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!4 Java EE 7 Momentum
  • 5. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!5 Java EE 7 Themes ENTERPRISE EDITION ▪ 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
  • 6. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. Java EE 7 JSRs
 New or Updated ▪ JPA 2.1 ▪ JAX-RS 2.0 ▪ EJB 3.2 ▪ JMS 2.0 ▪ Servlet 3.1 ▪ EL 3.0 ▪ JSF 2.2 ▪ CDI 1.1 ▪ Bean Validation 1.1 ▪ WebSocket 1.0 ▪ JSON 1.0 ▪ Batch Applications 1.0 ▪ Concurrency Utilities 1.0 !6
  • 7. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. Java EE 7 Maintenance Releases ▪ Common Annotations 1.2 ▪ JTA 1.2 ▪ Interceptors 1.2 ▪ Connector 1.7 ▪ JSP 2.3 ▪ JASPIC 1.2 ▪ JACC 1.4 ▪ JavaMail 1.5 ▪ Web Services 1.4 !7
  • 8. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!8 JSON Processing 1.0 ▪ API to parse and generate JSON ▪ Streaming API (javax.json.stream) – Low-level, efficient way to parse/generate JSON – Similar to StAX API in XML world ▪ Object model API (javax.json) – Simple, easy to use high-level API – Similar to DOM API in XML world
  • 9. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!9 JSON Processing 1.0 ▪ Created using – Json.createParser(…)! – Json.createParserFactory().createParser(…)! ▪ Parses JSON in streaming way from input sources Event event = parser.next(); // START_OBJECT! event = parser.next(); // KEY_NAME! event = parser.next(); // VALUE_STRING! ▪ Parser state events – START_OBJECT, END_OBJECT, START_ARRAY, END_ARRAY, KEY_NAME, VALUE_STRING, VALUE_NUMBER, … Streaming API: Parsing
  • 10. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!10 JSON Processing 1.0 {! “firstName”:“John”,“lastName”: “Smith”,“age”: 25,! “phoneNumber”: [! {“type”: “home”, “number”: “212 555-1234” },! {“type”: “fax”, “number”: “646 555-4567” }! ]! } Streaming Parser
  • 11. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!11 JSON Processing 1.0 {! “firstName”:“John”,“lastName”: “Smith”,“age”: 25,! “phoneNumber”: [! {“type”: “home”, “number”: “212 555-1234” },! {“type”: “fax”, “number”: “646 555-4567” }! ]! } Streaming Parser START_OBJECT
  • 12. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!12 JSON Processing 1.0 {! “firstName”:“John”,“lastName”: “Smith”,“age”: 25,! “phoneNumber”: [! {“type”: “home”, “number”: “212 555-1234” },! {“type”: “fax”, “number”: “646 555-4567” }! ]! } Streaming Parser KEY_NAME
  • 13. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!13 JSON Processing 1.0 {! “firstName”:“John”,“lastName”: “Smith”,“age”: 25,! “phoneNumber”: [! {“type”: “home”, “number”: “212 555-1234” },! {“type”: “fax”, “number”: “646 555-4567” }! ]! } Streaming Parser VALUE_STRING
  • 14. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!14 JSON Processing 1.0 {! “firstName”:“John”,“lastName”: “Smith”,“age”: 25,! “phoneNumber”: [! {“type”: “home”, “number”: “212 555-1234” },! {“type”: “fax”, “number”: “646 555-4567” }! ]! } Streaming Parser VALUE_NUMBER
  • 15. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!15 JSON Processing 1.0 {! “firstName”:“John”,“lastName”: “Smith”,“age”: 25,! “phoneNumber”: [! {“type”: “home”, “number”: “212 555-1234” },! {“type”: “fax”, “number”: “646 555-4567” }! ]! } Streaming Parser START_ARRAY
  • 16. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!16 JSON Processing 1.0 {! “firstName”:“John”,“lastName”: “Smith”,“age”: 25,! “phoneNumber”: [! {“type”: “home”, “number”: “212 555-1234” },! {“type”: “fax”, “number”: “646 555-4567” }! ]! } Streaming Parser END_ARRAY
  • 17. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. JSON Processing 1.0 JsonGenerator gen = Json.createGenerator…! .writeStartObject()! .write("firstName", "John") ! .write("lastName", "Smith") ! .write("age", 25) ! .writeStartArray(“phones”)! .writeStartObject()! !! .write(“type",“home") ! .write(“number”, “222…”)! .writeEnd()! .writeStartObject() …! .writeEnd()! .writeEnd()! .writeEnd();! ! Using Streaming API to generate JSON ! { “firstName”:“John”,! “lastName”:”Smith”,! “age”:25, ! “phones”:[ ! {“type”:“home”,“number”:“…”},! {“type”:“fax”,“number”:“…”} ]! } !17
  • 18. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!18 Interactive Web Sites • Flavors of Server Push • Polling • Long polling • AJAX ! ! • Complex, inefficient, wasteful
  • 19. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!19 WebSockets to the rescue ▪ Bidirectional full-duplex messaging – Over a single TCP connection ▪ IETF defined protocol: RFC 6455 ▪ Part of HTML5 ▪ W3C defined JavaScript API ▪ Adoption ▪ http://caniuse.com/websockets Bring interactivity to the Web
  • 20. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!20 WebSockets Handshake Request Http Request! GET /mychat HTTP/1.1! Host: server.example.com! Upgrade: websocket! Connection: Upgrade! Sec-WebSocket-Key: x3JJHMbDL1EzLkh9GBhXDw==! Sec-WebSocket-Protocol: megachat, chat! Sec-WebSocket-Extensions : compress, mux! Sec-WebSocket-Version: 13! Origin: http://example.com
  • 21. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!21 WebSockets Handshake Response Http Response! HTTP/1.1 101 Switching Protocols! Upgrade: websocket! Connection: Upgrade! Sec-WebSocket-Accept: HSmrc0sMlYUkAGmm5OPpG2HaGWk=! Sec-WebSocket-Protocol: chat! Sec-WebSocket-Extensions: compress, mux
  • 22. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!22 Java API for WebSocket 1.0 ▪ WebSocket Java client & server API ▪ Part of Java EE 7 ▪ Annotation-based & interface-based programming model ▪ Under consideration for Java SE 9 ▪ Reference Implementation ▪ http://tyrus.java.net ▪ Supported in GlassFish 4.0 JSR 356
  • 23. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!23 Java API for WebSocket 1.0 ▪ Establish a WebSocket connection ▪ Send messages backwards and forwards ▪ End the connection What’s the basic idea?
  • 24. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!24 Java API for WebSocket 1.0 ▪ Session – Represents the active conversation ▪ Endpoint – Intercepts websocket lifecycle events ▪ RemoteEndpoint – Represents the other end of the conversation ▪ MessageHandler – Handles incoming messages for endpoint Main API classes
  • 25. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!25 WebSocket Endpoints public class MyClient extends Endpoint {! public void onOpen(Session session, EndpointConfig ec) {! session.addMessageHandler(new MessageHandler.Whole<String>() {! public void onMessage(String payload) {! System.out.println("From the server : " + payload);! }! }! session.getBasicRemote().sendText("Hello!");! }! ! public void onClose(Session session, CloseReason closeReason) {! super.onClose(session, closeReason);! }! } Programmatic API
  • 26. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!26 WebSocket Endpoints as POJOs @ClientEndpoint! public class MyClient { ! @OnOpen! public void onOpen(Session session) {! session.getBasicRemote().sendText(“Hello”);! }! @OnMessage! public void onMessage(String payload, Session session) { ! System.out.println("From the server : " + payload);! } ! } Annotated client endpoint
  • 27. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!27 WebSocket Endpoints as POJOs @ServerEndpoint(“/chat")! public class ChatServer { !! static Set<Session> peers = Collections.synchronizedSet(…);!!! ! ! ! @OnOpen! !!! public void onOpen(Session peer) {! peers.add(peer);! }! ! @OnMessage! !!! public void onMessage (String message, Session client) { ! for (Session peer : peers) {! peer.getBasicRemote().sendObject(message);! } ! }! ! @OnClose! !!! public void onClose(Session peer) {! peers.remove(peer);! }! } Annotated server endpoint
  • 28. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!28 Java API for WebSocket 1.0 ▪ Payload ▪ Text ▪ Binary ▪ Ping-Pong ▪ Synchronous / Asynchronous ▪ Whole message / Sequence of partial messages ▪ No delivery guarantee Messaging
  • 29. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!29 Java API for WebSocket 1.0 ▪ Use Session’s RemoteEndpoint interface mySession.getBasicRemote().sendText(”Hello”); ! ▪ Return a value from @OnMessage method @OnMessage! public String echo(String incomingMessage) {! return(“Hello”);! } Sending messages
  • 30. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!30 Java API for WebSocket 1.0 Means of sending RemoteEndpoint method to use as whole string sendText(String message) as binary data sendBinary(ByteBuffer message) in string fragments sendText(String part, boolean last) in binary data fragments sendBinary(ByteBuffer part, boolean last) as a blocking stream of text Writer getSendWriter()) as a blocking stream of binary data OutputStream getSendStream() as a custom object of type T sendObject(T customObject)
  • 31. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!31 Java API for WebSocket 1.0 ▪ Annotation - @onMessage @OnMessage! public void whenGettingText(String message)…! ! ▪ Implement a MessageHandler, add it to the Session MyMessageHandler implements MessageHandler.Whole<String>! …! session.addMessageHandler( new MyMessageHandler() ); Receiving messages
  • 32. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!32 Java API for WebSocket 1.0 ▪ Encoder ▪ Object to Binary: Encoder.Binary<T>, Encoder.BinaryStream<T>! ▪ Object to Text: Encoder.Text<T>, Encoder.TextStream<T>! ▪ Decoder ▪ Text to Object: Decoder.Text<T>, Decoder.TextStream<T>! ▪ Binary to Object: Decoder.Binary<T>, Decoder.BinaryStream<T>! ▪ Lifecycle ▪ init() and destroy() methods ▪ willDecode() Custom payload
  • 33. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!33 Java API for RESTful Web Services (JAX-RS) 2.0 ▪ Client API ▪ Filters and Interceptors ▪ Asynchronous Processing ▪ Hypermedia ▪ Validation
  • 34. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!34 JAX-RS 1.1 URL url = new URL("http://. . ./atm/balance"); ! HttpURLConnection conn = (HttpURLConnection) url.openConnection();! conn.setDoInput(true); ! conn.setDoOutput(false); ! conn.setRequestMethod("GET"); ! BufferedReader br = new BufferedReader(new! !!! ! ! ! ! ! ! ! ! InputStreamReader(conn.getInputStream())); ! String line; ! while ((line = br.readLine()) != null) {    ! //. . . ! } Previous Client API
  • 35. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!35 JAX-RS 2.0 Client client = ClientFactory.newClient();! ! String name = client.target("http://.../orders/{orderId}/customer")! .resolveTemplate(“orderId”, “10”)! .request()! .get(String.class); JAX-RS 2.0 Client API
  • 36. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!36 Client client = ClientFactory.newClient();! …! WebTarget target = client.target(“http://…/orders/{orderId}/customer”)! ! ! .register(LoggingFilter.class);! ! String name = target.resolveTemplate(“orderId”, “10”)! !! !! ! ! ! .request()! !! !! ! ! ! .get(String.class); JAX-RS 2.0 JAX-RS 2.0 Client API
  • 37. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!37 JAX-RS 2.0 @Path("/")! class MyResourceClass {! ! @POST! @Consumes(MediaType.APPLICATION_FORM_URLENCODED)! public void registerUser(! @NotNull @FormParam("firstName") String firstName,! @NotNull @FormParam("lastName") String lastName,! @Email @FormParam("email") String email) {! ... }! …! } Bean Validation
  • 38. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!38 Servlet 3.1 ▪ Protocol Upgrade ▪ Non-blocking I/O ▪ Miscellaneous ▪ Security ▪ Upload ▪ … JSR 340
  • 39. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!39 Alignment and Simplification of Managed Beans ▪ CDI is core component model ▪ CDI enabled by default ▪ Expanded use of CDI Interceptors – Transactional interceptors – Method-level validation interceptors ▪ New CDI scopes: @TransactionScoped, @FlowScoped Cohesive, integrated model Java EE 7
  • 40. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!40 Managed Bean Alignment ▪ CDI injection and CDI interceptors apply to all Java EE components and related managed classes when CDI is enabled ▪ CDI is enabled by default in implicit bean archives – Use of CDI bean-defining annotations (@SessionScoped, @Dependent,…) and session beans result in implicit bean archives ▪ Library jars, EJB jars, WEB-INF/classes – beans.xml not required Expanded use of CDI
  • 41. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!41 Transactional Interceptors @Transactional(rollbackOn={SQLException.class},! dontRollbackOn={SQLWarning.class})! public class ShoppingCart {…}! …! ! @Inherited! @InterceptorBinding! @Target({TYPE, METHOD}) @Retention(RUNTIME)! public @interface Transactional {! TxType value() default TxType.REQUIRED;! Class[] rollbackOn() default {};! Class[] dontRollbackOn() default {};! } Annotations and semantics defined in JTA 1.2
  • 42. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!42 Bean Validation 1.1
 Method-level Validation @Stateless! public class OrderService {! …! @ValidOrder! public Order placeOrder(! @NotNull String productName,! @Max(10) int quantity,! @NotNull String customerName,! @Address String customerAddress) {! …! }! } Via CDI Interceptors
  • 43. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!43 Interceptor Ordering ▪ Interceptor.Priority.PLATFORM_BEFORE = 0 – Platform-defined interceptors to be executed at beginning of interceptor chain – Transactional interceptors: Interceptor.Priority.PLATFORM_BEFORE+200 ▪ Interceptor.Priority.LIBRARY_BEFORE = 1000 – Intended for use by extension libraries ▪ Interceptor.Priority.APPLICATION = 2000 – Intended for application-defined interceptors ▪ Interceptor.Priority.LIBRARY_AFTER = 3000 ▪ Interceptor.Priority.PLATFORM_AFTER = 4000 – Bean Validation defined interceptors: Interceptor.Priority.PLATFORM_AFTER+800 Well-defined priority ordering
  • 44. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!44 Resource Definition Metadata ▪ Specifies resources needed by application – Enhances configurability in Java EE 7 apps – Facilitates provisioning in cloud environments – Java EE 6 introduced DataSourceDefinition ! @DataSourceDefinition (! name=“java:app/jdbc/myDB”,! className=“oracle.jdbc.pool.OracleDataSource”,! isolationLevel=TRANSACTION_REPEATABLE_READ, initialPoolSize=5)! ! @Stateless public class MySessionBean {! @Resource(lookup=“java:app/jdbc/myDB”) DataSource my DB;! …! }
  • 45. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!45 Resource Definition Metadata ▪ Java EE 7 adds: – JMSConnectionFactoryDefinition! – JMSDestinationDefinition! – MailSessionDefinition! – ConnectionFactoryDefinition! – AdministeredObjectDefinition
  • 46. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!46 Default Resources ▪ JDBC/JPA – java:comp/DefaultDataSource! ▪ JMS – java:comp/DefaultJMSConnectionFactory! ▪ Concurrency Utilities – java:comp/DefaultManagedExecutorService! – java:comp/DefaultManagedScheduledExecutorService! – java:comp/DefaultManagedThreadFactory! – java:comp/DefaultManagedContextService Preconfigured resources for use by application
  • 47. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!47 Simplification through Pruning ▪ Process defined in Java EE 6 – Platform version N defines feature as “Proposed Optional” – Platform version N+1 determines whether to make feature Optional ▪ Optional APIs as of Java EE 7 – EJB Entity Beans (CMP, BMP, EJB QL) – JAX-RPC – JAXR – Deployment (JSR 88)
  • 48. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!48 Java Message Service 2.0 ▪ Less code, less boilerplate ▪ Fewer objects to manage ▪ Increased developer productivity ▪ “Classic API” has also been improved New JMS Simplified API targeted at ease of development
  • 49. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!49 JMS 2.0 ▪ New JMSContext interface ▪ Use of CDI injection; new TransactionScope ▪ AutoCloseable JMSContext, Connection, Session, … ▪ Use of runtime exceptions ▪ Method chaining on JMSProducer ▪ Simplified message sending Simplifications include….
  • 50. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!50 JMS 1.1 @Resource(lookup = “java:global/jms/myConnectionFactory”)! ConnectionFactory connectionFactory; ! ! @Resource(lookup = “java:global/jms/myQueue”)! Queue queue; ! ! public void sendMessage(String text) { ! try {! Connection connection = connectionFactory.createConnection();! Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);! MessageProducer messageProducer = session.createProducer(queue);! TextMessage textMessage = session.createTextMessage(text);! messageProducer.send(textMessage);! } finally {! connection.close();! } catch (JMSException ex) { … }! }! Sending a message in the JMS 1.1 “classic” API
  • 51. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!51 JMS 2.0 @Resource(lookup = “java:global/jms/myConnectionFactory”)! ConnectionFactory connectionFactory; ! ! @Resource(lookup = “java:global/jms/myQueue”)! Queue queue; ! ! public void sendMessage(String text) { ! try (JMSContext context = connectionFactory.createContext();) {! context.createProducer().send(queue, text);! } catch (JMSRuntimeException ex) {! …! }! } Sending a message using Simplified API and JMSContext
  • 52. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!52 JMS 2.0 @Inject ! @JMSConnectionFactory(“java:global/jms/myConnectionFactory”)! JMSContext context;! ! @Resource(lookup = “java:global/jms/myQueue”)! Queue queue; ! ! public void sendMessage(String text) { ! context.createProducer().send(queue, text);! } Even simpler….
  • 53. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!53 JMS 2.0 @Inject ! JMSContext context;! ! @Resource(lookup = “java:global/jms/myQueue”)! Queue queue; ! ! public void sendMessage(String text) { ! context.createProducer().send(queue, text);! } Even simpler still….
  • 54. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!54 Concurrency Utilities for Java EE 1.0 ▪ Extension of Java SE Concurrency Utilities API ▪ Provides managed objects for submitting tasks and obtaining managed threads – ManagedExecutorService! – ManagedScheduledExecutorService! – ManagedThreadFactory! – ContextService Provides asynchronous capabilities to Java EE components
  • 55. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!55 Concurrency Utilities for Java EE 1.0 public class AccountTask implements Callable {! ...! public AccountInfo call() {! // task logic! }! ...! }! ! //in calling component:! @Resource! ManagedExecutorService mes;! ...! Future<AccountInfo> acctFuture = mes.submit(new AccountTask(...));! AccountInfo accountInfo = acctFuture.get(); // Wait for the results.! ...! // Process the results! ...
  • 56. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!56 Batch Applications for the Java Platform 1.0 ▪ Designed for non-interactive, bulk-oriented and long-running tasks ▪ Sequential, parallel, and/or decision-based batch execution ▪ Processing styles – Item-oriented (“chunked”) – Task-oriented (“batchlet”)
  • 57. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!57 Batch 1.0 ▪ Job : Entire batch process – Defined through XML Job Specification Language ▪ Step : Independent, sequential phase of a job ▪ JobOperator : Interface for managing job processing ▪ JobRepository : Information about past and present jobs Key concepts Job Repository Job Operator Job Step ItemReader ItemWriter ItemProcessor
  • 58. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!58 Batch 1.0 ▪ Chunked : Item-oriented processing – ItemReader/ItemProcessor/ItemWriter pattern – Configurable checkpointing and transactions ▪ Batchlet : Task-oriented processing – Roll-your-own batch pattern – Runs to completion and exits ▪ Job can include both types of steps Job steps
  • 59. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!59 Batch Applications ▪ Read and Process one item ▪ Do the above ‘n’ times (‘commit interval’) ▪ Write the ‘n’ processed items ▪ Commit the transaction Primary Processing Style
  • 60. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!60 Batch 1.0 <job id="myJob" xmlns="http://xmlns.jcp.org/xml/ns/javaee" version="1.0">! <step id="step1" next="step2">! <chunk item-count="3">! <reader ref="myItemReader"></reader> ! <processor ref="myItemProcessor"></processor>! <writer ref="myItemWriter"></writer> ! </chunk>!! </step>! <step id="step2" next=“step3”>! <batchlet ref="myBatchlet"/>! </step>! <step id="step3" >! <chunk item-count="3">! <reader ref="myOtherItemReader"></reader> ! <processor ref="myOtherItemProcessor"></processor>! <writer ref="myOtherItemWriter"></writer> ! </chunk>!! </step>! </job> Job specification language
  • 61. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!61 Batch 1.0 <step id=”sendStatements”>! <chunk item-count=“3”>
 <reader ref=”accountReader”/>! <processor ref=”accountProcessor”/>
 <writer ref=”myWriter”/>! </step> …implements ItemReader {
 public Object readItem() {
 // read account using JPA } …implements ItemProcessor {! Public Object processItems(Object account) {
 // read Account, return Statement! }! …implements ItemWriter {! public void writeItems(List accounts) {
 // use JavaMail to send email or save on disk! }!
  • 62. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!62 Batch 1.0 <step id=”transferFile”>! <batchlet ref=“MyFileTransfer” />! </step> @Dependent! @Named("MyFileTransfer")! public class MyBatchlet implements javax.batch.api.chunk.Batchlet {! @Inject! private JobContext jobCtx;!! @Override! public void process() throws Exception {! String fName = jobCtx.getProperties().getProperty("out_file");! // transfer file! }! }!
  • 63. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!63 Batch 1.0 Interface Abstract Classes JobListener AbstractJobListener StepListener AbstractStepListener ChunkListener AbstractChunkListener ItemRead/Write/ProcessListener AbstractItemRead/Write/ProcessListener SkipRead/Write/ProcessListener AbstractSkipRead/Write/ProcessListener RetryRead/Write/ProcessListener AbstractRetryRead/Write/ProcessListener Listeners
  • 64. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!64 Batch 1.0 JobOperator private long startNewBatchJob() throws Exception { ! ! ! JobOperator jobOperator = BatchRuntime.getJobOperator(); ! ! ! Properties props = new Properties(); ! ! ! props.setProperty(”someInputFileName", someInputFileName); ! ! ! return jobOperator.start(JOB_NAME, props); ! }
  • 65. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!65 And more… ▪ Servlet 3.1 ▪ JPA 2.1 ▪ JSF 2.2 ▪ EJB 3.2 ▪ EL 3.0 ▪ JCA 1.7 ▪ …
  • 66. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!66 Java EE 7 Summary ENTERPRISE EDITION ▪ 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
  • 67. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!67 Transparency in JSR processes ▪ java.net used for all Oracle-led JSRs – http://java.net/projects/javaee-spec/pages/Home ▪ Publicly viewable Expert Group mailing archives ▪ Users observer lists get copies of all Expert Group emails ▪ Public download areas, JIRAs ▪ Wikis, source repositories, etc. at the group discretion ▪ Commitment to JCP 2.8/2.9 processes All Java EE JSRs run with high level of transparency
  • 68. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!68 DOWNLOAD Java EE 7 SDK oracle.com/javaee ! GlassFish 4.0 Full Platform or Web Profile glassfish.org
  • 69. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!69 WebLogic Server 12.1.3 WebLogic Server 12.1.3 Clients HTML5 clients ADF Mobile Proxies HTTP/S, JSON/XML WebSocket, Server-Sent Events, Long polling OTD Apache OHS Web Sockets (JSR 356) TopLink Data Services Server-Sent Events JAX-RS 2.0 Avatar (post-GA) HTML5client emulation JPA Change
 Notification Database • Server-Sent Events • JAX-RS 2.0 • WebSocket – JSR 356 • JPA 2.1, JSON-P • WebSocket Client Emulation • Avatar • Maven improvements • Classloader Analysis Tool updates
  • 70. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!70 Program Agenda Java EE 8 and beyond
  • 71. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!71 Java EE 8 ▪ New JSRs ▪ JCACHE (JSR 107) ▪ Data Grid API (JSR 347) ▪ State Management API (JSR 350) ▪ Identity API (JSR 351) ▪ Java API for JSON Binding ▪ Java EE Configuration ▪ … ▪ Profiles & Pruning Ideas… just ideas!
  • 72. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!72 Java EE 8 ▪ HTML 5 ▪ Server-sent events? ▪ JavaScript on the server? ▪ Something else? ▪ User Interface ▪ MVC? ▪ Client API for TSA? ▪ Templating? Facelet? Ideas (cont.)
  • 73. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!73 Java EE 8 ▪ CDI ▪ NoSQL ? ▪ Cloud ▪ PaaS, SaaS, Multi-tenancy ? ▪ Logging ▪ Security ▪ Testability ▪ Deployment, Management, Monitoring ▪ ??? Ideas (cont.)
  • 74. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!74 https://glassfish.org/survey Java EE 8 Survey
  • 75. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!75 Merci!
  • 76. Copyright © 2012, Oracle and/or its affiliates. All rights reserved.Copyright © 2014, Oracle and/or its affiliates. All rights reserved.Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12!76 Graphic Section Divider