• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Java EE 7 Technical Keynote
 

Java EE 7 Technical Keynote

on

  • 3,932 views

Java EE technical keynote delivered at JavaOne Russia 2013.

Java EE technical keynote delivered at JavaOne Russia 2013.

Statistics

Views

Total Views
3,932
Views on SlideShare
2,932
Embed Views
1,000

Actions

Likes
0
Downloads
63
Comments
0

8 Embeds 1,000

https://blogs.oracle.com 755
http://java.dzone.com 222
https://twitter.com 11
http://www.dzone.com 4
http://architects-portal.cybage.com 3
http://www.feedspot.com 3
https://inoreader.com 1
https://translate.googleusercontent.com 1
More...

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Java EE 7 Technical Keynote Java EE 7 Technical Keynote Presentation Transcript

    • Copyright © 2012, Oracle and/or its affiliates. All rights reserved.1The Java EE PlatformTechnical KeynoteReza Rahman (@reza_rahman)Java EE/GlassFish Evangelist
    • Copyright © 2012, Oracle and/or its affiliates. All rights reserved.2The following is intended to outline our general product direction. It is intendedfor information purposes only, and may not be incorporated into any contract.It is not a commitment to deliver any material, code, or functionality, and shouldnot be relied upon in making purchasing decisions. The development, release,and timing of any features or functionality described for Oracle’s productsremains at the sole discretion of Oracle.
    • Copyright © 2012, Oracle and/or its affiliates. All rights reserved.3Java EE 7JCA 1.7JCA 1.7Managed Beans 1.0Managed Beans 1.0 EJB 3.2EJB 3.2Servlet 3.1Servlet 3.1PortableExtensionsPortableExtensionsJSF 2.2JSF 2.2 JAX-RS 2JAX-RS 2JMS 2JMS 2JPA 2.1JPA 2.1EL 3.0EL 3.0JTA 1.2JTA 1.2JSP 2.3JSP 2.3Interceptors 1.1Interceptors 1.1 CDI 1.1CDI 1.1CommonAnnotations 1.1CommonAnnotations 1.1UpdatedMajorReleaseNewJava API for WebSocket(JSR 356)Java API for WebSocket(JSR 356)Batch Applications(JSR 352)Batch Applications(JSR 352)Java API for JSON(JSR 353)Java API for JSON(JSR 353)Concurrency Utilities(JSR 236)Concurrency Utilities(JSR 236)
    • Copyright © 2012, Oracle and/or its affiliates. All rights reserved.4Java API for WebSocket Full-duplex, bidirectional communication over HTTP– Part of HTML 5 API for WebSocket Client/Server– Declarative, annotation-driven– Programmatic, interface-driven
    • Copyright © 2012, Oracle and/or its affiliates. All rights reserved.5Java API for WebSocketConnection Life Cycle@Singleton@ServerEndpoint(”/chat”)public class ChatServer {Set<Session> peers = ...@OnOpenpublic void onOpen(Session peer) {peers.add(session);}@OnClosepublic void onClose(Session session) {peers.remove(session);}...
    • Copyright © 2012, Oracle and/or its affiliates. All rights reserved.6Java API for WebSocketWebSocket Communication...@OnMessagepublic void message(String message, Session client)throws IOException {for (Session session : peers) {if (!session.equals(client)) {session.getRemote().sendObject(message);}}}}
    • Copyright © 2012, Oracle and/or its affiliates. All rights reserved.7Java API for JSON Processing API to parse and generate JSON Streaming and Object Model APIs similar to StAX and DOM in theXML world JSON Binding API forthcoming– Along the lines of JAXB, as opposed to JSON-P
    • Copyright © 2012, Oracle and/or its affiliates. All rights reserved.8Java API for JSON ProcessingWriting JSON (Object Model API)[{"type": "home”,"number": "212 555-1234"},{"type": "fax”,"number": "646 555-4567"}]JsonArray value =Json.createArrayBuilder().add(Json.createObjectBuilder().add("type", "home").add("number", "212 555-1234")).add(Json.createObjectBuilder().add("type", "fax").add("number", "646 555-4567")).build();
    • Copyright © 2012, Oracle and/or its affiliates. All rights reserved.9JAX-RS 2 Client API Message filters & entity interceptors Asynchronous processing– Server and client Hypermedia Support Mime type negotiation
    • Copyright © 2012, Oracle and/or its affiliates. All rights reserved.10JAX-RS 2Client API// Get instance of ClientClient client = ClientBuilder.newClient();// Get customer name for the shipped productsString name = client.target(“../orders/{orderId}/customer”).pathParam(”orderId", ”10”).queryParam(”shipped", ”true”).request().get(String.class);
    • Copyright © 2012, Oracle and/or its affiliates. All rights reserved.11JMS 2 API modernization– Streamlined APIs– Dependency injection– Runtime exceptions– Builder pattern– Intelligent defaults Delivery delay, async send, delivery count MDB alignment JMS resource definition
    • Copyright © 2012, Oracle and/or its affiliates. All rights reserved.12JMS 2Old API@Resource(lookup = "java:global/jms/demoConnectionFactory")ConnectionFactory connectionFactory;@Resource(lookup = "java:global/jms/demoQueue")Queue demoQueue;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);}}BoilerplateFunctional coreChecked exceptions
    • Copyright © 2012, Oracle and/or its affiliates. All rights reserved.13JMS 2Simplified API@Injectprivate JMSContext context;@Resource(mappedName = "jms/inboundQueue")private Queue inboundQueue;public void sendMessage (String payload) {context.createProducer().send(inboundQueue, payload);}Reduced to functional coreHigher-level managed, injected API
    • Copyright © 2012, Oracle and/or its affiliates. All rights reserved.14Batch Applications for the Java Platform Standard Java API for batch processing Lingua franca for well understood batch concepts– Jobs, job specification language (JSL), steps, readers, writers,processors, chunking, flow, parallelization, repositories
    • Copyright © 2012, Oracle and/or its affiliates. All rights reserved.15<step id=”sendStatements”><chunk reader ref=”accountReader”processor ref=”accountProcessor”writer ref=”emailWriter”chunk-size=”10” /></step>Batch Applications for the Java PlatformStep Example...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}
    • Copyright © 2012, Oracle and/or its affiliates. All rights reserved.16Concurrency Utilities for Java EE Provides low-level asynchronous processing capabilities to Java EEapplication components in a safe, reliable, consistent manner Mostly extension of Java SE Concurrency Utilities APIs– ManagedExecutorService– ManagedScheduledExecutorService– ManagedThreadFactory
    • Copyright © 2012, Oracle and/or its affiliates. All rights reserved.17Concurrency Utilities for Java EEManaged Task Executorpublic class TestServlet extends HTTPServlet {@Resource(name=“concurrent/MyExecutorService”)ManagedExecutorService executor;Future future = executor.submit(new MyTask());class MyTask implements Runnable {public void run() {... // Task logic}}}
    • Copyright © 2012, Oracle and/or its affiliates. All rights reserved.18Many others . . .• JPA 2.1: Schema generation, stored procedures, converters…• JSF 2.2: @FlowScoped, HTML5 forms, CDI alignment…• Bean Validation 1.1: Method validation…• Servlet 3.1: Non-blocking IO, Upgrade to WebSocket…• EL 3.0: Lambda expressions, Collection, Operators…• JTA 1.2: @Transactional, @TransactionScoped…• CDI 1.1: Ordering of interceptors, Servlet events, @Veto…• EJB 3.2: Optional CMP/BMP…
    • Copyright © 2012, Oracle and/or its affiliates. All rights reserved.19Java EE 8 and BeyondJava EE 7CDIAlignmentMultitenancyNoSQLJSON-BModularityCloudJCacheHTML 5
    • Copyright © 2012, Oracle and/or its affiliates. All rights reserved.20Java EE 7 (WebSocket+JSON-P) Demohttps://blogs.oracle.com/reza/resource/whiteboard.zip
    • Copyright © 2012, Oracle and/or its affiliates. All rights reserved.214.0Try it out!download.java.net/glassfish/4.0/promoted/
    • Copyright © 2012, Oracle and/or its affiliates. All rights reserved.22More Java EE at JavaOne Russia…Title Speakers Time - LocationUnlocking the Java EE Platform with HTML5 Geertjan Wielenga Tuesday 12:15 - 14:15 - ParisThe Java EE 7 Platform: Productivity++ andHTML5Arun Gupta Tuesday 13:30 - 14:30 - MoscowJava Message Service 2: New and Updated Reza Rahman Tuesday 15:30 - 16:30 - MoscowJava API for RESTful Web services: Newand UpdatedReza Rahman Tuesday 16:45 - 17:45 - San FranciscoBuilding WebSocket Applications using Java:JSR 356Arun Gupta Wednesday 9:30 - 10:30 - San FranciscoConcurrency Utilities for Java EE Reza Rahman Wednesday 10:45 - 11:05 - San PauloBatch Applications for the Java Platform Reza Rahman Wednesday 11:50 - 12:10 - San PauloGetting Started with the Java EE 7 Platform Arun Gupta Wednesday 12:45 - 14:45 - ParisJava API for JSON Processing Reza Rahman Wednesday 18:00 - 18:20 - San Paulo