SlideShare a Scribd company logo
1 of 77
Download to read offline
The Java EE 7 Platform:
Productivity and HTML5
Arun Gupta (@arungupta)
Java EE & GlassFish Guy




  1   Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
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 Oracle s products
    remains at the sole discretion of Oracle.


2   Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Java EE 6 Platform
                                                                           December 10, 2009


3   Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Java EE 6 – Key Statistics

    •  40+ Million Java EE 6 Component Downloads
    •  #1 Choice for Enterprise Developers
    •  #1 Application Development Platform
    •  Fastest implementation of a Java EE release




4   Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Top Ten Features in Java EE 6
    1.  EJB packaging in a WAR
    2.  Type-safe dependency injection
    3.  Optional deployment descriptors (web.xml, faces-config.xml)
    4.  JSF standardizing on Facelets
    5.  One class per EJB
    6.  Servlet and CDI extension points
    7.  CDI Events
    8.  EJBContainer API
    9.  Cron-based @Schedule!
    10. Web Profile
5   Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Java EE 7 Revised Scope
    Productivity and HTML5
    •  Higher Productivity
             –  Less Boilerplate
             –  Richer Functionality
             –  More Defaults
    •  HTML5 Support
             –  WebSocket
             –  JSON
             –  HTML5 Forms


6   Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Java EE 7 – Candidate JSRs
                                                                                 JAX-RS                                        Java Caching API
                                JSP 2.2                        JSF 2.2             2.0
                                                                                              EL 3.0                              (JSR 107)
 Portable
Extensions




                                                                                                       Bean Validation 1.1
                                                                                                                              Concurrency Utilities
                                                                         Servlet 3.1                                              (JSR 236)

  Common                                                                                                                       Batch Applications
                Interceptors 1.1                                                       CDI 1.1                                     (JSR 352)
Annotations 1.1
                                                                                                                               Java API for JSON
 Managed Beans 1.0                                                                EJB 3.2                                          (JSR 353)

Connector                                                                                                                    Java API for WebSocket
                                       JPA 2.1                               JTA 1.2        JMS 2.0                                (JSR 356)
   1.6

      New                     Major                           Updated
                              Release

  7   Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Java API for RESTful Web Services 2.0

       •  Client API
       •  Message Filters & Entity Interceptors
       •  Asynchronous Processing – Server & Client
       •  Hypermedia Support
       •  Common Configuration




8   Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Java API for RESTful Web Services 2.0
    Client API - Before
      String address = String.format("http://…/orders/%0$s/customer?shipped=
      %1$b", "10", true);

      !
      URL url = new URL(address);!
      HttpURLConnection conn = (HttpURLConnection) url.openConnection();!
      conn.setRequestMethod("GET");!
      conn.setDoInput(true);!
      conn.setDoOutput(false);!
                   !
      BufferedReader br = new BufferedReader(

                                   new
      InputStreamReader(conn.getInputStream()));!
      String line;!
      while ((line = br.readLine()) != null) {!
          //. . .!
      }!
9   Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Java API for RESTful Web Services 2.0
     Client API - Now

      // Get instance of Client
      Client client = ClientFactory.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);!




10   Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Java API for RESTful Web Services 2.0
     Filters

 @Provider

 class LoggingFilter implements ContainerRequestFilter {!
     @Override

     public void filter(ContainerRequestContext context) {

         logRequest(ctx.getRequest());

         // non-wrapping => returns without invoking next filter

     }

 }!




11   Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Java API for RESTful Web Services 2.0
         Client-side Async
Client client = ClientFactory.newClient();

Future<String> future = client.target("http://.../atm/{card}/balance")

                              .pathParam("card", "1111222233334444")

                              .queryParam("pin", "1234")

                              .request("text/plain")

                              .async()

                              .get(

                                 new InvocationCallback<String>() {

                                     public void completed(String result) {

                                     }



                                                                                           public void failed(InvocationException e) {

                                                                                           }

                                                                                      }

                                                                                );!


    12   Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Java Message Service 2.0
     Simplify the existing API

     •  Less verbose
     •  Reduce boilerplate code
     •  Resource injection
     •  Connection, Session, and other objects are
        AutoCloseable
     •  Requires Resource Adapter for Java EE containers
     •  Simplified API in both Java SE and EE

13   Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Java Message Service 2.0
     Sending message using JMS 1.1
           @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);!            13 lines of
                      messageProducer.send(textMessage);#
                  } finally {!                                                                  code just
                      connection.close();!                                                      to send a
                  }!
               } catch (JMSException ex) {!
                                                                                                message
                  Logger.getLogger(getClass().getName()).log(Level.SEVERE, null, ex);!
               }!
           } !


14   Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Java Message Service 2.0
     Sending message using JMS 1.1                                                      must create several
                                                                                        intermediate objects
           @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);!
               }!
           } !


15   Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Java Message Service 2.0
     Sending message using JMS 1.1
                                                                                                redundant and
           @Resource(lookup = "java:global/jms/demoConnectionFactory")!
           ConnectionFactory connectionFactory;!
                                                                                                   misleading
                !                                                                                  arguments
           @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);!
               }!
           } !


16   Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Java Message Service 2.0
     Sending message using JMS 1.1
           @Resource(lookup = "java:global/jms/demoConnectionFactory")!
           ConnectionFactory connectionFactory;!                                                 boilerplate
                !
           @Resource(lookup = "java:global/jms/demoQueue")!                                      code
           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);!
               }!
           } !


17   Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Java Message Service 2.0
     Sending message using JMS 1.1
           @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 {#                                                           must close
                      connection.close();#
                  }#                                                                     resources
               } catch (JMSException ex) {!                                              after use!
                  Logger.getLogger(getClass().getName()).log(Level.SEVERE, null, ex);!
               }!
           } !


18   Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Java Message Service 2.0
     Sending message using JMS 1.1
           @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);!                                   all methods
                  } finally {!                                                              throw checked
                      connection.close();!
                  }!                                                                        exceptions
               } catch (JMSException ex) {!
                  Logger.getLogger(getClass().getName()).log(Level.SEVERE, null, ex);!
               }!
           } !


19   Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Java Message Service 2.0
     Sending message using JMS 1.1
           @Resource(lookup = "java:global/jms/demoConnectionFactory")#
           ConnectionFactory connectionFactory;#
                                                                                                pre-create app-
                #                                                                               server specific
           @Resource(lookup = "java:global/jms/demoQueue")#                                     resources
           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);!
               }!
           } !


20   Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Java Message Service 2.0
     Simpler API to close JMS objects
                                                                            Create closeable
                                                                            resources in a try-
 @Resource(lookup = "jms/connFactory")

                                                                            with-resources block
 ConnectionFactory cf; !
 @Resource(lookup="jms/inboundQueue")!
 Destination dest;!
  !
 public void sendMessage (String payload) throws JMSException {!
    try ( Connection conn = connectionFactory.createConnection(); #
          Session session = conn.createSession();#
          MessageProducer producer = session.createProducer(dest);#
    ){ !
       Message mess = sess.createTextMessage(payload); !      close() is called
       producer.send(mess); !                                 automatically
    } catch(JMSException e){ !                                at end of block
       // exception handling !
    }

 }!
21   Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Java Message Service 2.0                                                            JMSContext
     Introducing JMSContext and JMSProducer                                              combines
                                                                                         Connection
                                                                                         and Session
 @Resource(lookup = "java:global/jms/demoConnectionFactory")!
 ConnectionFactory connectionFactory;   !
 !
                                                                    Payload
 @Resource(lookup = "java:global/jms/demoQueue")!                   can be sent
 Queue demoQueue;!                                                  directly
     !
 public void sendMessage (String payload) {!
    try (JMSContext context = connectionFactory.createContext();){!
       context.createProducer().send(demoQueue, payload);#
    } catch (JMSRuntimeException ex) {!
       // exception handling!
    }!                                                         close() is called
 }!                                                            automatically
                                        No checked             at end of block
                                                                            exceptions
                                                                            thrown
