Insert Information Protection Policy Classification from Slide 13 2 As novidades do Java EE 7: do HTML5 ao JMS 2.0 Bruno Borges Oracle Product Manager Java Evangelist Insert Picture Here
Insert Information Protection Policy Classification from Slide 13 5 Java EE 7: quais as novidades? Servlet 3.1 Java API for JSON Processing 1.0 Bean Validation 1.1 Batch Applications API 1.0 Java Persistence API 2.1 Concurrency Utilities for Java EE 1.0 E muito mais... :-)
Insert Information Protection Policy Classification from Slide 13 6 Java EE 7: quais as novidades? Web Profile updated to include – JAX-RS – WebSocket – JSON-P – EJB 3.2 Lite Outras APIs
Insert Information Protection Policy Classification from Slide 13 8 WebSockets 1.0 API para definir WebSockets, tanto Client como Server – Annotation-driven (@ServerEndpoint) – Interface-driven (Endpoint) – Client (@ClientEndpoint) SPI para data frames – Negociação handshake na abertura do WebSocket Integração com o Java EE Web container
Insert Information Protection Policy Classification from Slide 13 12 Maven Archetype para o Java EE 7 Maven Archetypes para Java EE 7 – http://mojo.codehaus.org Maven Archetype com o Embedded GlassFish configurado – http://github.com/brunoborges/javaee7-archetype Só precisa... – $ mvn package embedded-glassfish:run
Insert Information Protection Policy Classification from Slide 13 15 JAX-RS 2.0 - Client // Get instance of Client Client client = ClientFactory.getClient(); // Get customer name for the shipped products String name = client.target(“http://.../orders/{orderId}/customer”) .resolveTemplate(“orderId”, “10”) .queryParam(“shipped”, “true)” .request() .get(String.class);
Insert Information Protection Policy Classification from Slide 13 18 JSON API 1.0 JsonParser – Processa JSON em modo “streaming” – Similar ao XMLStreamReader do StaX Como criar – Json.createParser(...) – Json.createParserFactory().createParser(...) Eventos do processador – START_ARRAY, END_ARRAY, START_OBJECT, END_OBJECT, ...
Insert Information Protection Policy Classification from Slide 13 21 Java Message Service API 2.0 Simplificação da JMS API 1.1 sem quebrar compatibilidade Nova API requer menos objetos – JMSContext, JMSProducer... No Java EE, permite que JMSContext seja injetado e gerenciado pelo container, usando CDI Objetos JMS implementam AutoCloseable Envio Async de mensagens
Insert Information Protection Policy Classification from Slide 13 22 Java Message Service API 2.0 JMSContext Encapsula Connection e Session Criado a partir de um default ConnectionFactory – Permite especificar um ConnectionFactory também Unchecked exceptions Suporta encadeamento de métodos, para fluid style
Insert Information Protection Policy Classification from Slide 13 30 GlassFish 4.0, NetBeans, e Java EE 7 Java EE 7 Expert Group Project – http://javaee-spec.java.net GlassFish 4.0 - Java EE 7 Reference Implementation – http://www.glassfish.org Adopt a JSR – http://glassfish.org/adoptajsr NetBeans e Java EE 7 – http://wiki.netbeans.org/JavaEE7
Insert Information Protection Policy Classification from Slide 13 31 GlassFish 4.0, NetBeans, e Java EE 7 JUGs participando ativamente Promovendo as JSRs – Para a comunidade Java – Revendo specs – Testando betas e códigos de exemplo – Examplos, docs, bugs – Blogging, palestrando, reuniões de JUG
Insert Information Protection Policy Classification from Slide 13 34 The preceding 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.