9,000,000
DEVELOPERS
DEPLOYING TO JAVA
18 COMPLIANT
APPLICATION SERVERS
Java EE 7 Platform
Jun 12, 2013
Java EE 7 Themes
ENTERPRISE EDITION
MEETING
ENTERPRISE
DEMANDS
DEVELOPER
PRODUCTIVITY
Java EE 7
WebSockets
JSON
Servlet 3.1 NIO
REST
Batch
Concurrency
Simplified JMS
Lifecycle methods
Packaging and Deployment
@ServerEndpoint(/chat)
publicclassChatServer{
@OnMessage
publicvoidchat(Stringm){
...
}
}
Independent
sequential
phase of job
Chunk
Context Propagation
15Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Application Server
Specific Resources
Boilerplate Code
Exception Handling
Servlet 3.1
Non-blocking I/O
Protocol Upgrade
Security Enhancements
<denyuncoveredhttpmethods>: Deny request to HTTP methods
Servlet 3.1
Non-blocking I/O Traditional
publicclassTestServletextendsHttpServlet
protectedvoiddoGet(HttpServletRequestrequest,
HttpServletResponseresponse)
throwsIOException,ServletException{
ServletInputStreaminput=request.getInputStream();
byte[]b=newbyte[1024];
intlen=1;
while((len=input.read(b))!=1){
...
}
}
}
27Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Servlet 3.1
Non-blocking I/O: doGet
AsyncContextcontext=request.startAsync();
ServletInputStreaminput=request.getInputStream();
input.setReadListener(
newMyReadListener(input,context));
Servlet 3.1
Non-blocking read
@Override
publicvoidonDataAvailable(){
try{
StringBuildersb=newStringBuilder();
intlen=1;
byteb[]=newbyte[1024];
while(input.isReady()&&(len=input.read(b))!=1){
Stringdata=newString(b,0,len);
System.out.println(">"+data);
}
}catch(IOExceptionex){
...
}
}
...
29Copyright 2012, Oracle and/or its affiliates. All rights reserved.
beans
@TransactionScoped: CDI scope for bean instances scoped to the
active JTA transaction
Java EE 7
JSF 2.2,
JSP 2.3,
EL 3.0
Web
Fragments
JAX-RS 2.0,
JAX-WS 2.2
A
N
I
F
CDI
Extensions
Servlet 3.1
CDI 1.1
Interceptors
1.2, JTA 1.2
Common
Annotations 1.1
JMS 2.0
WebSocket
1.0
Concurrency 1.0
EJB 3.2
JPA 2.1
!
L
JSON 1.0
JCA 1.7
Batch 1.0
Bean
Bean Validation
Validation 1.1
1.1
Java EE 7 JSRs
DOWNLOAD
Java EE 7 SDK
oracle.com/javaee
GlassFish 4.0
Full Platform or Web Profile
glassfish.org
Java EE 7 Implementation
4.0
download.java.net/glassfish/4.0/promoted/
34Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Caching
JSON-B
HTML5++
Modularity
Java EE 7
State
Management
NoSQL
PaaS
Cloud
Adopt-a-JSR
Participating JUGs
Call to Action
Specs: javaee-spec.java.net
Implementation: glassfish.org
Blog: blogs.oracle.com/theaquarium
Twitter: @glassfish
NetBeans: wiki.netbeans.org/JavaEE7