SlideShare a Scribd company logo
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.1
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.2
The Java EE 7 Platform
Productivity++ and HTML5
Arun Gupta
Java EE & GlassFish Guy
blogs.oracle.com/arungupta
@arungupta
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.3
Java: Broadest Industry Adoption
9,000,000
JAVA DEVELOPERS
DEPLOYING TO 18 COMPLIANT APPLICATION SERVERS
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.4
Java EE 7 Platform
Jun 12, 2013
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.5
Java EE 7 Themes
 Batch
 Concurrency
 Simplified JMS
 More annotated POJOs
 Less boilerplate code
 Cohesive integrated
platform
DEVELOPER
PRODUCTIVITY
 WebSockets
 JSON
 Servlet 3.1 NIO
 REST
MEETING
ENTERPRISE
DEMANDS
Java EE 7
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.6
Top Ten Features in Java EE 7
1. WebSocket client/server endpoints
2. Batch Applications
3. JSON Processing
4. Concurrency Utilities
5. Simplified JMS API
6. @Transactional and @TransactionScoped
7. JAX-RS Client API
8. Default Resources
9. More annotated POJOs
10. Faces Flow
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.7
Java API for WebSocket 1.0
 Server and Client WebSocket Endpoint
– Annotated: @ServerEndpoint, @ClientEndpoint
– Programmatic: Endpoint
 Lifecycle methods
 Packaging and Deployment
@ServerEndpoint(“/chat”)
public class ChatServer {
@OnMessage
public void chat(String m) {
. . .
}
}
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.8
Java API for WebSocket 1.0
@ServerEndpoint("/chat")
public class ChatBean {
static Set<Session> peers = Collections.synchronizedSet(…);
@OnOpen
public void onOpen(Session peer) {
peers.add(peer);
}
@OnClose
public void onClose(Session peer) {
peers.remove(peer);
}
. . .
Chat Server
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.9
Java API for WebSocket 1.0
. . .
@OnMessage
public void message(String message) {
for (Session peer : peers) {
peer.getRemote().sendObject(message);
}
}
}
Chat Server (contd.)
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.10
JSON Processing 1.0
 API to parse and generate JSON
 Streaming API
– Low-level, efficient way to parse/generate JSON
– Similar to StAX API in XML world
 Object Model API
– Simple, easy to use high-level API
– Similar to DOM API in XML world
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.11
{
"firstName": "John", "lastName": "Smith", "age": 25,
"phoneNumber": [
{ "type": "home", "number": "212 555-1234" },
{ "type": "fax", "number": "646 555-4567" }
]
}
JsonParser p = Json.createParser(…);
JsonParser.Event event = p.next(); // START_OBJECT
event = p.next(); // KEY_NAME
event = p.next(); // VALUE_STRING
String name = p.getString(); // "John”
Java API for JSON Processing 1.0
Streaming API
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.12
Batch Applications for Java Platform 1.0
 Suited for non-interactive, bulk-oriented, and long-running tasks
 Batch execution: sequential, parallel, decision-based
 Processing Styles
– Item-oriented: Chunked (primary)
– Task-oriented: Batchlet
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.13
Batch Applications 1.0
Concepts
Metadata for jobs
Manage
batch
process
Batch
process
Independent
sequential
phase of job
Chunk
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.14
<step id=”sendStatements”>
<chunk item-count=“3”>
<reader ref=”accountReader”/>
<processor ref=”accountProcessor”/>
<writer ref=”emailWriter”/>
</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
}
Batch Applications 1.0
Chunked Job Specification
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.15
Concurrency Utilities for Java EE 1.0
 Extension of Java SE Concurrency Utilities API
 Provide asynchronous capabilities to Java EE application components
 Provides 4 types of managed objects
– ManagedExecutorService
– ManagedScheduledExecutorService
– ManagedThreadFactory
– ContextService
 Context Propagation
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.16
Concurrency Utilities for Java EE 1.0
public class TestServlet extends HttpPServlet {
@Resource(name=“java:comp/DefaultManagedExecutorService”)
ManagedExecutorService executor;
Future future = executor.submit(new MyTask());
class MyTask implements Runnable {
public void run() {
. . . // task logic
}
}
}
Submit Tasks to ManagedExecutorService using JNDI
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.17
Java Message Service 2.0
 New JMSContext interface
 AutoCloseable JMSContext, Connection, Session, …
 Use of runtime exceptions
 Method chaining on JMSProducer
 Simplified message sending