22   Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Java Message Service 2.0
     Default resource definition
                                                                            Default resource definition
                                                                                        Or
                                                                            @JmsConnectionFactory#
     @Inject

     JMSContext context;!
     !
     @Resource(lookup = "java:global/jms/demoQueue”)

     Queue demoQueue;!
     !
     public void sendMessage(String payload) {!
         context.createProducer().send(demoQueue, payload);!
     }!
                                                                               13 lines è1 line#



23   Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Java API for JSON Processing 1.0

     •  API to parse and generate JSON
     •  Streaming API
             –  Low-level, efficient way to parse/generate JSON
             –  Provides pluggability for parsers/generators
     •  Object Model
             –  Simple, easy-to-use high-level API
             –  Implemented on top of Streaming API
     •  Binding JSON to Java objects forthcoming

24   Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Java API for JSON Processing 1.0
     Streaming API – JsonParser and JsonGenerator
     •  JsonParser
           –  Parses JSON in a streaming way from input sources
                    •  Similar to StaX’s XMLStreamReader, a pull parser
           –  Created using
                    •  Json.createParser(…)!
                    •  Json.createParserFactory().createParser(…)!
           –  Parser state events
                    •  START_ARRAY, END_ARRAY, START_OBJECT, END_OBJECT, ...



25   Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Java API for JSON Processing 1.0
     Streaming API – JsonParser and JsonGenerator
     •  JsonGenerator
           –  Generates JSON in a streaming way to output sources
                    •  Similar to StaX’s XMLStreamWriter
           –  Created using
                    •  Json.createGenerator(…)!
                    •  Json.createGeneratorFactory().createGenerator(…)!
           –  Optionally, configured with features
                    •  E.g. for pretty printing



26   Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Java API for JSON Processing 1.0
     Streaming API – JsonGenerator


                                                                           JsonGenerator jg = Json.createGenerator(…);

"phoneNumber": [!                                                           

      { 
                                                                   jg.

          "type": "home", 
                                                   .beginArray("phoneNumber")

          "number": ”408-123-4567”
                                              .beginObject() 

      },!                                                                          .add("type", "home") 

      {
                                                                           .add("number", "408-123-4567") 

          "type": ”work", 
                                                      .endObject() 

          "number": ”408-987-6543”
                                              .beginObject() 

      }!                                                                           .add("type", ”work") 

  ]!                                                                               .add("number", "408-987-6543") 

                                                                                 .endObject() 

                                                                              .endArray();

                                                                            jg.close(); !



27   Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Java API for JSON Processing 1.0
     Object Model API
     •  JsonObject/JsonArray – JSON object and array
        structures
           –  JsonString and JsonNumber for string and number values
     •  JsonBuilder – Builds JsonObject and JsonArray
     •  JsonReader – Reads JsonObject and JsonArray from
        input source
     •  JsonWriter – Writes JsonObject and JsonArray to
        output source

28   Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Java API for JSON Processing 1.0
     DOM API – JsonReader

     •  Reads JsonObject and JsonArray from input source
             –  i/o Reader, InputStream (+ encoding)
     •  Optionally, configured with features
     •  Uses pluggable JsonParser!
     // Reads a JSON object
     try(JsonReader reader = new JsonReader(io)) {!
                  JsonObject obj = reader.readObject();!
     }!
                 !
29   Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Java API for WebSocket 1.0

     •  Create WebSocket Client/Endpoints
           –  Annotation-driven (@WebSocketEndpoint)
           –  Interface-driven (Endpoint)
     •  Integration with Java EE Web container




30   Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Java API for WebSocket 1.0
     Hello World – POJO/Annotation-driven
import javax.net.websocket.annotations.*;



@WebSocketEndpoint("/hello")

public class HelloBean {



                @WebSocketMessage

                public String sayHello(String name) {

                    return “Hello “ + name;

                }

}!




31   Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Java API for WebSocket 1.0
     WebSocket Annotations
                            Annotation                                       Level                        Purpose

     @WebSocketEndpoint!                                                      class   Turns a POJO into a WebSocket Endpoint

     @WebSocketOpen!                                                         method   Intercepts WebSocket Open events

     @WebSocketClose!                                                        method   Intercepts WebSocket Close events

     @WebSocketMessage!                                                      method   Intercepts WebSocket Message events

                                                                             method
     @WebSocketPathParam!                                                             Flags a matched path segment of a URI-template
                                                                            parameter

     @WebSocketError!                                                        method   Intercepts errors during a conversation


32   Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Java API for WebSocket 1.0
     @WebSocketEndpoint Attributes


                                                                                    Relative URI or URI template
                             value!                                            e.g. /hello or /chat/{subscriber-level}

                       decoders!                                                 list of message decoder classnames

                       encoders!                                                 list of message encoder classnames

              subprotocols!                                                 list of the names of the supported subprotocols




33   Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Bean Validation 1.1

     •  Open: Spec, Reference Implementation, TCK
     •  Alignment with Dependency Injection
     •  Method-level validation
           –  Constraints on parameters and return values
           –  Check pre-/post-conditions




34   Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Bean Validation 1.1
     Method Parameter and Result Validation
                                                                            Need more slides here
  public void placeOrder( 

          @NotNull String productName,

Built-in
          @NotNull @Max(“10”) Integer quantity,

Custom    @Customer String customer) { 

             //. . .

  }!

     @Future

     public Date getAppointment() {

         //. . .

     }!
35   Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Batch Applications for the Java Platform 1.0

     •  Suited for non-interactive, bulk-oriented and long-running
        tasks
     •  Computationally intensive
     •  Can execute sequentially/parallel
     •  May be initiated
           –  Adhoc
           –  Scheduled
                    •  No scheduling APIs included


36   Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Batch Applications for the Java Platform 1.0
     Concepts
     •  Job: Entire batch process
             –  Put together through a Job Specification Language (XML)

     •  Step: Independent, sequential phase of a job
             –  ItemReader: Retrieval of input for a step, one at a time
             –  ItemProcessor: Business processing of an item
             –  ItemWriter: Output of an item, chunks of items at a time

     •  JobOperator: Manage batch processing
     •  JobRepository: Metadata for jobs




37   Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Batch Applications for the Java Platform 1.0
     Job Specification Language – Simple Job
     <job id=“myJob”>

       <step id=“init”>

         <chunk reader=“R” writer=W” processor=“P” />

         <next on=“initialized” to=“process”/>

         <fail on=“initError”/>

       </step>

       <step id=“process”>

         <batchlet ref=“ProcessAndEmail”/>

           <end on=”success”/>

           <fail on=”*” exit-status=“FAILURE”/>

       </step>

     </job> !

38   Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Batch Applications for the Java Platform 1.0
       Job Specification Language – Chunked Step
<step id=”sendStatements”>!           @ReadItem

  <chunk reader=”AccountReader”!      public Account readAccount() {

     processor=”AccountProcessor”
        // read account using JPA!
     writer=”EmailWriter”!            }!
     chunk-size=”10” />!              !
</step>!
                      @ProcessItem#
                      public Account processAccount(Account account) {

                           // calculate balance!
                      }!
  @WriteItems#        !
  public void sendEmail(List<Account> accounts) {

      // use JavaMail to send email!
  }!
  !
  39   Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Java Temporary Caching API 1.0

     •  API and semantics for temporary, in-memory caching of
        Java objects
     •  SPI for implementers
     •  Designed to support “local” and “distributed” caching
     •  Caching strategies supported
           –  By value (default)
           –  By reference (not suitable for “distributed” caching)



40   Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Java Temporary Caching API 1.0

     •  javax.cache.*!
     •  Delivered as part of Java EE 7
           –  Immediately usable by Java EE 6, Spring and Guice
           –  Immediately usable by any Java app
     •  Not a Data Grid specification
           –  JSR 107 does not mandate a topology
           –  JSR 347 does: builds on JSR 107



41   Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Java Temporary Caching API 1.0
     Key Concepts
     •  Cache Manager =>Caches
     •  Cache => Entries
     •  Entry => Key,Value


     •  CacheManager acquired via CacheManagerFactory!
     •  CacheManagerFactory acquired via Service Provider
           –  META-INF/services/javax.cache.spi.CachingProvider!

42   Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Java Temporary Caching API 1.0
     Code Sample – Blog
     public class BlogManager { !
               @CachePut(cacheName=”blogManager”)

               public void createEntry(

                     @CacheKeyParam String title,

                     @CacheValue Blog blog) {...}

     

               . . .!




43       Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Java Temporary Caching API 1.0
     Code Sample – Blog
               . . .

     

               @CacheResult(cacheName="blogManager") 

               public Blog getBlogEntry(String title) {...} !
     

               @CacheResult(cacheName="blogManager") 

               public Blog getEntryCached(

                 String randomArg, 

                 @CacheKeyParam String title) {...}

     

               . . .!
44       Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Java Temporary Caching API 1.0
     Annotations – Blog Sample
               . . .

     

               @CacheRemoveEntry(cacheName="blogManager") 

               public void removeBlogEntry(String title) {...} 

     !
               @CacheRemoveAll(cacheName="blogManager") 

               public void removeAllBlogs() {...}!
     } !



45       Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Java Persistence API 2.1

     •  Schema Generation
     •  Unsynchronized Persistence Contexts
     •  Converters
     •  Bulk update/delete using Criteria!
     •  User-defined functions using FUNCTION
     •  Stored Procedure Query



46   Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Java Persistence API 2.1
     Schema Generation
     •  What: Generation of database artifacts
           –  Tables, indexes, constraints, generators, …
     •  Scenarios: Iterative prototyping, production, database
        provisioning (e.g. in cloud)
     •  To: Database, DDL, Both
     •  From: O/R mapping metadata, SQL DDL scripts
     •  When: Prior to app deployment


47   Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Java Persistence API 2.1
     Schema Generation Properties
     •  javax.persistence.schema-generation-action!
           –  “none”, “create”, “drop-and-create”, “drop”
     •  javax.persistence.schema-generation-target!
           –  “database”, “scripts”, “database-and-scripts”
     •  javax.persistence.ddl-create-script-target/source!
     •  javax.persistence.ddl-drop-script-target/source!
     •  javax.persistence.sql-load-script-source!
     •  . . .!


48   Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Java Persistence API 2.1
     Schema Generation Example from ORM Metadata

     // mapped to EMPLOYEE table in default schema
     @Entity public class Employee {#
          @Id private int id;                                               // mapped to ID column as primary key
          private String name;                                               // mapped to NAME column, VARCHAR(255)
          ...#
          @ManyToOne // mapped to DEPT_ID foreign key column
          private Department dept;#
          ...#
     }#

49   Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Enterprise JavaBeans 3.2
     EJBs Today
     •  @Singleton!
     •  @Asynchronous!
     •  @Schedule!
     •  Portable JNDI Name
     •  EJBContainer.createEJBContainer!
     •  EJB 3.1 Lite



50   Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Enteprise JavaBeans 3.2
         Updates: Opt-in Transactions in SFSB Lifecycle Callbacks
     @Stateful

     public class HelloBean {

     

           @PersistenceContext(type=PersistenceContextType.EXTENDED)

           private EntityManager em;!
              !
            @TransactionAttribute(TransactionAttributeType.REQUIRES_NEW)#
            @PostConstruct#
            public void init() { . . . }!
     

              @TransactionAttribute(TransactionAttributeType.REQUIRES_NEW)

              @PreDestroy#
              public void destroy () { . . . }!


51       Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Enterprise JavaBeans 3.2
     Updates: Opt-out passivation of Stateful Session Beans

       @Stateful(passivationCapable=false)#
       public class HelloBean {!
           private NonSerializableType ref = …;!
       !
           …!
       }!




52   Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Enterprise JavaBeans 3.2
     Updates: Simplified Rules for Local/Remote Client Views

     @Stateless

     public class Bean implements Foo, Bar {

     }!
                                                                            Local
     @Local @Stateless

     public class Bean implements Foo, Bar {

     }!
                                                                            Remote
     @Remote @Stateless

     public class Bean implements Foo, Bar {

     }!

53   Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Enterprise JavaBeans 3.2
     Updates: Simplified Rules for Local/Remote Client Views

     @Remote

     public interface Foo { . . . }

     

     public interface Bar { . . . ]

     
                                                                          Remote
     @Stateless

     public class Bean implements Foo, Bar {

     }!




54       Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Servlet 3.1

     •  Non-blocking I/O
     •  Protocol Upgrade
     •  Security Enhancements




55   Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
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) {

              . . .

           }

        }

     }!

