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

Slides:



Advertisements
Similar presentations
4 Copyright © 2005, Oracle. All rights reserved. Creating the Web Tier: Servlets.
Advertisements

11 Copyright © 2005, Oracle. All rights reserved. Creating the Business Tier: Enterprise JavaBeans.
JSP and web applications
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 1.
Web Services Web Services are the basic fundamental building blocks of invoking features that can be accessed by an application program. The accessibility.
 2002 Prentice Hall. All rights reserved. Chapter 9: Servlets Outline 9.1 Introduction 9.2 Servlet Overview and Architecture Interface Servlet and.
MVC in JavaEE 8 Manfred Riem Principal Member of Technical Staff September, 2014 Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
JSF 2.2 in Action Kito D. Mann Principal Consultant.
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.Public 1 JavaScript/HTML5 Rich Clients Using Java EE 7 Reza Rahman Java EE/GlassFish.
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 13 1.
 Java EE 7 The new features of the upcoming Enterprise Edition.
A Java Architecture for the Internet of Things Noel Poore, Architect Pete St. Pierre, Product Manager Java Platform Group, Internet of Things September.
Oracle Cloud Marketplace Neelesh Gurnani Director, Product Development Arif Khan Director, Product Management September 29, 2014 Copyright © 2014, Oracle.
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 13 1.
Introduction to Servlets Based on: Hall, Brown, Core Servlets and JavaServer Pages.
An architecture for webb applications, J2EE
Introduction to Enterprise JavaBeans. Integrating Software Development Server-side Component Model Distributed Object Architecture –CORBA –DCOM –Java.
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | 2 Hidden Gems of APEX David Gale Software Engineer Oracle Application Express November,
The Safe Harbor The following is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated.
1.
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.Public 1 Testing Java EE Applications using Arquillian Reza Rahman Java EE/GlassFish.
Accelerate your SaaS Integration The Cloud Adapter SDK Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
© Internna Technologies 1 IWebMvc Features, Possibilities & Goals.
Gayle J Yaverbaum, PhD Professor of Information Systems Penn State Harrisburg.
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. JD Edwards Summit PaaS from an Applications Perspective Charles McGuinness Director,
1 WebSocket & JSON Java APIs Hackday By Somay David
Java EE 7 Overview Hamed Hatami January 2014 from Iran JUG.
JavaServer Faces: The Fundamentals Compiled from Sun TechDays workshops (JSF Basics, Web-Tier Codecamp: JavaServer Faces, Java Studio Creator; IBM RAD)
MVC 1.0 Manfred Riem Oracle Geertjan Wielenga Oracle Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
CSCI 6962: Server-side Design and Programming Course Introduction and Overview.
1Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 8 Reporting from Contract.
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.Public 1.
Oracle E-Business Suite Order Management: Presenting the HTML and Mobile User Experience Durgaprasad Bodapati Director, Product Management Bhavana Sharma.
Chapter 4: Core Web Technologies
Enterprise Java Bean Matt. 2 J2EE 3 J2EE Overview.
Message-Driven Beans and EJB Security Lesson 4B / Slide 1 of 37 J2EE Server Components Objectives In this lesson, you will learn about: Identify features.
J2EE Structure & Definitions Catie Welsh CSE 432
Enterprise Java v120131Intro to JavaEE1 Java EE 5 TM Introduction.
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 1 Quick Tutorial – Part 2 Open Data Web Services for Oracle BPM August, 2013 Forms.
1Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 8 Contract Management.
Web Server Programming 1. Nuts and Bolts. Premises of Course Provides general introduction, no in-depth training Assumes some HTML knowledge Assumes some.
Source: Peter Eeles, Kelli Houston, and Wojtek Kozaczynsky, Building J2EE Applicationa with the Rational Unified Process, Addison Wesley, 2003 Prepared.
Java Servlets and Java Server Pages Norman White Stern School of Business.
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 1.
RIA and Web2.0 Development with no Coding Juan Camilo Ruiz Senior Product Manager Development Tools.
1 Java Servlets l Servlets : programs that run within the context of a server, analogous to applets that run within the context of a browser. l Used to.
Workforce Scheduling Release 5.0 for Windows Implementation Overview OWS Development Team.
Assignment of JAVA id : BSSE-F10-M-10-JAVA1 Overview of J2EE/Session 2/Slide 1 of 38.
© FPT SOFTWARE – TRAINING MATERIAL – Internal use 04e-BM/NS/HDCV/FSOFT v2/3 JSP Application Models.
CSI 3125, Preliminaries, page 1 SERVLET. CSI 3125, Preliminaries, page 2 SERVLET A servlet is a server-side software program, written in Java code, that.
COMP9321 Web Application Engineering Semester 2, 2015 Dr. Amin Beheshti Service Oriented Computing Group, CSE, UNSW Australia Week 3 1COMP9321, 15s2, Week.
Preface IIntroduction Objectives I-2 Course Overview I-3 1Oracle Application Development Framework Objectives 1-2 J2EE Platform 1-3 Benefits of the J2EE.
Using WebSockets in Web apps Presenter: Shahzad Badar.
Introduction to EJB. What is an EJB ?  An enterprise java bean is a server-side component that encapsulates the business logic of an application. By.
Java Servlets and Java Server Pages
Java Programming: Advanced Topics 1 Building Web Applications Chapter 13.
Singleton Academy, Pune. Course syllabus Singleton Academy Pune – Course Syllabus1.
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Think Async Masoud Kalali, Software Engineer, Embrace and.
17 Copyright © 2004, Oracle. All rights reserved. Integrating J2EE Components.
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 1.
© 2010 IBM Corporation RESTFul Service Modelling in Rational Software Architect April, 2011.
Speaker Name Speaker Title Speaker Title Oracle Corporation Olivier Le Diouris Principal Product Manager Oracle Corporation Building Servlet and JSP Applications.
Enterprise Java Beans. Contents  Understanding EJBs  Practice Section.
Oracle Java Cloud Service Oracle Develop July 2013.
Java Servlets By: Tejashri Udavant..
BluePrints Reimagined
Project Helidon Deep Dive
Objectives In this lesson you will learn about: Need for servlets
JavaServer Faces: The Fundamentals
Knowledge Byte In this section, you will learn about:
Presentation transcript:

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