Get More from Less
Java EE 7
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.18
@Resource(lookup = "myConnectionFactory”)
ConnectionFactory connectionFactory;
@Resource(lookup = "myQueue”)
Queue myQueue;
public void sendMessage (String payload) {
Connection connection = null;
try {
connection = connectionFactory.createConnection();
Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
MessageProducer messageProducer = session.createProducer(myQueue);
TextMessage textMessage = session.createTextMessage(payload);
messageProducer.send(textMessage);
} catch (JMSException ex) {
//. . .
} finally {
if (connection != null) {
try {
connection.close();
} catch (JMSException ex) {
//. . .
}
}
}
}
Application Server
Specific Resources
Boilerplate Code
Exception Handling
Java Message Service 2.0
Sending a Message using JMS 1.1
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.19
Java Message Service 2.0
@Inject
JMSContext context;
@Resource(lookup = "java:global/jms/demoQueue”)
Queue demoQueue;
public void sendMessage(String payload) {
context.createProducer().send(demoQueue, payload);
}
Sending a Message
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.20
Java API for RESTful Web Services 2.0
 Client API
 Message Filters and Entity Interceptors
 Asynchronous Processing – Server and Client
 Common Configuration
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.21
Java API for RESTful Web Services 2.0
// Get instance of Client
Client client = ClientBuilder.newClient();
// Get customer name for the shipped products
String name = client.target(“../orders/{orderId}/customer”)
.resolveTemplate(”orderId", ”10”)
.queryParam(”shipped", ”true”)
.request()
.get(String.class);
Client API
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.22
Contexts and Dependency Injection 1.1
 Automatic enablement for beans with scope annotation and EJBs
– “beans.xml” is optional
 Bean discovery mode
– all: All types
– annotated: Types with bean defining annotation
– none: Disable CDI
 @Vetoed for programmatic disablement of classes
 Global ordering/priority of interceptors and decorators
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.23
Bean Validation 1.1
 Alignment with Dependency Injection
 Method-level validation
– Constraints on parameters and return values
– Check pre-/post-conditions
 Integration with JAX-RS
Java EE 7
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.24
Built-in
Custom
@Future
public Date getAppointment() {
//. . .
}
public void placeOrder(
@NotNull String productName,
@NotNull @Max(“10”) Integer quantity,
@Customer String customer) {
//. . .
}
Bean Validation 1.1
Method Parameter and Result Validation
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.25
Java Persistence API 2.1
 Schema Generation
– javax.persistence.schema-generation.* properties
 Unsynchronized Persistence Contexts
 Bulk update/delete using Criteria
 User-defined functions using FUNCTION
 Stored Procedure Query
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.26
Servlet 3.1
 Non-blocking I/O
 Protocol Upgrade
 Security Enhancements
– <deny-uncovered-http-methods>: Deny request to HTTP methods
not explicitly covered
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.27
Servlet 3.1
public class TestServlet extends HttpServlet
protected void doGet(HttpServletRequest request,
HttpServletResponse response)
throws IOException, ServletException {
ServletInputStream input = request.getInputStream();
byte[] b = new byte[1024];
int len = -1;
while ((len = input.read(b)) != -1) {
. . .
}
}
}
Non-blocking I/O Traditional
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.28
Servlet 3.1
AsyncContext context = request.startAsync();
ServletInputStream input = request.getInputStream();
input.setReadListener(
new MyReadListener(input, context));
Non-blocking I/O: doGet
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.29
Servlet 3.1
@Override
public void onDataAvailable() {
try {
StringBuilder sb = new StringBuilder();
int len = -1;
byte b[] = new byte[1024];
while (input.isReady() && (len = input.read(b)) != -1) {
String data = new String(b, 0, len);
System.out.println("--> " + data);
}
} catch (IOException ex) {
. . .
}
}
. . .
Non-blocking read
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.30
JavaServer Faces 2.2
 Faces Flow
 Resource Library Contracts
 HTML5 Friendly Markup Support
– Pass through attributes and elements
 Cross Site Request Forgery Protection
 Loading Facelets via ResourceHandler
 h:inputFile: New File Upload Component
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.31
Java Transaction API 1.2
 @Transactional: Define transaction boundaries on CDI managed
beans
 @TransactionScoped: CDI scope for bean instances scoped to the
active JTA transaction
Java EE 7
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.32
EJB 3.2
Servlet 3.1
CDI
Extensions
BeanValidation1.1
Batch 1.0
Web
Fragments
Java EE 7 JSRs
JCA 1.7JMS 2.0JPA 2.1
Managed Beans 1.0
Concurrency 1.0
Common
Annotations 1.1
Interceptors
1.2, JTA 1.2
CDI 1.1
JSF 2.2,
JSP 2.3,
EL 3.0
JAX-RS 2.0,
JAX-WS 2.2
JSON 1.0
WebSocket
1.0
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.33
DOWNLOAD
Java EE 7 SDK
oracle.com/javaee
GlassFish 4.0
Full Platform or Web Profile
glassfish.org
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.34
4.0
Java EE 7 Implementation
download.java.net/glassfish/4.0/promoted/
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.35
Java EE 8 and Beyond
Java EE 7
State
Management
PaaS
NoSQL
JSON-B
Modularity
HTML5++
Caching
Cloud
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.36
Adopt-a-JSR
Participating JUGs
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.37
Call to Action
 Specs: javaee-spec.java.net
 Implementation: glassfish.org
 Blog: blogs.oracle.com/theaquarium
 Twitter: @glassfish
 NetBeans: wiki.netbeans.org/JavaEE7
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.38
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.39
The preceding material 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.
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.40

More Related Content

What's hot

2015 JavaOne LAD JSF 2.3 & MVC 1.0
2015 JavaOne LAD JSF 2.3 & MVC 1.02015 JavaOne LAD JSF 2.3 & MVC 1.0
2015 JavaOne LAD JSF 2.3 & MVC 1.0
mnriem
 
Java EE Introduction
Java EE IntroductionJava EE Introduction
Java EE Introduction
ejlp12
 
The Java EE 7 Platform: Productivity &amp; HTML5 at San Francisco JUG
The Java EE 7 Platform: Productivity &amp; HTML5 at San Francisco JUGThe Java EE 7 Platform: Productivity &amp; HTML5 at San Francisco JUG
The Java EE 7 Platform: Productivity &amp; HTML5 at San Francisco JUG
Arun Gupta
 
As novidades do Java EE 7: do HTML5 ao JMS 2.0
As novidades do Java EE 7: do HTML5 ao JMS 2.0As novidades do Java EE 7: do HTML5 ao JMS 2.0
As novidades do Java EE 7: do HTML5 ao JMS 2.0
Bruno Borges
 
Java EE Revisits GoF Design Patterns
Java EE Revisits GoF Design PatternsJava EE Revisits GoF Design Patterns
Java EE Revisits GoF Design Patterns
Murat Yener
 
Java EE7 Demystified
Java EE7 DemystifiedJava EE7 Demystified
Java EE7 Demystified
Ankara JUG
 
Java EE7 in action
Java EE7 in actionJava EE7 in action
Java EE7 in action
Ankara JUG
 
JEE Course - JEE Overview
JEE Course - JEE  OverviewJEE Course - JEE  Overview
JEE Course - JEE Overview
odedns
 
GlassFish BOF
GlassFish BOFGlassFish BOF
GlassFish BOF
glassfish
 
What's New in Java 8
What's New in Java 8What's New in Java 8
What's New in Java 8
javafxpert
 
Have You Seen Java EE Lately?
Have You Seen Java EE Lately?Have You Seen Java EE Lately?
Have You Seen Java EE Lately?
Reza Rahman
 
50 New Features of Java EE 7 in 50 minutes
50 New Features of Java EE 7 in 50 minutes50 New Features of Java EE 7 in 50 minutes
50 New Features of Java EE 7 in 50 minutes
Arun Gupta
 
Mobicents JSLEE progress and roadmap - Mobicents Summit 2011
Mobicents JSLEE progress and roadmap - Mobicents Summit 2011Mobicents JSLEE progress and roadmap - Mobicents Summit 2011
Mobicents JSLEE progress and roadmap - Mobicents Summit 2011telestax
 
Android and the Seven Dwarfs from Devox'15
Android and the Seven Dwarfs from Devox'15Android and the Seven Dwarfs from Devox'15
Android and the Seven Dwarfs from Devox'15
Murat Yener
 
Move from J2EE to Java EE
Move from J2EE to Java EEMove from J2EE to Java EE
Move from J2EE to Java EE
Hirofumi Iwasaki
 
J2EE - JSP-Servlet- Container - Components
J2EE - JSP-Servlet- Container - ComponentsJ2EE - JSP-Servlet- Container - Components
J2EE - JSP-Servlet- Container - Components
Kaml Sah
 
Java EE 8 Recipes
Java EE 8 RecipesJava EE 8 Recipes
Java EE 8 Recipes
Josh Juneau
 
The Java EE 7 Platform: Productivity++ & Embracing HTML5
The Java EE 7 Platform: Productivity++ & Embracing HTML5The Java EE 7 Platform: Productivity++ & Embracing HTML5
The Java EE 7 Platform: Productivity++ & Embracing HTML5
Arun Gupta
 

What's hot (18)

2015 JavaOne LAD JSF 2.3 & MVC 1.0
2015 JavaOne LAD JSF 2.3 & MVC 1.02015 JavaOne LAD JSF 2.3 & MVC 1.0
2015 JavaOne LAD JSF 2.3 & MVC 1.0
 
Java EE Introduction
Java EE IntroductionJava EE Introduction
Java EE Introduction
 
The Java EE 7 Platform: Productivity &amp; HTML5 at San Francisco JUG
The Java EE 7 Platform: Productivity &amp; HTML5 at San Francisco JUGThe Java EE 7 Platform: Productivity &amp; HTML5 at San Francisco JUG
The Java EE 7 Platform: Productivity &amp; HTML5 at San Francisco JUG
 
As novidades do Java EE 7: do HTML5 ao JMS 2.0
As novidades do Java EE 7: do HTML5 ao JMS 2.0As novidades do Java EE 7: do HTML5 ao JMS 2.0
As novidades do Java EE 7: do HTML5 ao JMS 2.0
 
Java EE Revisits GoF Design Patterns
Java EE Revisits GoF Design PatternsJava EE Revisits GoF Design Patterns
Java EE Revisits GoF Design Patterns
 
Java EE7 Demystified
Java EE7 DemystifiedJava EE7 Demystified
Java EE7 Demystified
 
Java EE7 in action
Java EE7 in actionJava EE7 in action
Java EE7 in action
 
JEE Course - JEE Overview
JEE Course - JEE  OverviewJEE Course - JEE  Overview
JEE Course - JEE Overview
 
GlassFish BOF
GlassFish BOFGlassFish BOF
GlassFish BOF
 
What's New in Java 8
What's New in Java 8What's New in Java 8
What's New in Java 8
 
Have You Seen Java EE Lately?
Have You Seen Java EE Lately?Have You Seen Java EE Lately?
Have You Seen Java EE Lately?
 
50 New Features of Java EE 7 in 50 minutes
50 New Features of Java EE 7 in 50 minutes50 New Features of Java EE 7 in 50 minutes
50 New Features of Java EE 7 in 50 minutes
 
Mobicents JSLEE progress and roadmap - Mobicents Summit 2011
Mobicents JSLEE progress and roadmap - Mobicents Summit 2011Mobicents JSLEE progress and roadmap - Mobicents Summit 2011
Mobicents JSLEE progress and roadmap - Mobicents Summit 2011
 
Android and the Seven Dwarfs from Devox'15
Android and the Seven Dwarfs from Devox'15Android and the Seven Dwarfs from Devox'15
Android and the Seven Dwarfs from Devox'15
 
Move from J2EE to Java EE
Move from J2EE to Java EEMove from J2EE to Java EE
Move from J2EE to Java EE
 
J2EE - JSP-Servlet- Container - Components
J2EE - JSP-Servlet- Container - ComponentsJ2EE - JSP-Servlet- Container - Components
J2EE - JSP-Servlet- Container - Components
 
Java EE 8 Recipes
Java EE 8 RecipesJava EE 8 Recipes
Java EE 8 Recipes
 
The Java EE 7 Platform: Productivity++ & Embracing HTML5
The Java EE 7 Platform: Productivity++ & Embracing HTML5The Java EE 7 Platform: Productivity++ & Embracing HTML5
The Java EE 7 Platform: Productivity++ & Embracing HTML5
 

Similar to Java ee7 1hour

Java EE 7 Platform: Boosting Productivity and Embracing HTML5 - Arun Gupta (R...
Java EE 7 Platform: Boosting Productivity and Embracing HTML5 - Arun Gupta (R...Java EE 7 Platform: Boosting Productivity and Embracing HTML5 - Arun Gupta (R...
Java EE 7 Platform: Boosting Productivity and Embracing HTML5 - Arun Gupta (R...
jaxLondonConference
 
Java EE7
Java EE7Java EE7
Java EE7
Jay Lee
 
Presente e Futuro: Java EE.next()
Presente e Futuro: Java EE.next()Presente e Futuro: Java EE.next()
Presente e Futuro: Java EE.next()
Bruno Borges
 
Getting Started with Java EE 7
Getting Started with Java EE 7Getting Started with Java EE 7
Getting Started with Java EE 7
Arun Gupta
 
The Java EE 7 Platform: Productivity & HTML5 at JavaOne Latin America 2012
The Java EE 7 Platform: Productivity & HTML5 at JavaOne Latin America 2012The Java EE 7 Platform: Productivity & HTML5 at JavaOne Latin America 2012
The Java EE 7 Platform: Productivity & HTML5 at JavaOne Latin America 2012
Arun Gupta
 
112815 java ee8_davidd
112815 java ee8_davidd112815 java ee8_davidd
112815 java ee8_davidd
Takashi Ito
 
Java EE 7 for WebLogic 12c Developers
Java EE 7 for WebLogic 12c DevelopersJava EE 7 for WebLogic 12c Developers
Java EE 7 for WebLogic 12c Developers
Bruno Borges
 
JAX-RS 2.0: New and Noteworthy in RESTful Web services API at JAX London
JAX-RS 2.0: New and Noteworthy in RESTful Web services API at JAX LondonJAX-RS 2.0: New and Noteworthy in RESTful Web services API at JAX London
JAX-RS 2.0: New and Noteworthy in RESTful Web services API at JAX London
Arun Gupta
 
JAX-RS 2.0: RESTful Web Services
JAX-RS 2.0: RESTful Web ServicesJAX-RS 2.0: RESTful Web Services
JAX-RS 2.0: RESTful Web Services
Arun Gupta
 
What's new in Java Message Service 2?
What's new in Java Message Service 2?What's new in Java Message Service 2?
What's new in Java Message Service 2?
Sivakumar Thyagarajan
 
Batch Applications for the Java Platform
Batch Applications for the Java PlatformBatch Applications for the Java Platform
Batch Applications for the Java Platform
Sivakumar Thyagarajan
 
JAX-RS 2.0: New and Noteworthy in RESTful Web Services API - Arun Gupta
JAX-RS 2.0: New and Noteworthy in RESTful Web Services API - Arun GuptaJAX-RS 2.0: New and Noteworthy in RESTful Web Services API - Arun Gupta
JAX-RS 2.0: New and Noteworthy in RESTful Web Services API - Arun Gupta
JAX London
 
Red Hat and Oracle: Delivering on the Promise of Interoperability in Java EE 7
Red Hat and Oracle: Delivering on the Promise of Interoperability in Java EE 7Red Hat and Oracle: Delivering on the Promise of Interoperability in Java EE 7
Red Hat and Oracle: Delivering on the Promise of Interoperability in Java EE 7
Max Andersen
 
GlassFish REST Administration Backend at JavaOne India 2012
GlassFish REST Administration Backend at JavaOne India 2012GlassFish REST Administration Backend at JavaOne India 2012
GlassFish REST Administration Backend at JavaOne India 2012
Arun Gupta
 
JavaOne San Francisco 2013 - Servlet 3.1 (JSR 340)
JavaOne San Francisco 2013 - Servlet 3.1 (JSR 340)JavaOne San Francisco 2013 - Servlet 3.1 (JSR 340)
JavaOne San Francisco 2013 - Servlet 3.1 (JSR 340)
Shing Wai Chan
 
'New JMS features in GlassFish 4.0' by Nigel Deakin
'New JMS features in GlassFish 4.0' by Nigel Deakin'New JMS features in GlassFish 4.0' by Nigel Deakin
'New JMS features in GlassFish 4.0' by Nigel Deakin
C2B2 Consulting
 
JavaOne - 10 Tips for Java EE 7 with PrimeFaces
JavaOne - 10 Tips for Java EE 7 with PrimeFacesJavaOne - 10 Tips for Java EE 7 with PrimeFaces
JavaOne - 10 Tips for Java EE 7 with PrimeFaces
Mert Çalışkan
 
Aplicações HTML5 com Java EE 7 e NetBeans
Aplicações HTML5 com Java EE 7 e NetBeansAplicações HTML5 com Java EE 7 e NetBeans
Aplicações HTML5 com Java EE 7 e NetBeans
Bruno Borges
 
GlassFish REST Administration Backend
GlassFish REST Administration BackendGlassFish REST Administration Backend
GlassFish REST Administration Backend
Arun Gupta
 

Similar to Java ee7 1hour (20)

Java EE 7 Platform: Boosting Productivity and Embracing HTML5 - Arun Gupta (R...
Java EE 7 Platform: Boosting Productivity and Embracing HTML5 - Arun Gupta (R...Java EE 7 Platform: Boosting Productivity and Embracing HTML5 - Arun Gupta (R...
Java EE 7 Platform: Boosting Productivity and Embracing HTML5 - Arun Gupta (R...
 
Java EE7
Java EE7Java EE7
Java EE7
 
Presente e Futuro: Java EE.next()
Presente e Futuro: Java EE.next()Presente e Futuro: Java EE.next()
Presente e Futuro: Java EE.next()
 
Getting Started with Java EE 7
Getting Started with Java EE 7Getting Started with Java EE 7
Getting Started with Java EE 7
 
The Java EE 7 Platform: Productivity & HTML5 at JavaOne Latin America 2012
The Java EE 7 Platform: Productivity & HTML5 at JavaOne Latin America 2012The Java EE 7 Platform: Productivity & HTML5 at JavaOne Latin America 2012
The Java EE 7 Platform: Productivity & HTML5 at JavaOne Latin America 2012
 
112815 java ee8_davidd
112815 java ee8_davidd112815 java ee8_davidd
112815 java ee8_davidd
 
Java EE 7 for WebLogic 12c Developers
Java EE 7 for WebLogic 12c DevelopersJava EE 7 for WebLogic 12c Developers
Java EE 7 for WebLogic 12c Developers
 
JAX-RS 2.0: New and Noteworthy in RESTful Web services API at JAX London
JAX-RS 2.0: New and Noteworthy in RESTful Web services API at JAX LondonJAX-RS 2.0: New and Noteworthy in RESTful Web services API at JAX London
JAX-RS 2.0: New and Noteworthy in RESTful Web services API at JAX London
 
JAX-RS 2.0: RESTful Web Services
JAX-RS 2.0: RESTful Web ServicesJAX-RS 2.0: RESTful Web Services
JAX-RS 2.0: RESTful Web Services
 
What's new in Java Message Service 2?
What's new in Java Message Service 2?What's new in Java Message Service 2?
What's new in Java Message Service 2?
 
Batch Applications for the Java Platform
Batch Applications for the Java PlatformBatch Applications for the Java Platform
Batch Applications for the Java Platform
 
JAX-RS 2.0: New and Noteworthy in RESTful Web Services API - Arun Gupta
JAX-RS 2.0: New and Noteworthy in RESTful Web Services API - Arun GuptaJAX-RS 2.0: New and Noteworthy in RESTful Web Services API - Arun Gupta
JAX-RS 2.0: New and Noteworthy in RESTful Web Services API - Arun Gupta
 
Red Hat and Oracle: Delivering on the Promise of Interoperability in Java EE 7
Red Hat and Oracle: Delivering on the Promise of Interoperability in Java EE 7Red Hat and Oracle: Delivering on the Promise of Interoperability in Java EE 7
Red Hat and Oracle: Delivering on the Promise of Interoperability in Java EE 7
 
GlassFish REST Administration Backend at JavaOne India 2012
GlassFish REST Administration Backend at JavaOne India 2012GlassFish REST Administration Backend at JavaOne India 2012
GlassFish REST Administration Backend at JavaOne India 2012
 
JavaOne San Francisco 2013 - Servlet 3.1 (JSR 340)
JavaOne San Francisco 2013 - Servlet 3.1 (JSR 340)JavaOne San Francisco 2013 - Servlet 3.1 (JSR 340)
JavaOne San Francisco 2013 - Servlet 3.1 (JSR 340)
 
JEE5 New Features
JEE5 New FeaturesJEE5 New Features
JEE5 New Features
 
'New JMS features in GlassFish 4.0' by Nigel Deakin
'New JMS features in GlassFish 4.0' by Nigel Deakin'New JMS features in GlassFish 4.0' by Nigel Deakin
'New JMS features in GlassFish 4.0' by Nigel Deakin
 
JavaOne - 10 Tips for Java EE 7 with PrimeFaces
JavaOne - 10 Tips for Java EE 7 with PrimeFacesJavaOne - 10 Tips for Java EE 7 with PrimeFaces
JavaOne - 10 Tips for Java EE 7 with PrimeFaces
 
Aplicações HTML5 com Java EE 7 e NetBeans
Aplicações HTML5 com Java EE 7 e NetBeansAplicações HTML5 com Java EE 7 e NetBeans
Aplicações HTML5 com Java EE 7 e NetBeans
 
GlassFish REST Administration Backend
GlassFish REST Administration BackendGlassFish REST Administration Backend
GlassFish REST Administration Backend
 

Recently uploaded

Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Product School
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Product School
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Product School
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
DianaGray10
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
Prayukth K V
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
91mobiles
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
ThousandEyes
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Inflectra
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
Product School
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
Alison B. Lowndes
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
UiPathCommunity
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
Product School
 

Recently uploaded (20)

Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
 

Java ee7 1hour

  • 1. Copyright © 2012, Oracle and/or its affiliates. All rights reserved.1
  • 2. Copyright © 2012, Oracle and/or its affiliates. All rights reserved.2 The Java EE 7 Platform Productivity++ and HTML5 Arun Gupta Java EE & GlassFish Guy blogs.oracle.com/arungupta @arungupta
  • 3. Copyright © 2012, Oracle and/or its affiliates. All rights reserved.3 Java: Broadest Industry Adoption 9,000,000 JAVA DEVELOPERS DEPLOYING TO 18 COMPLIANT APPLICATION SERVERS
  • 4. Copyright © 2012, Oracle and/or its affiliates. All rights reserved.4 Java EE 7 Platform Jun 12, 2013
  • 5. Copyright © 2012, Oracle and/or its affiliates. All rights reserved.5 Java EE 7 Themes  Batch  Concurrency  Simplified JMS  More annotated POJOs  Less boilerplate code  Cohesive integrated platform DEVELOPER PRODUCTIVITY  WebSockets  JSON  Servlet 3.1 NIO  REST MEETING ENTERPRISE DEMANDS Java EE 7
  • 6. Copyright © 2012, Oracle and/or its affiliates. All rights reserved.6 Top Ten Features in Java EE 7 1. WebSocket client/server endpoints 2. Batch Applications 3. JSON Processing 4. Concurrency Utilities 5. Simplified JMS API 6. @Transactional and @TransactionScoped 7. JAX-RS Client API 8. Default Resources 9. More annotated POJOs 10. Faces Flow
  • 7. Copyright © 2012, Oracle and/or its affiliates. All rights reserved.7 Java API for WebSocket 1.0  Server and Client WebSocket Endpoint – Annotated: @ServerEndpoint, @ClientEndpoint – Programmatic: Endpoint  Lifecycle methods  Packaging and Deployment @ServerEndpoint(“/chat”) public class ChatServer { @OnMessage public void chat(String m) { . . . } }
  • 8. Copyright © 2012, Oracle and/or its affiliates. All rights reserved.8 Java API for WebSocket 1.0 @ServerEndpoint("/chat") public class ChatBean { static Set<Session> peers = Collections.synchronizedSet(…); @OnOpen public void onOpen(Session peer) { peers.add(peer); } @OnClose public void onClose(Session peer) { peers.remove(peer); } . . . Chat Server
  • 9. Copyright © 2012, Oracle and/or its affiliates. All rights reserved.9 Java API for WebSocket 1.0 . . . @OnMessage public void message(String message) { for (Session peer : peers) { peer.getRemote().sendObject(message); } } } Chat Server (contd.)
  • 10. Copyright © 2012, Oracle and/or its affiliates. All rights reserved.10 JSON Processing 1.0  API to parse and generate JSON  Streaming API – Low-level, efficient way to parse/generate JSON – Similar to StAX API in XML world  Object Model API – Simple, easy to use high-level API – Similar to DOM API in XML world
  • 11. Copyright © 2012, Oracle and/or its affiliates. All rights reserved.11 { "firstName": "John", "lastName": "Smith", "age": 25, "phoneNumber": [ { "type": "home", "number": "212 555-1234" }, { "type": "fax", "number": "646 555-4567" } ] } JsonParser p = Json.createParser(…); JsonParser.Event event = p.next(); // START_OBJECT event = p.next(); // KEY_NAME event = p.next(); // VALUE_STRING String name = p.getString(); // "John” Java API for JSON Processing 1.0 Streaming API
  • 12. Copyright © 2012, Oracle and/or its affiliates. All rights reserved.12 Batch Applications for Java Platform 1.0  Suited for non-interactive, bulk-oriented, and long-running tasks  Batch execution: sequential, parallel, decision-based  Processing Styles – Item-oriented: Chunked (primary) – Task-oriented: Batchlet
  • 13. Copyright © 2012, Oracle and/or its affiliates. All rights reserved.13 Batch Applications 1.0 Concepts Metadata for jobs Manage batch process Batch process Independent sequential phase of job Chunk
  • 14. Copyright © 2012, Oracle and/or its affiliates. All rights reserved.14 <step id=”sendStatements”> <chunk item-count=“3”> <reader ref=”accountReader”/> <processor ref=”accountProcessor”/> <writer ref=”emailWriter”/> </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 } Batch Applications 1.0 Chunked Job Specification
  • 15. Copyright © 2012, Oracle and/or its affiliates. All rights reserved.15 Concurrency Utilities for Java EE 1.0  Extension of Java SE Concurrency Utilities API  Provide asynchronous capabilities to Java EE application components  Provides 4 types of managed objects – ManagedExecutorService – ManagedScheduledExecutorService – ManagedThreadFactory – ContextService  Context Propagation
  • 16. Copyright © 2012, Oracle and/or its affiliates. All rights reserved.16 Concurrency Utilities for Java EE 1.0 public class TestServlet extends HttpPServlet { @Resource(name=“java:comp/DefaultManagedExecutorService”) ManagedExecutorService executor; Future future = executor.submit(new MyTask()); class MyTask implements Runnable { public void run() { . . . // task logic } } } Submit Tasks to ManagedExecutorService using JNDI
  • 17. Copyright © 2012, Oracle and/or its affiliates. All rights reserved.17 Java Message Service 2.0  New JMSContext interface  AutoCloseable JMSContext, Connection, Session, …  Use of runtime exceptions  Method chaining on JMSProducer  Simplified message sending Get More from Less Java EE 7
  • 18. Copyright © 2012, Oracle and/or its affiliates. All rights reserved.18 @Resource(lookup = "myConnectionFactory”) ConnectionFactory connectionFactory; @Resource(lookup = "myQueue”) Queue myQueue; public void sendMessage (String payload) { Connection connection = null; try { connection = connectionFactory.createConnection(); Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE); MessageProducer messageProducer = session.createProducer(myQueue); TextMessage textMessage = session.createTextMessage(payload); messageProducer.send(textMessage); } catch (JMSException ex) { //. . . } finally { if (connection != null) { try { connection.close(); } catch (JMSException ex) { //. . . } } } } Application Server Specific Resources Boilerplate Code Exception Handling Java Message Service 2.0 Sending a Message using JMS 1.1
  • 19. Copyright © 2012, Oracle and/or its affiliates. All rights reserved.19 Java Message Service 2.0 @Inject JMSContext context; @Resource(lookup = "java:global/jms/demoQueue”) Queue demoQueue; public void sendMessage(String payload) { context.createProducer().send(demoQueue, payload); } Sending a Message
  • 20. Copyright © 2012, Oracle and/or its affiliates. All rights reserved.20 Java API for RESTful Web Services 2.0  Client API  Message Filters and Entity Interceptors  Asynchronous Processing – Server and Client  Common Configuration
  • 21. Copyright © 2012, Oracle and/or its affiliates. All rights reserved.21 Java API for RESTful Web Services 2.0 // Get instance of Client Client client = ClientBuilder.newClient(); // Get customer name for the shipped products String name = client.target(“../orders/{orderId}/customer”) .resolveTemplate(”orderId", ”10”) .queryParam(”shipped", ”true”) .request() .get(String.class); Client API
  • 22. Copyright © 2012, Oracle and/or its affiliates. All rights reserved.22 Contexts and Dependency Injection 1.1  Automatic enablement for beans with scope annotation and EJBs – “beans.xml” is optional  Bean discovery mode – all: All types – annotated: Types with bean defining annotation – none: Disable CDI  @Vetoed for programmatic disablement of classes  Global ordering/priority of interceptors and decorators
  • 23. Copyright © 2012, Oracle and/or its affiliates. All rights reserved.23 Bean Validation 1.1  Alignment with Dependency Injection  Method-level validation – Constraints on parameters and return values – Check pre-/post-conditions  Integration with JAX-RS Java EE 7
  • 24. Copyright © 2012, Oracle and/or its affiliates. All rights reserved.24 Built-in Custom @Future public Date getAppointment() { //. . . } public void placeOrder( @NotNull String productName, @NotNull @Max(“10”) Integer quantity, @Customer String customer) { //. . . } Bean Validation 1.1 Method Parameter and Result Validation
  • 25. Copyright © 2012, Oracle and/or its affiliates. All rights reserved.25 Java Persistence API 2.1  Schema Generation – javax.persistence.schema-generation.* properties  Unsynchronized Persistence Contexts  Bulk update/delete using Criteria  User-defined functions using FUNCTION  Stored Procedure Query
  • 26. Copyright © 2012, Oracle and/or its affiliates. All rights reserved.26 Servlet 3.1  Non-blocking I/O  Protocol Upgrade  Security Enhancements – <deny-uncovered-http-methods>: Deny request to HTTP methods not explicitly covered
  • 27. Copyright © 2012, Oracle and/or its affiliates. All rights reserved.27 Servlet 3.1 public class TestServlet extends HttpServlet protected void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { ServletInputStream input = request.getInputStream(); byte[] b = new byte[1024]; int len = -1; while ((len = input.read(b)) != -1) { . . . } } } Non-blocking I/O Traditional
  • 28. Copyright © 2012, Oracle and/or its affiliates. All rights reserved.28 Servlet 3.1 AsyncContext context = request.startAsync(); ServletInputStream input = request.getInputStream(); input.setReadListener( new MyReadListener(input, context)); Non-blocking I/O: doGet
  • 29. Copyright © 2012, Oracle and/or its affiliates. All rights reserved.29 Servlet 3.1 @Override public void onDataAvailable() { try { StringBuilder sb = new StringBuilder(); int len = -1; byte b[] = new byte[1024]; while (input.isReady() && (len = input.read(b)) != -1) { String data = new String(b, 0, len); System.out.println("--> " + data); } } catch (IOException ex) { . . . } } . . . Non-blocking read
  • 30. Copyright © 2012, Oracle and/or its affiliates. All rights reserved.30 JavaServer Faces 2.2  Faces Flow  Resource Library Contracts  HTML5 Friendly Markup Support – Pass through attributes and elements  Cross Site Request Forgery Protection  Loading Facelets via ResourceHandler  h:inputFile: New File Upload Component
  • 31. Copyright © 2012, Oracle and/or its affiliates. All rights reserved.31 Java Transaction API 1.2  @Transactional: Define transaction boundaries on CDI managed beans  @TransactionScoped: CDI scope for bean instances scoped to the active JTA transaction Java EE 7
  • 32. Copyright © 2012, Oracle and/or its affiliates. All rights reserved.32 EJB 3.2 Servlet 3.1 CDI Extensions BeanValidation1.1 Batch 1.0 Web Fragments Java EE 7 JSRs JCA 1.7JMS 2.0JPA 2.1 Managed Beans 1.0 Concurrency 1.0 Common Annotations 1.1 Interceptors 1.2, JTA 1.2 CDI 1.1 JSF 2.2, JSP 2.3, EL 3.0 JAX-RS 2.0, JAX-WS 2.2 JSON 1.0 WebSocket 1.0
  • 33. Copyright © 2012, Oracle and/or its affiliates. All rights reserved.33 DOWNLOAD Java EE 7 SDK oracle.com/javaee GlassFish 4.0 Full Platform or Web Profile glassfish.org
  • 34. Copyright © 2012, Oracle and/or its affiliates. All rights reserved.34 4.0 Java EE 7 Implementation download.java.net/glassfish/4.0/promoted/
  • 35. Copyright © 2012, Oracle and/or its affiliates. All rights reserved.35 Java EE 8 and Beyond Java EE 7 State Management PaaS NoSQL JSON-B Modularity HTML5++ Caching Cloud
  • 36. Copyright © 2012, Oracle and/or its affiliates. All rights reserved.36 Adopt-a-JSR Participating JUGs
  • 37. Copyright © 2012, Oracle and/or its affiliates. All rights reserved.37 Call to Action  Specs: javaee-spec.java.net  Implementation: glassfish.org  Blog: blogs.oracle.com/theaquarium  Twitter: @glassfish  NetBeans: wiki.netbeans.org/JavaEE7
  • 38. Copyright © 2012, Oracle and/or its affiliates. All rights reserved.38
  • 39. Copyright © 2012, Oracle and/or its affiliates. All rights reserved.39 The preceding material 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.
  • 40. Copyright © 2012, Oracle and/or its affiliates. All rights reserved.40