56   Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Servlet 3.1
     Non-blocking I/O: doGet Code Sample


     AsyncContext context = request.startAsync();

     ServletInputStream input = request.getInputStream();

     input.setReadListener(

         new MyReadListener(input, context)); !




57   Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
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) {

           . . .

        }

     }

     . . .

58
     !
     Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
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();

     } !




59       Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Concurrency Utilities for Java EE 1.0
     Goals
     •  Provide concurrency capabilities to Java EE application
        components
           –  Without compromising container integrity
     •  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)


60   Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Concurrency Utilities for Java EE 1.0
     ManagedExecutorService
     •  Manageable version of
        java.util.concurrent.ExecutorService
           –  Lookup using JNDI
     •  Java EE components create task classes
           –  Implement java.lang.Runnable or
              java.util.concurrent.Callable!
     •  Submitted using submit or invoke methods
     •  Multiple (configurable) executors are permitted

61   Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Concurrency Utilities for Java EE 1.0
     Defining ManagedExecutorService using JNDI
     •  Recommended to bind in java:comp/env/concurrent
        subcontext
     <resource-env-ref>

       <resource-env-ref-name>

         concurrent/BatchExecutor

       </resource-env-ref-name>

       <resource-env-ref-type>

         javax.enterprise.concurrent.ManagedExecutorService

       </resource-env-ref-type>

     </resource-env-ref>!

62   Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Concurrency Utilities for Java EE 1.0
     Submit Tasks to ManagedExecutorService using JNDI
     public class TestServlet extends HTTPServlet {

       @Resource(name=“concurrent/BatchExecutor”)

       ManagedExecutorService executor;

     

               Future future = executor.submit(new MyTask());

     

               class MyTask implements Runnable {

                  public void run() { 

                     . . . // task logic

                  }

               }

     }

63
     !   Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Concurrency Utilities for Java EE 1.0
     ManagedThreadFactory
     •  Provides a method for creating threads for execution in a
        managed environment
     •  Lookup using JNDI
               <resource-env-ref>

                 <resource-env-ref-name>

                  concurrent/LoggerThreadFactory

                 </resource-env-ref-name>

                 <resource-env-ref-type>

                  javax.enterprise.concurrent.ManagedThreadFactory

                 </resource-env-ref-type>

               </resource-env-ref>!


64   Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Concurrency Utilities for Java EE 1.0
     ManagedThreadFactory Sample
     @Resource(“concurrent/LoggerThreadFactory”)

     ManagedThreadFactory threadFactory;#
     

     LoggerTask task = new LoggerTask();

     Thread thread = threadFactory.newThread(task);

     

     LoggerTask implements Runnable {

        public void run() { . . . }

     }!




65       Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Java Transaction API 1.2

     •  Declarative transactions outside EJB
           –  Based on CDI interceptors
     •  Add annotation and standard values to
        javax.transaction package




66   Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Java Transaction API 1.2

     public @interface Transactional {

        TxType value() default TxType.REQUIRED

     }!
     public enum TxType {

        REQUIRED,

        REQUIRED_NEW,

        MANDATORY,

        SUPPORTS,

        NOT_SUPPORTED,

        NEVER

     }!
     !
67   !
     Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Java Transaction API 1.2

     public class ShoppingCart {!
                ...!
                @Transactional

                public void checkOut() {...}!
                ...!
     }!




68   Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
JavaServer Faces 2.2

     •  HTML5 Friendly Markup Support
           –  Pass through attributes and elements
     •  Faces Flows
     •  Cross Site Request Forgery Protection
     •  Loading Facelets via ResourceHandler!
     •  File Upload Component
     •  Multi-templating

69   Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Contexts & Dependency Injection 1.1

     •  Embedded mode to startup outside Java EE container
     •  Global ordering of interceptors and decorators
     •  API for managing built-in contexts
     •  Send Servlet events as CDI events
     •  . . .




70   Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Java EE 7 – Implementation Status

                                                                            4.0


            download.java.net/glassfish/4.0/promoted/
71   Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Java EE 8 and Beyond
     Standards-based cloud programming model

     •  Deliver cloud architecture                                                           Storage
                                                                                                         NoSQL

     •  Multi tenancy for SaaS                                                JSON-B
                                                                                                             Multitenancy
                                                                                             Java EE 7
        applications                                                        Concurrency
                                                                                                                    Cloud
                                                                                             PaaS
     •  Incremental delivery of JSRs                                                      Enablement     Thin Server
                                                                                                         Architecture

     •  Modularity based on Jigsaw



72   Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Call to Action

     •  Java EE 7 Expert Group
             –  javaee-spec.java.net
     •  Java EE 7 Reference Implementation
             –  glassfish.org
     •  The Aquarium
             –  blogs.oracle.com/theaquarium
     •  Adopt-a-JSR
             –  glassfish.org/adoptajsr

73   Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Transparency
     •  Oracle’s 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…
     •  Publicly viewable Expert Group mail archive
           –  Users observer list gets copies of all Expert Group emails
     •  Publicly viewable download area
     •  Publicly viewable issue tracker
     •  Commitment to update to JCP 2.8 Process

74   Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Status and Schedule



•  All JSRs up and running
•  All Early Drafts, several Public Drafts
•  Final release target: Q2 2013




  75   Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
GlassFish Roadmap
GlassFish v3                                                                        GlassFish Server 3.1               GlassFish Server 3.1.2
•  Java EE 6 support                                                                •  Centralized administration      •  Bug Fixes
•  Single instance                                                                  •  Clustering / HA                 •  Incremental features
•  GlassFish Enterprise Mgr                                                         •  GlassFish Server Control




 2009                                               2010                                           2011               2012                       2013


     GlassFish Server 3.0.1                                                                 GlassFish Server 3.1.1             GlassFish Server 4
     •  Oracle branding                                                                     •  Bug fixes                       •  Java EE 7
     •  Oracle platform support                                                             •  Updated components              •  Multitenancy
     •  Oracle interoperability                                                             •  Incremental features            •  PaaS-enablement




        76   Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Graphic Section Divider




77   Copyright © 2012, Oracle and/or its affiliates. All rights reserved.

More Related Content

What's hot

Powering the Next Generation Services with Java Platform - Spark IT 2010
Powering the Next Generation Services with Java Platform - Spark IT 2010Powering the Next Generation Services with Java Platform - Spark IT 2010
Powering the Next Generation Services with Java Platform - Spark IT 2010Arun Gupta
 
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 2012Arun Gupta
 
OSGi-enabled Java EE Applications using GlassFish at JCertif 2011
OSGi-enabled Java EE Applications using GlassFish at JCertif 2011OSGi-enabled Java EE Applications using GlassFish at JCertif 2011
OSGi-enabled Java EE Applications using GlassFish at JCertif 2011Arun Gupta
 
Running your Java EE applications in the Cloud
Running your Java EE applications in the CloudRunning your Java EE applications in the Cloud
Running your Java EE applications in the CloudArun Gupta
 
Getting Started with Rails on GlassFish (Hands-on Lab) - Spark IT 2010
Getting Started with Rails on GlassFish (Hands-on Lab) - Spark IT 2010Getting Started with Rails on GlassFish (Hands-on Lab) - Spark IT 2010
Getting Started with Rails on GlassFish (Hands-on Lab) - Spark IT 2010Arun Gupta
 
5050 dev nation
5050 dev nation5050 dev nation
5050 dev nationArun Gupta
 
Java EE 7: Developing for the Cloud at Geecon, JEEConf, Johannesburg
Java EE 7: Developing for the Cloud at Geecon, JEEConf, JohannesburgJava EE 7: Developing for the Cloud at Geecon, JEEConf, Johannesburg
Java EE 7: Developing for the Cloud at Geecon, JEEConf, JohannesburgArun Gupta
 
TDC 2011: The Java EE 7 Platform: Developing for the Cloud
TDC 2011: The Java EE 7 Platform: Developing for the CloudTDC 2011: The Java EE 7 Platform: Developing for the Cloud
TDC 2011: The Java EE 7 Platform: Developing for the CloudArun Gupta
 