2 The Java EE 7 Platform Productivity++ and HTML5 Arun Gupta Java EE & GlassFish Guy

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 3 Java: Broadest Industry Adoption DEPLOYING TO 18 COMPLIANT APPLICATION SERVERS

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 4 Java EE 7 Platform Jun 12, 2013

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 5 Java EE 7 Themes  Batch  Concurrency  Simplified JMS  More annotated POJOs  Less boilerplate code  Cohesive integrated platform DEVELOPER PRODUCTIVITY  WebSockets  JSON  Servlet 3.1 NIO  REST MEETING ENTERPRISE DEMANDS Java EE 7

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 6 Top Ten Features in Java EE 7 1. WebSocket client/server endpoints 2. Batch Applications 3. JSON Processing 4. Concurrency Utilities 5. Simplified JMS API 7. JAX-RS Client API 8. Default Resources 9. More annotated POJOs 10. Faces Flow

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 7 Java API for WebSocket 1.0  Server and Client WebSocket Endpoint – Programmatic: Endpoint  Lifecycle methods  Packaging and public class ChatServer public void chat(String m) {... } }

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 8 Java API for WebSocket public class ChatBean { static Set peers = public void onOpen(Session peer) { peers.add(peer); public void onClose(Session peer) { peers.remove(peer); }... Chat Server

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 9 Java API for WebSocket public void message(String message) { for (Session peer : peers) { peer.getRemote().sendObject(message); } } } Chat Server (contd.)

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 10 JSON Processing 1.0  API to parse and generate JSON  Streaming API – Low-level, efficient way to parse/generate JSON – Similar to StAX API in XML world  Object Model API – Simple, easy to use high-level API – Similar to DOM API in XML world

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 11 { "firstName": "John", "lastName": "Smith", "age": 25, "phoneNumber": [ { "type": "home", "number": " " }, { "type": "fax", "number": " " } ] } JsonParser p = Json.createParser(…); JsonParser.Event event = p.next(); // START_OBJECT event = p.next(); // KEY_NAME event = p.next(); // VALUE_STRING String name = p.getString(); // "John” Java API for JSON Processing 1.0 Streaming API

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 12 Batch Applications for Java Platform 1.0  Suited for non-interactive, bulk-oriented, and long-running tasks  Batch execution: sequential, parallel, decision-based  Processing Styles – Item-oriented: Chunked (primary) – Task-oriented: Batchlet

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 13 Batch Applications 1.0 Concepts Metadata for jobs Manage batch process Batch process Independent sequential phase of job Chunk

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 14 …implements ItemReader { public Object readItem() { // read account using JPA } …implements ItemProcessor { Public Object processItems(Object account) { // read Account, return Statement } …implements ItemWriter { public void writeItems(List accounts) { // use JavaMail to send } Batch Applications 1.0 Chunked Job Specification

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 15 Concurrency Utilities for Java EE 1.0  Extension of Java SE Concurrency Utilities API  Provide asynchronous capabilities to Java EE application components  Provides 4 types of managed objects – ManagedExecutorService – ManagedScheduledExecutorService – ManagedThreadFactory – ContextService  Context Propagation

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 16 Concurrency Utilities for Java EE 1.0 public class TestServlet extends HttpPServlet ManagedExecutorService executor; Future future = executor.submit(new MyTask()); class MyTask implements Runnable { public void run() {... // task logic } } } Submit Tasks to ManagedExecutorService using JNDI

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 17 Java Message Service 2.0  New JMSContext interface  AutoCloseable JMSContext, Connection, Session, …  Use of runtime exceptions  Method chaining on JMSProducer  Simplified message sending Get More from Less Java EE 7

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. = "myConnectionFactory”) ConnectionFactory = "myQueue”) Queue myQueue; public void sendMessage (String payload) { Connection connection = null; try { connection = connectionFactory.createConnection(); Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE); MessageProducer messageProducer = session.createProducer(myQueue); TextMessage textMessage = session.createTextMessage(payload); messageProducer.send(textMessage); } catch (JMSException ex) { //... } finally { if (connection != null) { try { connection.close(); } catch (JMSException ex) { //... } } } } Application Server Specific Resources Boilerplate Code Exception Handling Java Message Service 2.0 Sending a Message using JMS 1.1

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 19 Java Message Service JMSContext = "java:global/jms/demoQueue”) Queue demoQueue; public void sendMessage(String payload) { context.createProducer().send(demoQueue, payload); } Sending a Message

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 20 Java API for RESTful Web Services 2.0  Client API  Message Filters and Entity Interceptors  Asynchronous Processing – Server and Client  Common Configuration

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 21 Java API for RESTful Web Services 2.0 // Get instance of Client Client client = ClientBuilder.newClient(); // Get customer name for the shipped products String name = client.target(“../orders/{orderId}/customer”).resolveTemplate(”orderId", ”10”).queryParam(”shipped", ”true”).request().get(String.class); Client API

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 22 Contexts and Dependency Injection 1.1  Automatic enablement for beans with scope annotation and EJBs – “beans.xml” is optional  Bean discovery mode – all: All types – annotated: Types with bean defining annotation – none: Disable CDI for programmatic disablement of classes  Global ordering/priority of interceptors and decorators

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 23 Bean Validation 1.1  Alignment with Dependency Injection  Method-level validation – Constraints on parameters and return values – Check pre-/post-conditions  Integration with JAX-RS Java EE 7

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 24 Built-in public Date getAppointment() { //... } public void Integer String customer) { //... } Bean Validation 1.1 Method Parameter and Result Validation

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 25 Java Persistence API 2.1  Schema Generation – javax.persistence.schema-generation.* properties  Unsynchronized Persistence Contexts  Bulk update/delete using Criteria  User-defined functions using FUNCTION  Stored Procedure Query

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 26 Servlet 3.1  Non-blocking I/O  Protocol Upgrade  Security Enhancements – : Deny request to HTTP methods not explicitly covered

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 27 Servlet 3.1 public class TestServlet extends HttpServlet protected void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { ServletInputStream input = request.getInputStream(); byte[] b = new byte[1024]; int len = -1; while ((len = input.read(b)) != -1) {... } } } Non-blocking I/O Traditional

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 28 Servlet 3.1 AsyncContext context = request.startAsync(); ServletInputStream input = request.getInputStream(); input.setReadListener( new MyReadListener(input, context)); Non-blocking I/O: doGet

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 29 Servlet public void onDataAvailable() { try { StringBuilder sb = new StringBuilder(); int len = -1; byte b[] = new byte[1024]; while (input.isReady() && (len = input.read(b)) != -1) { String data = new String(b, 0, len); System.out.println("--> " + data); } } catch (IOException ex) {... } }... Non-blocking read

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 30 JavaServer Faces 2.2  Faces Flow  Resource Library Contracts  HTML5 Friendly Markup Support – Pass through attributes and elements  Cross Site Request Forgery Protection  Loading Facelets via ResourceHandler  h:inputFile: New File Upload Component

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 31 Java Transaction API 1.2 Define transaction boundaries on CDI managed beans CDI scope for bean instances scoped to the active JTA transaction Java EE 7

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 32 EJB 3.2 Servlet 3.1 CDI Extensions Bean Validation 1.1 Batch 1.0 Web Fragments Java EE 7 JSRs JCA 1.7JMS 2.0JPA 2.1 Managed Beans 1.0 Concurrency 1.0 Common Annotations 1.1 Interceptors 1.2, JTA 1.2 CDI 1.1 JSF 2.2, JSP 2.3, EL 3.0 JAX-RS 2.0, JAX-WS 2.2 JSON 1.0 WebSocket 1.0 FINAL!

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 33 DOWNLOAD Java EE 7 SDK oracle.com/javaee GlassFish 4.0 Full Platform or Web Profile glassfish.org

Copyright © 2012, Oracle and/or its affiliates. All rights reserved Java EE 7 Implementation download.java.net/glassfish/4.0/promoted/

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 35 Java EE 8 and Beyond Java EE 7 State Management PaaS NoSQL JSON-B Modularity HTML5++ Caching Cloud

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 36 Adopt-a-JSR Participating JUGs

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 37 Call to Action  Specs: javaee-spec.java.net  Implementation: glassfish.org  Blog: blogs.oracle.com/theaquarium   NetBeans: wiki.netbeans.org/JavaEE7

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

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 39 The preceding material is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. The development, release, and timing of any features or functionality described for Oracle’s products remains at the sole discretion of Oracle.

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