Professional Documents
Culture Documents
Sivakumar Thyagarajan
Oracle India
Disclaimer
The following 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 Oracles products remains at the sole discretion of Oracle.
HTML5 Support
WebSocket JSON HTML5 Forms
JSP 2.2
JSF 2.2
JAX-RS 2.0
EL 3.0
Servlet 3.1 CDI 1.1 EJB 3.2 JTA 1.2 JMS 2.0
Concurrency Utilities (JSR 236) Batch Applications (JSR 352) Java API for JSON (JSR 353) Java API for WebSocket (JSR 356)
Common Interceptors 1.1 Annotations 1.1 Managed Beans 1.0 Connector 1.7
New
JPA 2.1
Major Release
Updated
}
);
boilerplate code
public void sendMessage(String payload) { try { Connection connection = connectionFactory.createConnection(); try { Session session = connection.createSession(false,Session.AUTO_ACKNOWLEDGE); MessageProducer messageProducer = session.createProducer(demoQueue); TextMessage textMessage = session.createTextMessage(payload); messageProducer.send(textMessage); } finally { connection.close(); } } catch (JMSException ex) { Logger.getLogger(getClass().getName()).log(Level.SEVERE, null, ex); } }
Object Model
Simple, easy-to-use high-level API Implemented on top of Streaming API
Created using
Json.createGenerator()
Json.createGeneratorFactory().createGenerator()
JsonBuilder Builds JsonObject and JsonArray JsonReader Reads JsonObject and JsonArray from input source JsonWriter Writes JsonObject and JsonArray to output source
Purpose
Turns a POJO into a WebSocket Endpoint
@WebSocketOpen
@WebSocketClose @WebSocketMessage
method
method method
@WebSocketPathParam
@WebSocketError
method Flags a matched path segment of a URI-template parameter method Intercepts errors during a conversation
public void placeOrder( @NotNull String productName, @NotNull @Max(10) Integer quantity, @Customer String customer) { //. . . }
...
Remote
Remote
Servlet 3.1
Non-blocking I/O Protocol Upgrade Security Enhancements
Servlet 3.1
Non-blocking IO - Traditional
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) { ... } } }
Servlet 3.1
Non-blocking I/O: doGet Code Sample
AsyncContext context = request.startAsync(); ServletInputStream input = request.getInputStream(); input.setReadListener( new MyReadListener(input, context));
Servlet 3.1
Non-blocking I/O: MyReadListener Code Sample
@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) { ... } } ...
Servlet 3.1
Non-blocking I/O: MyListener Code Sample
... @Override public void onAllDataRead() { context.complete(); } @Override public void onError(Throwable t) { t.printStackTrace(); context.complete(); }
Support simple (common) and advanced concurrency patterns Provide consistency between Java SE and Java EE concurrency programming model
Extend the Concurrency Utilities API (JSR 166)
Submitted using submit or invoke methods Multiple (configurable) executors are permitted
Faces Flows Cross Site Request Forgery Protection Loading Facelets via ResourceHandler File Upload Component Multi-templating
4.0
http://download.java.net/glassfish/4.0/promoted/
JSON-B
Concurrency
Multitenancy
Java EE 7
Cloud PaaS Enablement Thin Server Architecture
Call to Action
Java EE 7 Expert Group
javaee-spec.java.net
The Aquarium
blogs.oracle.com/theaquarium
Adopt-a-JSR
glassfish.org/adoptajsr
Transparency
Oracles Java EE 7 JSRs are run in the open on java.net
http://javaee-spec.java.net One project per spec e.g., jpa-spec, jax-rs-spec, jms-spec, connector-spec
Publicly viewable download area Publicly viewable issue tracker Commitment to update to JCP 2.8 Process
GlassFish Roadmap
GlassFish v3
Java EE 6 support Single instance GlassFish Enterprise Mgr
2009
2010
2011
2012
2013
GlassFish Server 4
Java EE 7 Multitenancy PaaS-enablement