GIDS 2012: PaaSing a Java EE Application
GIDS 2012: PaaSing a Java EE ApplicationGIDS 2012: PaaSing a Java EE Application
GIDS 2012: PaaSing a Java EE ApplicationArun Gupta
 
Java EE 6 & GlassFish 3: Light-weight, Extensible, and Powerful @ Silicon Val...
Java EE 6 & GlassFish 3: Light-weight, Extensible, and Powerful @ Silicon Val...Java EE 6 & GlassFish 3: Light-weight, Extensible, and Powerful @ Silicon Val...
Java EE 6 & GlassFish 3: Light-weight, Extensible, and Powerful @ Silicon Val...Arun Gupta
 
GIDS 2012: Java Message Service 2.0
GIDS 2012: Java Message Service 2.0GIDS 2012: Java Message Service 2.0
GIDS 2012: Java Message Service 2.0Arun Gupta
 
The Java EE 7 Platform: Developing for the Cloud (FISL 12)
The Java EE 7 Platform: Developing for the Cloud  (FISL 12)The Java EE 7 Platform: Developing for the Cloud  (FISL 12)
The Java EE 7 Platform: Developing for the Cloud (FISL 12)Arun Gupta
 
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 HTML5Arun Gupta
 
GlassFish 3.1 at JCertif 2011
GlassFish 3.1 at JCertif 2011GlassFish 3.1 at JCertif 2011
GlassFish 3.1 at JCertif 2011Arun Gupta
 
Java EE 6 and GlassFish v3: Paving the path for future
Java EE 6 and GlassFish v3: Paving the path for futureJava EE 6 and GlassFish v3: Paving the path for future
Java EE 6 and GlassFish v3: Paving the path for futureArun Gupta
 
Creating Quick and Powerful Web applications with Oracle, GlassFish and NetBe...
Creating Quick and Powerful Web applications with Oracle, GlassFish and NetBe...Creating Quick and Powerful Web applications with Oracle, GlassFish and NetBe...
Creating Quick and Powerful Web applications with Oracle, GlassFish and NetBe...Arun Gupta
 
Java EE 7: Developing for the Cloud at Java Day, Istanbul, May 2012
Java EE 7: Developing for the Cloud at Java Day, Istanbul, May 2012Java EE 7: Developing for the Cloud at Java Day, Istanbul, May 2012
Java EE 7: Developing for the Cloud at Java Day, Istanbul, May 2012Arun Gupta
 
PaaSing a Java EE 6 Application at Geecon 2012
PaaSing a Java EE 6 Application at Geecon 2012PaaSing a Java EE 6 Application at Geecon 2012
PaaSing a Java EE 6 Application at Geecon 2012Arun Gupta
 
JAX-RS 2.0: RESTful Web services on steroids at Geecon 2012
JAX-RS 2.0: RESTful Web services on steroids at Geecon 2012JAX-RS 2.0: RESTful Web services on steroids at Geecon 2012
JAX-RS 2.0: RESTful Web services on steroids at Geecon 2012Arun Gupta
 

What's hot (20)

Powering the Next Generation Services with Java Platform - Spark IT 2010
Powering the Next Generation Services with Java Platform - Spark IT 2010Powering the Next Generation Services with Java Platform - Spark IT 2010
Powering the Next Generation Services with Java Platform - Spark IT 2010
 
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
 
OSGi-enabled Java EE Applications using GlassFish at JCertif 2011
OSGi-enabled Java EE Applications using GlassFish at JCertif 2011OSGi-enabled Java EE Applications using GlassFish at JCertif 2011
OSGi-enabled Java EE Applications using GlassFish at JCertif 2011
 
Running your Java EE applications in the Cloud
Running your Java EE applications in the CloudRunning your Java EE applications in the Cloud
Running your Java EE applications in the Cloud
 
Getting Started with Rails on GlassFish (Hands-on Lab) - Spark IT 2010
Getting Started with Rails on GlassFish (Hands-on Lab) - Spark IT 2010Getting Started with Rails on GlassFish (Hands-on Lab) - Spark IT 2010
Getting Started with Rails on GlassFish (Hands-on Lab) - Spark IT 2010
 
5050 dev nation
5050 dev nation5050 dev nation
5050 dev nation
 
Java EE 7: Developing for the Cloud at Geecon, JEEConf, Johannesburg
Java EE 7: Developing for the Cloud at Geecon, JEEConf, JohannesburgJava EE 7: Developing for the Cloud at Geecon, JEEConf, Johannesburg
Java EE 7: Developing for the Cloud at Geecon, JEEConf, Johannesburg
 
TDC 2011: The Java EE 7 Platform: Developing for the Cloud
TDC 2011: The Java EE 7 Platform: Developing for the CloudTDC 2011: The Java EE 7 Platform: Developing for the Cloud
TDC 2011: The Java EE 7 Platform: Developing for the Cloud
 
GIDS 2012: PaaSing a Java EE Application
GIDS 2012: PaaSing a Java EE ApplicationGIDS 2012: PaaSing a Java EE Application
GIDS 2012: PaaSing a Java EE Application
 
Java EE 6 & GlassFish 3: Light-weight, Extensible, and Powerful @ Silicon Val...
Java EE 6 & GlassFish 3: Light-weight, Extensible, and Powerful @ Silicon Val...Java EE 6 & GlassFish 3: Light-weight, Extensible, and Powerful @ Silicon Val...
Java EE 6 & GlassFish 3: Light-weight, Extensible, and Powerful @ Silicon Val...
 
GIDS 2012: Java Message Service 2.0
GIDS 2012: Java Message Service 2.0GIDS 2012: Java Message Service 2.0
GIDS 2012: Java Message Service 2.0
 
The Java EE 7 Platform: Developing for the Cloud (FISL 12)
The Java EE 7 Platform: Developing for the Cloud  (FISL 12)The Java EE 7 Platform: Developing for the Cloud  (FISL 12)
The Java EE 7 Platform: Developing for the Cloud (FISL 12)
 
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
 
Websocket 1.0
Websocket 1.0Websocket 1.0
Websocket 1.0
 
GlassFish 3.1 at JCertif 2011
GlassFish 3.1 at JCertif 2011GlassFish 3.1 at JCertif 2011
GlassFish 3.1 at JCertif 2011
 
Java EE 6 and GlassFish v3: Paving the path for future
Java EE 6 and GlassFish v3: Paving the path for futureJava EE 6 and GlassFish v3: Paving the path for future
Java EE 6 and GlassFish v3: Paving the path for future
 
Creating Quick and Powerful Web applications with Oracle, GlassFish and NetBe...
Creating Quick and Powerful Web applications with Oracle, GlassFish and NetBe...Creating Quick and Powerful Web applications with Oracle, GlassFish and NetBe...
Creating Quick and Powerful Web applications with Oracle, GlassFish and NetBe...
 
Java EE 7: Developing for the Cloud at Java Day, Istanbul, May 2012
Java EE 7: Developing for the Cloud at Java Day, Istanbul, May 2012Java EE 7: Developing for the Cloud at Java Day, Istanbul, May 2012
Java EE 7: Developing for the Cloud at Java Day, Istanbul, May 2012
 
PaaSing a Java EE 6 Application at Geecon 2012
PaaSing a Java EE 6 Application at Geecon 2012PaaSing a Java EE 6 Application at Geecon 2012
PaaSing a Java EE 6 Application at Geecon 2012
 
JAX-RS 2.0: RESTful Web services on steroids at Geecon 2012
JAX-RS 2.0: RESTful Web services on steroids at Geecon 2012JAX-RS 2.0: RESTful Web services on steroids at Geecon 2012
JAX-RS 2.0: RESTful Web services on steroids at Geecon 2012
 

Similar to The Java EE 7 Platform: Productivity & HTML5 at JavaOne Latin America 2012

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 JUGArun Gupta
 
Indic threads pune12-java ee 7 platformsimplification html5
Indic threads pune12-java ee 7 platformsimplification html5Indic threads pune12-java ee 7 platformsimplification html5
Indic threads pune12-java ee 7 platformsimplification html5IndicThreads
 
Java EE 7 in practise - OTN Hyderabad 2014
Java EE 7 in practise - OTN Hyderabad 2014Java EE 7 in practise - OTN Hyderabad 2014
Java EE 7 in practise - OTN Hyderabad 2014Jagadish Prasath
 
OTN Tour 2013: What's new in java EE 7
OTN Tour 2013: What's new in java EE 7OTN Tour 2013: What's new in java EE 7
OTN Tour 2013: What's new in java EE 7Bruno Borges
 
Arun Gupta: London Java Community: Java EE 6 and GlassFish 3
Arun Gupta: London Java Community: Java EE 6 and GlassFish 3 Arun Gupta: London Java Community: Java EE 6 and GlassFish 3
Arun Gupta: London Java Community: Java EE 6 and GlassFish 3 Skills Matter
 
Java EE 6 & GlassFish 3: Light-weight, Extensible, and Powerful @ JAX London ...
Java EE 6 & GlassFish 3: Light-weight, Extensible, and Powerful @ JAX London ...Java EE 6 & GlassFish 3: Light-weight, Extensible, and Powerful @ JAX London ...
Java EE 6 & GlassFish 3: Light-weight, Extensible, and Powerful @ JAX London ...Arun Gupta
 
GlassFish BOF
GlassFish BOFGlassFish BOF
GlassFish BOFglassfish
 
Java EE7
Java EE7Java EE7
Java EE7Jay Lee
 
Java EE 6 & GlassFish = Less Code + More Power @ DevIgnition
Java EE 6 & GlassFish = Less Code + More Power @ DevIgnitionJava EE 6 & GlassFish = Less Code + More Power @ DevIgnition
Java EE 6 & GlassFish = Less Code + More Power @ DevIgnitionArun Gupta
 
Java EE 6 = Less Code + More Power
Java EE 6 = Less Code + More PowerJava EE 6 = Less Code + More Power
Java EE 6 = Less Code + More PowerArun Gupta
 
Java EE 6 & GlassFish = Less Code + More Power at CEJUG
Java EE 6 & GlassFish = Less Code + More Power at CEJUGJava EE 6 & GlassFish = Less Code + More Power at CEJUG
Java EE 6 & GlassFish = Less Code + More Power at CEJUGArun Gupta
 
Java New Evolution
Java New EvolutionJava New Evolution
Java New EvolutionAllan Huang
 
Ejb 3.0 Runtime Environment
Ejb 3.0 Runtime EnvironmentEjb 3.0 Runtime Environment
Ejb 3.0 Runtime Environmentrradhak
 
Java EE 6 : Paving The Path For The Future
Java EE 6 : Paving The Path For The FutureJava EE 6 : Paving The Path For The Future
Java EE 6 : Paving The Path For The FutureIndicThreads
 
JUDCON India 2014 Java EE 7 talk
JUDCON India 2014 Java EE 7 talkJUDCON India 2014 Java EE 7 talk
JUDCON India 2014 Java EE 7 talkVijay Nair
 
Getting Started with Java EE 7
Getting Started with Java EE 7Getting Started with Java EE 7
Getting Started with Java EE 7Arun Gupta
 
Andrei Niculae - JavaEE6 - 24mai2011
Andrei Niculae - JavaEE6 - 24mai2011Andrei Niculae - JavaEE6 - 24mai2011
Andrei Niculae - JavaEE6 - 24mai2011Agora Group
 

Similar to The Java EE 7 Platform: Productivity & HTML5 at JavaOne Latin America 2012 (20)

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
 
Indic threads pune12-java ee 7 platformsimplification html5
Indic threads pune12-java ee 7 platformsimplification html5Indic threads pune12-java ee 7 platformsimplification html5
Indic threads pune12-java ee 7 platformsimplification html5
 
Java EE 7 in practise - OTN Hyderabad 2014
Java EE 7 in practise - OTN Hyderabad 2014Java EE 7 in practise - OTN Hyderabad 2014
Java EE 7 in practise - OTN Hyderabad 2014
 
Java ee7 1hour
Java ee7 1hourJava ee7 1hour
Java ee7 1hour
 
OTN Tour 2013: What's new in java EE 7
OTN Tour 2013: What's new in java EE 7OTN Tour 2013: What's new in java EE 7
OTN Tour 2013: What's new in java EE 7
 
Arun Gupta: London Java Community: Java EE 6 and GlassFish 3
Arun Gupta: London Java Community: Java EE 6 and GlassFish 3 Arun Gupta: London Java Community: Java EE 6 and GlassFish 3
Arun Gupta: London Java Community: Java EE 6 and GlassFish 3
 
Java EE 6 & GlassFish 3: Light-weight, Extensible, and Powerful @ JAX London ...
Java EE 6 & GlassFish 3: Light-weight, Extensible, and Powerful @ JAX London ...Java EE 6 & GlassFish 3: Light-weight, Extensible, and Powerful @ JAX London ...
Java EE 6 & GlassFish 3: Light-weight, Extensible, and Powerful @ JAX London ...
 
GlassFish BOF
GlassFish BOFGlassFish BOF
GlassFish BOF
 
Java EE7
Java EE7Java EE7
Java EE7
 
Java EE 7 - Overview and Status
Java EE 7  - Overview and StatusJava EE 7  - Overview and Status
Java EE 7 - Overview and Status
 
Java EE 6 & GlassFish = Less Code + More Power @ DevIgnition
Java EE 6 & GlassFish = Less Code + More Power @ DevIgnitionJava EE 6 & GlassFish = Less Code + More Power @ DevIgnition
Java EE 6 & GlassFish = Less Code + More Power @ DevIgnition
 
Java EE 6 = Less Code + More Power
Java EE 6 = Less Code + More PowerJava EE 6 = Less Code + More Power
Java EE 6 = Less Code + More Power
 
Java EE 6 & GlassFish = Less Code + More Power at CEJUG
Java EE 6 & GlassFish = Less Code + More Power at CEJUGJava EE 6 & GlassFish = Less Code + More Power at CEJUG
Java EE 6 & GlassFish = Less Code + More Power at CEJUG
 
Java New Evolution
Java New EvolutionJava New Evolution
Java New Evolution
 
Hybrid Applications
Hybrid ApplicationsHybrid Applications
Hybrid Applications
 
Ejb 3.0 Runtime Environment
Ejb 3.0 Runtime EnvironmentEjb 3.0 Runtime Environment
Ejb 3.0 Runtime Environment
 
Java EE 6 : Paving The Path For The Future
Java EE 6 : Paving The Path For The FutureJava EE 6 : Paving The Path For The Future
Java EE 6 : Paving The Path For The Future
 
JUDCON India 2014 Java EE 7 talk
JUDCON India 2014 Java EE 7 talkJUDCON India 2014 Java EE 7 talk
JUDCON India 2014 Java EE 7 talk
 
Getting Started with Java EE 7
Getting Started with Java EE 7Getting Started with Java EE 7
Getting Started with Java EE 7
 
Andrei Niculae - JavaEE6 - 24mai2011
Andrei Niculae - JavaEE6 - 24mai2011Andrei Niculae - JavaEE6 - 24mai2011
Andrei Niculae - JavaEE6 - 24mai2011
 

More from Arun Gupta

5 Skills To Force Multiply Technical Talents.pdf
5 Skills To Force Multiply Technical Talents.pdf5 Skills To Force Multiply Technical Talents.pdf
5 Skills To Force Multiply Technical Talents.pdfArun Gupta
 
Machine Learning using Kubernetes - AI Conclave 2019
Machine Learning using Kubernetes - AI Conclave 2019Machine Learning using Kubernetes - AI Conclave 2019
Machine Learning using Kubernetes - AI Conclave 2019Arun Gupta
 
Machine Learning using Kubeflow and Kubernetes
Machine Learning using Kubeflow and KubernetesMachine Learning using Kubeflow and Kubernetes
Machine Learning using Kubeflow and KubernetesArun Gupta
 
Secure and Fast microVM for Serverless Computing using Firecracker
Secure and Fast microVM for Serverless Computing using FirecrackerSecure and Fast microVM for Serverless Computing using Firecracker
Secure and Fast microVM for Serverless Computing using FirecrackerArun Gupta
 
Building Java in the Open - j.Day at OSCON 2019
Building Java in the Open - j.Day at OSCON 2019Building Java in the Open - j.Day at OSCON 2019
Building Java in the Open - j.Day at OSCON 2019Arun Gupta
 
Why Amazon Cares about Open Source
Why Amazon Cares about Open SourceWhy Amazon Cares about Open Source
Why Amazon Cares about Open SourceArun Gupta
 
Machine learning using Kubernetes
Machine learning using KubernetesMachine learning using Kubernetes
Machine learning using KubernetesArun Gupta
 
Building Cloud Native Applications
Building Cloud Native ApplicationsBuilding Cloud Native Applications
Building Cloud Native ApplicationsArun Gupta
 
Chaos Engineering with Kubernetes
Chaos Engineering with KubernetesChaos Engineering with Kubernetes
Chaos Engineering with KubernetesArun Gupta
 
How to be a mentor to bring more girls to STEAM
How to be a mentor to bring more girls to STEAMHow to be a mentor to bring more girls to STEAM
How to be a mentor to bring more girls to STEAMArun Gupta
 
Java in a World of Containers - DockerCon 2018
Java in a World of Containers - DockerCon 2018Java in a World of Containers - DockerCon 2018
Java in a World of Containers - DockerCon 2018Arun Gupta
 
The Serverless Tidal Wave - SwampUP 2018 Keynote
The Serverless Tidal Wave - SwampUP 2018 KeynoteThe Serverless Tidal Wave - SwampUP 2018 Keynote
The Serverless Tidal Wave - SwampUP 2018 KeynoteArun Gupta
 
Introduction to Amazon EKS - KubeCon 2018
Introduction to Amazon EKS - KubeCon 2018Introduction to Amazon EKS - KubeCon 2018
Introduction to Amazon EKS - KubeCon 2018Arun Gupta
 
Mastering Kubernetes on AWS - Tel Aviv Summit
Mastering Kubernetes on AWS - Tel Aviv SummitMastering Kubernetes on AWS - Tel Aviv Summit
Mastering Kubernetes on AWS - Tel Aviv SummitArun Gupta
 
Top 10 Technology Trends Changing Developer's Landscape
Top 10 Technology Trends Changing Developer's LandscapeTop 10 Technology Trends Changing Developer's Landscape
Top 10 Technology Trends Changing Developer's LandscapeArun Gupta
 
Container Landscape in 2017
Container Landscape in 2017Container Landscape in 2017
Container Landscape in 2017Arun Gupta
 
Java EE and NoSQL using JBoss EAP 7 and OpenShift
Java EE and NoSQL using JBoss EAP 7 and OpenShiftJava EE and NoSQL using JBoss EAP 7 and OpenShift
Java EE and NoSQL using JBoss EAP 7 and OpenShiftArun Gupta
 
Docker, Kubernetes, and Mesos recipes for Java developers
Docker, Kubernetes, and Mesos recipes for Java developersDocker, Kubernetes, and Mesos recipes for Java developers
Docker, Kubernetes, and Mesos recipes for Java developersArun Gupta
 
Thanks Managers!
Thanks Managers!Thanks Managers!
Thanks Managers!Arun Gupta
 
Migrate your traditional VM-based Clusters to Containers
Migrate your traditional VM-based Clusters to ContainersMigrate your traditional VM-based Clusters to Containers
Migrate your traditional VM-based Clusters to ContainersArun Gupta
 

More from Arun Gupta (20)

5 Skills To Force Multiply Technical Talents.pdf
5 Skills To Force Multiply Technical Talents.pdf5 Skills To Force Multiply Technical Talents.pdf
5 Skills To Force Multiply Technical Talents.pdf
 
Machine Learning using Kubernetes - AI Conclave 2019
Machine Learning using Kubernetes - AI Conclave 2019Machine Learning using Kubernetes - AI Conclave 2019
Machine Learning using Kubernetes - AI Conclave 2019
 
Machine Learning using Kubeflow and Kubernetes
Machine Learning using Kubeflow and KubernetesMachine Learning using Kubeflow and Kubernetes
Machine Learning using Kubeflow and Kubernetes
 
Secure and Fast microVM for Serverless Computing using Firecracker
Secure and Fast microVM for Serverless Computing using FirecrackerSecure and Fast microVM for Serverless Computing using Firecracker
Secure and Fast microVM for Serverless Computing using Firecracker
 
Building Java in the Open - j.Day at OSCON 2019
Building Java in the Open - j.Day at OSCON 2019Building Java in the Open - j.Day at OSCON 2019
Building Java in the Open - j.Day at OSCON 2019
 
Why Amazon Cares about Open Source
Why Amazon Cares about Open SourceWhy Amazon Cares about Open Source
Why Amazon Cares about Open Source
 
Machine learning using Kubernetes
Machine learning using KubernetesMachine learning using Kubernetes
Machine learning using Kubernetes
 
Building Cloud Native Applications
Building Cloud Native ApplicationsBuilding Cloud Native Applications
Building Cloud Native Applications
 
Chaos Engineering with Kubernetes
Chaos Engineering with KubernetesChaos Engineering with Kubernetes
Chaos Engineering with Kubernetes
 
How to be a mentor to bring more girls to STEAM
How to be a mentor to bring more girls to STEAMHow to be a mentor to bring more girls to STEAM
How to be a mentor to bring more girls to STEAM
 
Java in a World of Containers - DockerCon 2018
Java in a World of Containers - DockerCon 2018Java in a World of Containers - DockerCon 2018
Java in a World of Containers - DockerCon 2018
 
The Serverless Tidal Wave - SwampUP 2018 Keynote
The Serverless Tidal Wave - SwampUP 2018 KeynoteThe Serverless Tidal Wave - SwampUP 2018 Keynote
The Serverless Tidal Wave - SwampUP 2018 Keynote
 
Introduction to Amazon EKS - KubeCon 2018
Introduction to Amazon EKS - KubeCon 2018Introduction to Amazon EKS - KubeCon 2018
Introduction to Amazon EKS - KubeCon 2018
 
Mastering Kubernetes on AWS - Tel Aviv Summit
Mastering Kubernetes on AWS - Tel Aviv SummitMastering Kubernetes on AWS - Tel Aviv Summit
Mastering Kubernetes on AWS - Tel Aviv Summit
 
Top 10 Technology Trends Changing Developer's Landscape
Top 10 Technology Trends Changing Developer's LandscapeTop 10 Technology Trends Changing Developer's Landscape
Top 10 Technology Trends Changing Developer's Landscape
 
Container Landscape in 2017
Container Landscape in 2017Container Landscape in 2017
Container Landscape in 2017
 
Java EE and NoSQL using JBoss EAP 7 and OpenShift
Java EE and NoSQL using JBoss EAP 7 and OpenShiftJava EE and NoSQL using JBoss EAP 7 and OpenShift
Java EE and NoSQL using JBoss EAP 7 and OpenShift
 
Docker, Kubernetes, and Mesos recipes for Java developers
Docker, Kubernetes, and Mesos recipes for Java developersDocker, Kubernetes, and Mesos recipes for Java developers
Docker, Kubernetes, and Mesos recipes for Java developers
 
Thanks Managers!
Thanks Managers!Thanks Managers!
Thanks Managers!
 
Migrate your traditional VM-based Clusters to Containers
Migrate your traditional VM-based Clusters to ContainersMigrate your traditional VM-based Clusters to Containers
Migrate your traditional VM-based Clusters to Containers
 

Recently uploaded

08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 

Recently uploaded (20)

08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 

The Java EE 7 Platform: Productivity & HTML5 at JavaOne Latin America 2012

  • 1. The Java EE 7 Platform: Productivity and HTML5 Arun Gupta (@arungupta) Java EE & GlassFish Guy 1 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 2. 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 Oracle s products remains at the sole discretion of Oracle. 2 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 3. Java EE 6 Platform December 10, 2009 3 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 4. Java EE 6 – Key Statistics •  40+ Million Java EE 6 Component Downloads •  #1 Choice for Enterprise Developers •  #1 Application Development Platform •  Fastest implementation of a Java EE release 4 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 5. Top Ten Features in Java EE 6 1.  EJB packaging in a WAR 2.  Type-safe dependency injection 3.  Optional deployment descriptors (web.xml, faces-config.xml) 4.  JSF standardizing on Facelets 5.  One class per EJB 6.  Servlet and CDI extension points 7.  CDI Events 8.  EJBContainer API 9.  Cron-based @Schedule! 10. Web Profile 5 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 6. Java EE 7 Revised Scope Productivity and HTML5 •  Higher Productivity –  Less Boilerplate –  Richer Functionality –  More Defaults •  HTML5 Support –  WebSocket –  JSON –  HTML5 Forms 6 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 7. Java EE 7 – Candidate JSRs JAX-RS Java Caching API JSP 2.2 JSF 2.2 2.0 EL 3.0 (JSR 107) Portable Extensions Bean Validation 1.1 Concurrency Utilities Servlet 3.1 (JSR 236) Common Batch Applications Interceptors 1.1 CDI 1.1 (JSR 352) Annotations 1.1 Java API for JSON Managed Beans 1.0 EJB 3.2 (JSR 353) Connector Java API for WebSocket JPA 2.1 JTA 1.2 JMS 2.0 (JSR 356) 1.6 New Major Updated Release 7 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 8. Java API for RESTful Web Services 2.0 •  Client API •  Message Filters & Entity Interceptors •  Asynchronous Processing – Server & Client •  Hypermedia Support •  Common Configuration 8 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 9. Java API for RESTful Web Services 2.0 Client API - Before String address = String.format("http://…/orders/%0$s/customer?shipped= %1$b", "10", true);
 ! URL url = new URL(address);! HttpURLConnection conn = (HttpURLConnection) url.openConnection();! conn.setRequestMethod("GET");! conn.setDoInput(true);! conn.setDoOutput(false);! ! BufferedReader br = new BufferedReader(
 new InputStreamReader(conn.getInputStream()));! String line;! while ((line = br.readLine()) != null) {! //. . .! }! 9 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 10. Java API for RESTful Web Services 2.0 Client API - Now // Get instance of Client Client client = ClientFactory.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);! 10 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 11. Java API for RESTful Web Services 2.0 Filters @Provider
 class LoggingFilter implements ContainerRequestFilter {!     @Override
     public void filter(ContainerRequestContext context) {
         logRequest(ctx.getRequest());
 // non-wrapping => returns without invoking next filter
     }
 }! 11 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 12. Java API for RESTful Web Services 2.0 Client-side Async Client client = ClientFactory.newClient();
 Future<String> future = client.target("http://.../atm/{card}/balance")
                               .pathParam("card", "1111222233334444")
                               .queryParam("pin", "1234")
                               .request("text/plain")
                               .async()
                               .get(
 new InvocationCallback<String>() {
 public void completed(String result) {
 }
 
 public void failed(InvocationException e) {
 }
 }
 );! 12 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 13. Java Message Service 2.0 Simplify the existing API •  Less verbose •  Reduce boilerplate code •  Resource injection •  Connection, Session, and other objects are AutoCloseable •  Requires Resource Adapter for Java EE containers •  Simplified API in both Java SE and EE 13 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 14. Java Message Service 2.0 Sending message using JMS 1.1 @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);! 13 lines of messageProducer.send(textMessage);# } finally {! code just connection.close();! to send a }! } catch (JMSException ex) {! message Logger.getLogger(getClass().getName()).log(Level.SEVERE, null, ex);! }! } ! 14 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 15. Java Message Service 2.0 Sending message using JMS 1.1 must create several intermediate objects @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);! }! } ! 15 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 16. Java Message Service 2.0 Sending message using JMS 1.1 redundant and @Resource(lookup = "java:global/jms/demoConnectionFactory")! ConnectionFactory connectionFactory;! misleading ! arguments @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);! }! } ! 16 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 17. Java Message Service 2.0 Sending message using JMS 1.1 @Resource(lookup = "java:global/jms/demoConnectionFactory")! ConnectionFactory connectionFactory;! boilerplate ! @Resource(lookup = "java:global/jms/demoQueue")! code 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);! }! } ! 17 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 18. Java Message Service 2.0 Sending message using JMS 1.1 @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 {# must close connection.close();# }# resources } catch (JMSException ex) {! after use! Logger.getLogger(getClass().getName()).log(Level.SEVERE, null, ex);! }! } ! 18 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 19. Java Message Service 2.0 Sending message using JMS 1.1 @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);! all methods } finally {! throw checked connection.close();! }! exceptions } catch (JMSException ex) {! Logger.getLogger(getClass().getName()).log(Level.SEVERE, null, ex);! }! } ! 19 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 20. Java Message Service 2.0 Sending message using JMS 1.1 @Resource(lookup = "java:global/jms/demoConnectionFactory")# ConnectionFactory connectionFactory;# pre-create app- # server specific @Resource(lookup = "java:global/jms/demoQueue")# resources 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);! }! } ! 20 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 21. Java Message Service 2.0 Simpler API to close JMS objects Create closeable resources in a try- @Resource(lookup = "jms/connFactory")
 with-resources block ConnectionFactory cf; ! @Resource(lookup="jms/inboundQueue")! Destination dest;! ! public void sendMessage (String payload) throws JMSException {! try ( Connection conn = connectionFactory.createConnection(); # Session session = conn.createSession();# MessageProducer producer = session.createProducer(dest);# ){ ! Message mess = sess.createTextMessage(payload); ! close() is called producer.send(mess); ! automatically } catch(JMSException e){ ! at end of block // exception handling ! }
 }! 21 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 22. Java Message Service 2.0 JMSContext Introducing JMSContext and JMSProducer combines Connection and Session @Resource(lookup = "java:global/jms/demoConnectionFactory")! ConnectionFactory connectionFactory; ! ! Payload @Resource(lookup = "java:global/jms/demoQueue")! can be sent Queue demoQueue;! directly ! public void sendMessage (String payload) {! try (JMSContext context = connectionFactory.createContext();){! context.createProducer().send(demoQueue, payload);# } catch (JMSRuntimeException ex) {! // exception handling! }! close() is called }! automatically No checked at end of block exceptions thrown 22 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 23. Java Message Service 2.0 Default resource definition Default resource definition Or @JmsConnectionFactory# @Inject
 JMSContext context;! ! @Resource(lookup = "java:global/jms/demoQueue”)
 Queue demoQueue;! ! public void sendMessage(String payload) {! context.createProducer().send(demoQueue, payload);! }! 13 lines è1 line# 23 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 24. Java API for JSON Processing 1.0 •  API to parse and generate JSON •  Streaming API –  Low-level, efficient way to parse/generate JSON –  Provides pluggability for parsers/generators •  Object Model –  Simple, easy-to-use high-level API –  Implemented on top of Streaming API •  Binding JSON to Java objects forthcoming 24 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 25. Java API for JSON Processing 1.0 Streaming API – JsonParser and JsonGenerator •  JsonParser –  Parses JSON in a streaming way from input sources •  Similar to StaX’s XMLStreamReader, a pull parser –  Created using •  Json.createParser(…)! •  Json.createParserFactory().createParser(…)! –  Parser state events •  START_ARRAY, END_ARRAY, START_OBJECT, END_OBJECT, ... 25 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 26. Java API for JSON Processing 1.0 Streaming API – JsonParser and JsonGenerator •  JsonGenerator –  Generates JSON in a streaming way to output sources •  Similar to StaX’s XMLStreamWriter –  Created using •  Json.createGenerator(…)! •  Json.createGeneratorFactory().createGenerator(…)! –  Optionally, configured with features •  E.g. for pretty printing 26 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 27. Java API for JSON Processing 1.0 Streaming API – JsonGenerator 
 JsonGenerator jg = Json.createGenerator(…);
 "phoneNumber": [! 
 { 
 jg.
 "type": "home", 
 .beginArray("phoneNumber")
 "number": ”408-123-4567”
 .beginObject() 
 },! .add("type", "home") 
 {
 .add("number", "408-123-4567") 
 "type": ”work", 
 .endObject() 
 "number": ”408-987-6543”
 .beginObject() 
 }! .add("type", ”work") 
 ]! .add("number", "408-987-6543") 
 .endObject() 
 .endArray();
 jg.close(); ! 27 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 28. Java API for JSON Processing 1.0 Object Model API •  JsonObject/JsonArray – JSON object and array structures –  JsonString and JsonNumber for string and number values •  JsonBuilder – Builds JsonObject and JsonArray •  JsonReader – Reads JsonObject and JsonArray from input source •  JsonWriter – Writes JsonObject and JsonArray to output source 28 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 29. Java API for JSON Processing 1.0 DOM API – JsonReader •  Reads JsonObject and JsonArray from input source –  i/o Reader, InputStream (+ encoding) •  Optionally, configured with features •  Uses pluggable JsonParser! // Reads a JSON object try(JsonReader reader = new JsonReader(io)) {! JsonObject obj = reader.readObject();! }! ! 29 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 30. Java API for WebSocket 1.0 •  Create WebSocket Client/Endpoints –  Annotation-driven (@WebSocketEndpoint) –  Interface-driven (Endpoint) •  Integration with Java EE Web container 30 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 31. Java API for WebSocket 1.0 Hello World – POJO/Annotation-driven import javax.net.websocket.annotations.*;
 
 @WebSocketEndpoint("/hello")
 public class HelloBean {
 
 @WebSocketMessage
 public String sayHello(String name) {
 return “Hello “ + name;
 }
 }! 31 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 32. Java API for WebSocket 1.0 WebSocket Annotations Annotation Level Purpose @WebSocketEndpoint! class Turns a POJO into a WebSocket Endpoint @WebSocketOpen! method Intercepts WebSocket Open events @WebSocketClose! method Intercepts WebSocket Close events @WebSocketMessage! method Intercepts WebSocket Message events method @WebSocketPathParam! Flags a matched path segment of a URI-template parameter @WebSocketError! method Intercepts errors during a conversation 32 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 33. Java API for WebSocket 1.0 @WebSocketEndpoint Attributes Relative URI or URI template value! e.g. /hello or /chat/{subscriber-level} decoders! list of message decoder classnames encoders! list of message encoder classnames subprotocols! list of the names of the supported subprotocols 33 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 34. Bean Validation 1.1 •  Open: Spec, Reference Implementation, TCK •  Alignment with Dependency Injection •  Method-level validation –  Constraints on parameters and return values –  Check pre-/post-conditions 34 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 35. Bean Validation 1.1 Method Parameter and Result Validation Need more slides here public void placeOrder( 
 @NotNull String productName,
 Built-in @NotNull @Max(“10”) Integer quantity,
 Custom @Customer String customer) { 
 //. . .
 }! @Future
 public Date getAppointment() {
 //. . .
 }! 35 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 36. Batch Applications for the Java Platform 1.0 •  Suited for non-interactive, bulk-oriented and long-running tasks •  Computationally intensive •  Can execute sequentially/parallel •  May be initiated –  Adhoc –  Scheduled •  No scheduling APIs included 36 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 37. Batch Applications for the Java Platform 1.0 Concepts •  Job: Entire batch process –  Put together through a Job Specification Language (XML) •  Step: Independent, sequential phase of a job –  ItemReader: Retrieval of input for a step, one at a time –  ItemProcessor: Business processing of an item –  ItemWriter: Output of an item, chunks of items at a time •  JobOperator: Manage batch processing •  JobRepository: Metadata for jobs 37 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 38. Batch Applications for the Java Platform 1.0 Job Specification Language – Simple Job <job id=“myJob”>
 <step id=“init”>
 <chunk reader=“R” writer=W” processor=“P” />
 <next on=“initialized” to=“process”/>
 <fail on=“initError”/>
 </step>
 <step id=“process”>
 <batchlet ref=“ProcessAndEmail”/>
 <end on=”success”/>
 <fail on=”*” exit-status=“FAILURE”/>
 </step>
 </job> ! 38 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 39. Batch Applications for the Java Platform 1.0 Job Specification Language – Chunked Step <step id=”sendStatements”>! @ReadItem
 <chunk reader=”AccountReader”! public Account readAccount() {
 processor=”AccountProcessor”
 // read account using JPA! writer=”EmailWriter”! }! chunk-size=”10” />! ! </step>! @ProcessItem# public Account processAccount(Account account) {
 // calculate balance! }! @WriteItems# ! public void sendEmail(List<Account> accounts) {
 // use JavaMail to send email! }! ! 39 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 40. Java Temporary Caching API 1.0 •  API and semantics for temporary, in-memory caching of Java objects •  SPI for implementers •  Designed to support “local” and “distributed” caching •  Caching strategies supported –  By value (default) –  By reference (not suitable for “distributed” caching) 40 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 41. Java Temporary Caching API 1.0 •  javax.cache.*! •  Delivered as part of Java EE 7 –  Immediately usable by Java EE 6, Spring and Guice –  Immediately usable by any Java app •  Not a Data Grid specification –  JSR 107 does not mandate a topology –  JSR 347 does: builds on JSR 107 41 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 42. Java Temporary Caching API 1.0 Key Concepts •  Cache Manager =>Caches •  Cache => Entries •  Entry => Key,Value •  CacheManager acquired via CacheManagerFactory! •  CacheManagerFactory acquired via Service Provider –  META-INF/services/javax.cache.spi.CachingProvider! 42 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 43. Java Temporary Caching API 1.0 Code Sample – Blog public class BlogManager { ! @CachePut(cacheName=”blogManager”)
 public void createEntry(
 @CacheKeyParam String title,
 @CacheValue Blog blog) {...}
 
 . . .! 43 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 44. Java Temporary Caching API 1.0 Code Sample – Blog . . .
 
 @CacheResult(cacheName="blogManager") 
 public Blog getBlogEntry(String title) {...} ! 
 @CacheResult(cacheName="blogManager") 
 public Blog getEntryCached(
 String randomArg, 
 @CacheKeyParam String title) {...}
 
 . . .! 44 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 45. Java Temporary Caching API 1.0 Annotations – Blog Sample . . .
 
 @CacheRemoveEntry(cacheName="blogManager") 
 public void removeBlogEntry(String title) {...} 
 ! @CacheRemoveAll(cacheName="blogManager") 
 public void removeAllBlogs() {...}! } ! 45 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 46. Java Persistence API 2.1 •  Schema Generation •  Unsynchronized Persistence Contexts •  Converters •  Bulk update/delete using Criteria! •  User-defined functions using FUNCTION •  Stored Procedure Query 46 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 47. Java Persistence API 2.1 Schema Generation •  What: Generation of database artifacts –  Tables, indexes, constraints, generators, … •  Scenarios: Iterative prototyping, production, database provisioning (e.g. in cloud) •  To: Database, DDL, Both •  From: O/R mapping metadata, SQL DDL scripts •  When: Prior to app deployment 47 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 48. Java Persistence API 2.1 Schema Generation Properties •  javax.persistence.schema-generation-action! –  “none”, “create”, “drop-and-create”, “drop” •  javax.persistence.schema-generation-target! –  “database”, “scripts”, “database-and-scripts” •  javax.persistence.ddl-create-script-target/source! •  javax.persistence.ddl-drop-script-target/source! •  javax.persistence.sql-load-script-source! •  . . .! 48 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 49. Java Persistence API 2.1 Schema Generation Example from ORM Metadata // mapped to EMPLOYEE table in default schema @Entity public class Employee {# @Id private int id; // mapped to ID column as primary key private String name; // mapped to NAME column, VARCHAR(255) ...# @ManyToOne // mapped to DEPT_ID foreign key column private Department dept;# ...# }# 49 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 50. Enterprise JavaBeans 3.2 EJBs Today •  @Singleton! •  @Asynchronous! •  @Schedule! •  Portable JNDI Name •  EJBContainer.createEJBContainer! •  EJB 3.1 Lite 50 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 51. Enteprise JavaBeans 3.2 Updates: Opt-in Transactions in SFSB Lifecycle Callbacks @Stateful
 public class HelloBean {
 
 @PersistenceContext(type=PersistenceContextType.EXTENDED)
 private EntityManager em;! ! @TransactionAttribute(TransactionAttributeType.REQUIRES_NEW)# @PostConstruct# public void init() { . . . }! 
 @TransactionAttribute(TransactionAttributeType.REQUIRES_NEW)
 @PreDestroy# public void destroy () { . . . }! 51 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 52. Enterprise JavaBeans 3.2 Updates: Opt-out passivation of Stateful Session Beans @Stateful(passivationCapable=false)# public class HelloBean {! private NonSerializableType ref = …;! ! …! }! 52 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 53. Enterprise JavaBeans 3.2 Updates: Simplified Rules for Local/Remote Client Views @Stateless
 public class Bean implements Foo, Bar {
 }! Local @Local @Stateless
 public class Bean implements Foo, Bar {
 }! Remote @Remote @Stateless
 public class Bean implements Foo, Bar {
 }! 53 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 54. Enterprise JavaBeans 3.2 Updates: Simplified Rules for Local/Remote Client Views @Remote
 public interface Foo { . . . }
 
 public interface Bar { . . . ]
 
 Remote @Stateless
 public class Bean implements Foo, Bar {
 }! 54 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 55. Servlet 3.1 •  Non-blocking I/O •  Protocol Upgrade •  Security Enhancements 55 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 56. 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) {
 . . .
 }
 }
 }! 56 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 57. Servlet 3.1 Non-blocking I/O: doGet Code Sample AsyncContext context = request.startAsync();
 ServletInputStream input = request.getInputStream();
 input.setReadListener(
 new MyReadListener(input, context)); ! 57 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 58. 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) {
 . . .
 }
 }
 . . .
 58 ! Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 59. 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();
 } ! 59 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 60. Concurrency Utilities for Java EE 1.0 Goals •  Provide concurrency capabilities to Java EE application components –  Without compromising container integrity •  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) 60 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 61. Concurrency Utilities for Java EE 1.0 ManagedExecutorService •  Manageable version of java.util.concurrent.ExecutorService –  Lookup using JNDI •  Java EE components create task classes –  Implement java.lang.Runnable or java.util.concurrent.Callable! •  Submitted using submit or invoke methods •  Multiple (configurable) executors are permitted 61 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 62. Concurrency Utilities for Java EE 1.0 Defining ManagedExecutorService using JNDI •  Recommended to bind in java:comp/env/concurrent subcontext <resource-env-ref>
 <resource-env-ref-name>
 concurrent/BatchExecutor
 </resource-env-ref-name>
 <resource-env-ref-type>
 javax.enterprise.concurrent.ManagedExecutorService
 </resource-env-ref-type>
 </resource-env-ref>! 62 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 63. Concurrency Utilities for Java EE 1.0 Submit Tasks to ManagedExecutorService using JNDI public class TestServlet extends HTTPServlet {
 @Resource(name=“concurrent/BatchExecutor”)
 ManagedExecutorService executor;
 
 Future future = executor.submit(new MyTask());
 
 class MyTask implements Runnable {
 public void run() { 
 . . . // task logic
 }
 }
 }
 63 ! Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 64. Concurrency Utilities for Java EE 1.0 ManagedThreadFactory •  Provides a method for creating threads for execution in a managed environment •  Lookup using JNDI <resource-env-ref>
 <resource-env-ref-name>
 concurrent/LoggerThreadFactory
 </resource-env-ref-name>
 <resource-env-ref-type>
 javax.enterprise.concurrent.ManagedThreadFactory
 </resource-env-ref-type>
 </resource-env-ref>! 64 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 65. Concurrency Utilities for Java EE 1.0 ManagedThreadFactory Sample @Resource(“concurrent/LoggerThreadFactory”)
 ManagedThreadFactory threadFactory;# 
 LoggerTask task = new LoggerTask();
 Thread thread = threadFactory.newThread(task);
 
 LoggerTask implements Runnable {
 public void run() { . . . }
 }! 65 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 66. Java Transaction API 1.2 •  Declarative transactions outside EJB –  Based on CDI interceptors •  Add annotation and standard values to javax.transaction package 66 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 67. Java Transaction API 1.2 public @interface Transactional {
 TxType value() default TxType.REQUIRED
 }! public enum TxType {
 REQUIRED,
 REQUIRED_NEW,
 MANDATORY,
 SUPPORTS,
 NOT_SUPPORTED,
 NEVER
 }! ! 67 ! Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 68. Java Transaction API 1.2 public class ShoppingCart {! ...! @Transactional
 public void checkOut() {...}! ...! }! 68 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 69. JavaServer Faces 2.2 •  HTML5 Friendly Markup Support –  Pass through attributes and elements •  Faces Flows •  Cross Site Request Forgery Protection •  Loading Facelets via ResourceHandler! •  File Upload Component •  Multi-templating 69 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 70. Contexts & Dependency Injection 1.1 •  Embedded mode to startup outside Java EE container •  Global ordering of interceptors and decorators •  API for managing built-in contexts •  Send Servlet events as CDI events •  . . . 70 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 71. Java EE 7 – Implementation Status 4.0 download.java.net/glassfish/4.0/promoted/ 71 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 72. Java EE 8 and Beyond Standards-based cloud programming model •  Deliver cloud architecture Storage NoSQL •  Multi tenancy for SaaS JSON-B Multitenancy Java EE 7 applications Concurrency Cloud PaaS •  Incremental delivery of JSRs Enablement Thin Server Architecture •  Modularity based on Jigsaw 72 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 73. Call to Action •  Java EE 7 Expert Group –  javaee-spec.java.net •  Java EE 7 Reference Implementation –  glassfish.org •  The Aquarium –  blogs.oracle.com/theaquarium •  Adopt-a-JSR –  glassfish.org/adoptajsr 73 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 74. Transparency •  Oracle’s 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… •  Publicly viewable Expert Group mail archive –  Users observer list gets copies of all Expert Group emails •  Publicly viewable download area •  Publicly viewable issue tracker •  Commitment to update to JCP 2.8 Process 74 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 75. Status and Schedule •  All JSRs up and running •  All Early Drafts, several Public Drafts •  Final release target: Q2 2013 75 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 76. GlassFish Roadmap GlassFish v3 GlassFish Server 3.1 GlassFish Server 3.1.2 •  Java EE 6 support •  Centralized administration •  Bug Fixes •  Single instance •  Clustering / HA •  Incremental features •  GlassFish Enterprise Mgr •  GlassFish Server Control 2009 2010 2011 2012 2013 GlassFish Server 3.0.1 GlassFish Server 3.1.1 GlassFish Server 4 •  Oracle branding •  Bug fixes •  Java EE 7 •  Oracle platform support •  Updated components •  Multitenancy •  Oracle interoperability •  Incremental features •  PaaS-enablement 76 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 77. Graphic Section Divider 77 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.