SlideShare une entreprise Scribd logo
1  sur  44
Télécharger pour lire hors ligne
Java EE 6 & GlassFish v3
              Paving the path for future




Arun Gupta (blogs.sun.com/arungupta, @arungupta)
Sun Microsystems, Inc.
Java EE: Past & Present
                                                                                  Flexible
                                                               Ease of
                                                             Development        Java EE 6
                                                                                EJB Lite
                                                              Java EE 5         Restful WS
                                               Web            Ease of           Web Beans
                                              Services        Development       Extensibility
                                                              Annotations
                                             J2EE 1.4         EJB 3.0
                                             Web Services,    Persistence API
                          Robustness         Management,      New and
          Enterprise                         Deployment,      Updated
             Java         J2EE 1.3           Async.           Web Services
           Platform          CMP,            Connector
                           Connector
                          Architecture   `                                      Java EE 6
          J2EE 1.2
          Servlet, JSP,                                                         Web Profile
           EJB, JMS
 JPE       RMI/IIOP
Project
Compatible Java EE 5 Implementations




                                       3
Goals for the Java EE 6 Platform

   Flexible & Light-weight
   Extensible
          Embrace Open Source Frameworks
   Easier to use, develop on
          Continue on path set by Java EE 5
Java EE 6 is Flexible
   Decouple specifications to allow more
    combinations
   Expands potential licensee ecosystem
   Profiles
    −   Targeted bundle of technologies
    −   Defined through the JCP
    −   Web Profile Already Defined
            Defined by the Java EE 6 Expert Group
Java EE 6 Web Profile 1.0
   Fully functional mid-sized profile
    −   Actively discussed in the Java EE 6 Expert Group
        and outside it
    −   Technologies
            Servlets 3.0, JSP 2.2, EL 2.2, Debugging Support for Other
             Languages 1.0, JSTL 1.2, JSF 2.0, Common Annotations 1.1,
             EJB 3.1 Lite, JTA 1.1, JPA 2.0, Bean Validation 1.0, Managed
             Beans 1.0, Interceptors 1.1, Context & Dependency Injection 1.0,
             Dependency Injection for Java 1.0
Java EE 6 is Lightweight
   Pruning
    −   Make some technologies optional
   Pruned today, means
    −   Optional in the next release
    −   Deleted in the subsequent releases
   Pruned technologies will be marked in
    Javadocs
   Technologies
    −   JAX-RPC, EJB 2.x Entity Beans, JAXR, JSR 88
Java EE 6 is Extensible
   Embrace open source frameworks
    −   Wicket, Lift, Spring, Struts, ...
   Zero-configuration, drag-and-drop for web
    frameworks
    −   Servlets, servlet filters, context listeners for a
        framework get discovered and registered
        automatically
   Plugin libraries using web fragments
<web-fragment>
    <filter>
           <filter-name>wicket.helloworld</filter-name>
           <filter-class>org.apache.wicket.protocol.http.WicketFilter</filter-class>
           <init-param>
                 <param-name>applicationClassName</param-name>
                 <param-value>...</param-value>
           </init-param>
    </filter>
    <filter-mapping>
           <filter-name>wicket.helloworld</filter-name>
           <url-pattern>/*</url-pattern>
    </filter-mapping>
</web-fragment>

http://blogs.sun.com/arungupta/entry/totd_91_applying_java_ee
<web-fragment>
  <filter>
     <filter-name>LiftFilter</filter-name>
      <display-name>Lift Filter</display-name>
      <description>The Filter that intercepts lift calls</description>
      <filter-class>net.liftweb.http.LiftFilter</filter-class>
  </filter>
   <filter-mapping>
     <filter-name>LiftFilter</filter-name>
     <url-pattern>/*</url-pattern>
   </filter-mapping>
</web-fragment>

 http://blogs.sun.com/arungupta/entry/totd_101_applying_servlet_3
Java EE 6 & Ease-of-development
   Continue advancements of Java EE 5
   Primary focus: Web Tier
   General principles
    −   Annotation-based programming model
    −   Reduce or eliminate need for DD
    −   Traditional API for advanced users
EoD: EJB Simplified Packaging
           Java EE 5                                        Java EE 6
                                                       foo.war
    foo.ear
                                                       WEB-INF/classes
      foo_web.war                                       com.sun.FooServlet
                                                        com.sun.TickTock
       WEB-INF/web.xml                                  com.sun.FooBean
       WEB-INF/classes                                  com.sun.FooHelper
         com.sun.FooServlet
         com.sun.TickTock

       foo_ejb.jar
       com.sun.FooBean
       com.sun.FooHelper
                                                           web.xml ?
http://blogs.sun.com/arungupta/entry/totd_95_ejb_3_1
EoD: Servlets
               Servlet in Java EE 5: Two Files
<!--Deployment descriptor     /* Code in Java Class */
  web.xml -->
                              package com.sun;
<web-app>                     public class MyServlet extends
  <servlet>
                              HttpServlet {
    <servlet-name>MyServlet
                              public void
        </servlet-name>       doGet(HttpServletRequest
       <servlet-class>        req,HttpServletResponse res)
         com.sun.MyServlet    {
       </servlet-class>
  </servlet>                  ...
  <servlet-mapping>
    <servlet-name>MyServlet   }
       </servlet-name>
    <url-pattern>/myApp/*     ...
       </url-pattern>         }
  </servlet-mapping>
   ...
</web-app>
EoD: Servlets in Java EE 6

package com.sun;
@WebServlet(name=”MyServlet”, urlPattern=”/myApp/*”)
public class MyServlet extends HttpServlet {
   public void doGet(HttpServletRequest req,
             HttpServletResponse res)
   {
      ...
   }




http://blogs.sun.com/arungupta/entry/totd_81_getting_started_with
Java EE 6 - Done
   Specifications approved by the JCP (Dec 1)
   Reference Implementation is GlassFish v3
    (Dec 10)
   TCK (Dec 10)
Java EE 6 Specifications
   The Platform
   Java EE 6 Web Profile 1.0
   Managed Beans 1.0
Java EE 6 Specifications
                      New
   Context and Dependency Injection for Java EE
    (JSR 299)
   Bean Validation (JSR 303)
   Java API for RESTful Web Services (JSR 311)
   Dependency Injection for Java (JSR 330)
Java EE 6 Specifications
              Extreme Makeover
   Java Server Faces 2.0 (JSR 314)
   Java Servlets 3.0 (JSR 315)
   Java Persistence 2.0 (JSR 317)
   Enterprise Java Beans 3.1 & Interceptors 1.1
    (JSR 318)
   Java EE Connector Architecture 1.6 (JSR 322)
Java EE 6 Specifications
                               Updates
   Java API for XML-based Web Services 2.2 (JSR 224)
   Java API for XML Binding 2.2 (JSR 222)
   Web Services Metadata MR3 (JSR 181)
   JSP 2.2/EL 2.2 (JSR 245)
   Web Services for Java EE 1.3 (JSR 109)
   Common Annotations 1.1 (JSR 250)
   Java Authorization Contract for Containers 1.3 (JSR 115)
   Java Authentication Service Provider Interface for Containers 1.0 (JSR
    196)
Java EE 6 Specifications
                                                        As is
   JDBC 3.0 API
   Java Naming and Directory Interface 1.2
   Java Message Service 1.1
   Java Transaction API 1.1
   Java Transaction Service 1.0
   JavaMail API Specification 1.4
   JavaBeans Activation Framework 1.1
   Java API for XML Processing 1.3
   Java API for XML-based RPC 1.1
   SOAP with Attachments API for Java 1.3
   Java API for XML Registries 1.0
   Java EE Management Specification 1.1 (JSR 77)
   Java EE Deployment Specification 1.2 (JSR 88)
   Java Management Extensions 1.2
   Java Authentication and Authorization Service 1.0
   Debugging Support for Other Languages (JSR 45)
   Standard Tag Library for JSP 1.2 (JSR 52)
   Streaming API for XML 1.0 (JSR 173)
IDE Support
   NetBeans 6.8
   Eclipse 3.4+
   IntelliJ 9.0
Future Directions
   JNLP-ize Java EE app client
   Java EE SPI
    −   - Allow service providers and other system level
        components to be plugged in
Java EE 6 Training & Certification
   Java EE6 Training Curriculum - Feb 2010
   Java EE6 Certifications available - Mar 2010
   Register your interest in the courses and
    certifications and receive information about
    promotions
     −   https://dct.sun.com/dct/forms/reg_us_1611_480_0.jsp
Java EE Adoption Metrics
   Over 10 million downloads of Java EE SDKs annually
   Amazon search for J2EE yields 4,167 books (367)
   Amazon search for Java EE 1,681 books (448)
   Java the world's most used programing language
   Monster lists over 2,300 available Java EE / J2EE jobs
   In the past four years:
    −   JBoss purchased by Red Hat for 500 million
    −   BEA purchased by Oracle for 7 Billion

                                                        24
Java EE Adoption
                                    Y/Y Download Growth
    Over 18M
   Downloads
           08/.../08
                       12,000,000


   since FY'06         10,000,000

                        8,000,000

Active Users            6,000,000
                                                                    Dow nloads



                        4,000,000

                        2,000,000

                               0
                                    FY 06   FY 07   FY 08   FY 09
Java EE: Scales as you scale



                Java EE/ J2EE
                 Java EE/ J2EE




                                            26
      For today's Tiny is Tomorrow's Mega
What is GlassFish ?
   A community
    −   Users, Partners, Testers, Developers, ...
    −   Started in 2005 on java.net
   Application Server
    −   Enterprise Quality and Open Source (CDDL &
        GPL v2)
    −   Java EE Reference Implementation
    −   Full Commercial Support from Sun
Sun GlassFish Enterprise Server
                         Enterprise Manager



              Customer
              Advocate                         eLearning
                                               Credit



Customer Focused                                     24x7 Support
Support Team


                          GlassFish
   Sun VIP
                          Open Source
   Interoperability                                   Patches &
                          Application Server
   Support                                            Upgrades
                                                                    28
GlassFish v3
   Modular:
    −   Maven 2 – Build & Module description
    −   Felix – OSGi runtime (216 bundles)
    −   Allow any type of Container to be plugged
            Start Container and Services on demand
   Embeddable: runs in-VM
   Extensible
    −   Rails, Grails, Django, ...
                                                      29
Dynamic Languages & Frameworks




http://glassfish-scripting.dev.java.net
                                          30
Rails Deployment Choices




              Credits: http://birdwatchersdigest.com

                                                       31
Demo
NetBeans / Eclipse & Java EE 6


http://blogs.sun.com/arungupta/entry/screencast_27_simple_web_application
http://blogs.sun.com/arungupta/entry/screencast_28_simple_web_application
http://blogs.sun.com/arungupta/entry/screencast_26_develop_run_debug/
http://blogs.sun.com/arungupta/entry/totd_93_getting_started_with/
http://blogs.sun.com/arungupta/entry/totd_94_a_simple_java
http://blogs.sun.com/arungupta/entry/totd_95_ejb_3_1
http://blogs.sun.com/arungupta/entry/totd_102_java_ee_6
http://blogs.sun.com/arungupta/entry/totd_99_creating_a_java
http://blog.arungupta.me/2008/11/screencast-28-simple-web-application-using-eclipse-and-
glassfish-v3-prelude/

                                                                                           32
Embeddable GlassFish
public void testServlet() throws Exception {
      int port = 9999;
      GlassFish glassfish = newGlassFish(port);
     URL url = new URL("http://localhost:" + port + "/" + NAME +
  "/SimpleServlet");
      BufferedReader br = new BufferedReader(
           new InputStreamReader(
           url.openConnection().getInputStream()));
      assertEquals("Wow, I'm embedded!", br.readLine());
      glassfish.stop();
  }
                                                                   33
Embeddable GlassFish
private GlassFish newGlassFish(int port) throws Exception {
    GlassFish glassfish = new GlassFish(port);
    ScatteredWar war = new ScatteredWar(NAME,
         new File("src/main/resources"),
         new File("src/main/resources/WEB-INF/web.xml"),
        Collections.singleton(new
File("target/classes").toURI().toURL()));
    glassfish.deploy(war);
    System.out.println("Ready ...");
    return glassfish;
}
                                                              34
CLI-based Administration
 “asadmin” CLI utility
 Administrative commands can be added with

each container :
     @Service(name=”myCommand”)
    public class ChangeRandomCtr implements AdminCommand {
      @Param
      String s1;
      @Param
      String s2;
    …}

    −Available as :
    asadmin myCommand –s1 foo –s2 bar
                                                             35
36
Demo
GlassFish v3 Administration




                              37
Light Weight & On-demand Monitoring
    Event-driven light-weight and non-intrusive
     monitoring
    Modules provide domain specific probes
     (monitoring events)
     −   EJB, Web, Connector, JPA, Jersey, Orb, Ruby
    End-to-end monitoring on Solaris using
     DTrace
      rd
    3 party scripting clients
     −   JavaScript to begin with                      38
Demo
GlassFish v3 Monitoring




http://blogs.sun.com/arungupta/entry/totd_104_glassfish_v3_monitoring
                                                                        39
REST Interface
REST interface to management and


monitoring data
    −Configuration data, Commands invocation (start/stop
    instance, deploy, undeploy, ...), CRUD resources (JMS,
    JDBC, ...)
    −localhost:4848/management/domain

    −localhost:4848/monitoring/domain

GET, POST, DELETE methods
XML, JSON, HTML reps

                                                             40
Demo
GlassFish v3 REST Interface




http://blogs.sun.com/arungupta/entry/totd_113_javafx_front_end
http://blogs.sun.com/arungupta/entry/totd_116_glassfish_v3_administration
                                                                            41
GlassFish ISV Partners
References
   glassfish.org
   sun.com/glassfish
   blogs.sun.com/theaquarium
   twitter.com/glassfish
   glassfish@sun.com
Java EE 6 & GlassFish v3
              Paving the path for future




Arun Gupta (blogs.sun.com/arungupta, @arungupta)
Sun Microsystems, Inc.

Contenu connexe

Tendances

Understanding the nuts & bolts of Java EE 6
Understanding the nuts & bolts of Java EE 6Understanding the nuts & bolts of Java EE 6
Understanding the nuts & bolts of Java EE 6
Arun Gupta
 
Java EE6 CodeCamp16 oct 2010
Java EE6 CodeCamp16 oct 2010Java EE6 CodeCamp16 oct 2010
Java EE6 CodeCamp16 oct 2010
Codecamp Romania
 

Tendances (20)

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...
 
Java EE 6 Hands-on Workshop at Dallas Tech Fest 2010
Java EE 6 Hands-on Workshop at Dallas Tech Fest 2010Java EE 6 Hands-on Workshop at Dallas Tech Fest 2010
Java EE 6 Hands-on Workshop at Dallas Tech Fest 2010
 
Understanding the nuts & bolts of Java EE 6
Understanding the nuts & bolts of Java EE 6Understanding the nuts & bolts of Java EE 6
Understanding the nuts & bolts of Java EE 6
 
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
 
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
Java EE 6 & GlassFish 3Java EE 6 & GlassFish 3
Java EE 6 & GlassFish 3
 
Java EE 6 workshop at Dallas Tech Fest 2011
Java EE 6 workshop at Dallas Tech Fest 2011Java EE 6 workshop at Dallas Tech Fest 2011
Java EE 6 workshop at Dallas Tech Fest 2011
 
Java EE6 CodeCamp16 oct 2010
Java EE6 CodeCamp16 oct 2010Java EE6 CodeCamp16 oct 2010
Java EE6 CodeCamp16 oct 2010
 
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
 
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
 
Overview of Java EE 6 by Roberto Chinnici at SFJUG
Overview of Java EE 6 by Roberto Chinnici at SFJUGOverview of Java EE 6 by Roberto Chinnici at SFJUG
Overview of Java EE 6 by Roberto Chinnici at SFJUG
 
GlassFish 3.1 at JCertif 2011
GlassFish 3.1 at JCertif 2011GlassFish 3.1 at JCertif 2011
GlassFish 3.1 at JCertif 2011
 
The Java Ee 6 Platform Normandy Jug
The Java Ee 6 Platform Normandy JugThe Java Ee 6 Platform Normandy Jug
The Java Ee 6 Platform Normandy Jug
 
Glassfish Overview Fontys 20090520
Glassfish Overview Fontys 20090520Glassfish Overview Fontys 20090520
Glassfish Overview Fontys 20090520
 
Java 7 workshop
Java 7 workshopJava 7 workshop
Java 7 workshop
 
Jboss
JbossJboss
Jboss
 
Deep Dive Hands-on in Java EE 6 - Oredev 2010
Deep Dive Hands-on in Java EE 6 - Oredev 2010Deep Dive Hands-on in Java EE 6 - Oredev 2010
Deep Dive Hands-on in Java EE 6 - Oredev 2010
 
Java EE 7 at JAX London 2011 and JFall 2011
Java EE 7 at JAX London 2011 and JFall 2011Java EE 7 at JAX London 2011 and JFall 2011
Java EE 7 at JAX London 2011 and JFall 2011
 
OSGi & Java EE in GlassFish @ Silicon Valley Code Camp 2010
OSGi & Java EE in GlassFish @ Silicon Valley Code Camp 2010OSGi & Java EE in GlassFish @ Silicon Valley Code Camp 2010
OSGi & Java EE in GlassFish @ Silicon Valley Code Camp 2010
 
Java EE 6 & GlassFish v3: Paving path for the future
Java EE 6 & GlassFish v3: Paving path for the futureJava EE 6 & GlassFish v3: Paving path for the future
Java EE 6 & GlassFish v3: Paving path for the future
 

En vedette

En vedette (6)

The Glassfish Experience
The Glassfish ExperienceThe Glassfish Experience
The Glassfish Experience
 
Spring Day | Spring 3.1 in a Nutshell | Sam Brannen
Spring Day | Spring 3.1 in a Nutshell | Sam BrannenSpring Day | Spring 3.1 in a Nutshell | Sam Brannen
Spring Day | Spring 3.1 in a Nutshell | Sam Brannen
 
Thanks Managers!
Thanks Managers!Thanks Managers!
Thanks Managers!
 
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
 
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
 
Analytics Trends 2016: The next evolution
Analytics Trends 2016: The next evolutionAnalytics Trends 2016: The next evolution
Analytics Trends 2016: The next evolution
 

Similaire à Java EE 6 : Paving The Path For The Future

Java EE 6 Component Model Explained
Java EE 6 Component Model Explained Java EE 6 Component Model Explained
Java EE 6 Component Model Explained
Shreedhar Ganapathy
 

Similaire à Java EE 6 : Paving The Path For The Future (20)

Sun Java EE 6 Overview
Sun Java EE 6 OverviewSun Java EE 6 Overview
Sun Java EE 6 Overview
 
Spark IT 2011 - Java EE 6 Workshop
Spark IT 2011 - Java EE 6 WorkshopSpark IT 2011 - Java EE 6 Workshop
Spark IT 2011 - Java EE 6 Workshop
 
Java EE 6 and GlassFish portfolio
Java EE 6 and GlassFish portfolioJava EE 6 and GlassFish portfolio
Java EE 6 and GlassFish portfolio
 
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 Enterprise Edition 6 Overview
Java Enterprise Edition 6 OverviewJava Enterprise Edition 6 Overview
Java Enterprise Edition 6 Overview
 
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 ...
 
Boston 2011 OTN Developer Days - Java EE 6
Boston 2011 OTN Developer Days - Java EE 6Boston 2011 OTN Developer Days - Java EE 6
Boston 2011 OTN Developer Days - Java EE 6
 
Java E
Java EJava E
Java E
 
Java EE 6 Component Model Explained
Java EE 6 Component Model Explained Java EE 6 Component Model Explained
Java EE 6 Component Model Explained
 
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
 
Java EE 6
Java EE 6Java EE 6
Java EE 6
 
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 and JavaEE, Today and Future
GlassFish and JavaEE, Today and FutureGlassFish and JavaEE, Today and Future
GlassFish and JavaEE, Today and Future
 
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)
 
Java EE 7 - Overview and Status
Java EE 7  - Overview and StatusJava EE 7  - Overview and Status
Java EE 7 - Overview and Status
 
Glass Fishv3 March2010
Glass Fishv3 March2010Glass Fishv3 March2010
Glass Fishv3 March2010
 
Java EE6 Overview
Java EE6 OverviewJava EE6 Overview
Java EE6 Overview
 
Java EE7 Demystified
Java EE7 DemystifiedJava EE7 Demystified
Java EE7 Demystified
 
Java EE8 - by Kito Mann
Java EE8 - by Kito Mann Java EE8 - by Kito Mann
Java EE8 - by Kito Mann
 

Plus de IndicThreads

Scrap Your MapReduce - Apache Spark
 Scrap Your MapReduce - Apache Spark Scrap Your MapReduce - Apache Spark
Scrap Your MapReduce - Apache Spark
IndicThreads
 
Continuous Integration (CI) and Continuous Delivery (CD) using Jenkins & Docker
 Continuous Integration (CI) and Continuous Delivery (CD) using Jenkins & Docker Continuous Integration (CI) and Continuous Delivery (CD) using Jenkins & Docker
Continuous Integration (CI) and Continuous Delivery (CD) using Jenkins & Docker
IndicThreads
 
Unraveling OpenStack Clouds
 Unraveling OpenStack Clouds Unraveling OpenStack Clouds
Unraveling OpenStack Clouds
IndicThreads
 

Plus de IndicThreads (20)

Http2 is here! And why the web needs it
Http2 is here! And why the web needs itHttp2 is here! And why the web needs it
Http2 is here! And why the web needs it
 
Understanding Bitcoin (Blockchain) and its Potential for Disruptive Applications
Understanding Bitcoin (Blockchain) and its Potential for Disruptive ApplicationsUnderstanding Bitcoin (Blockchain) and its Potential for Disruptive Applications
Understanding Bitcoin (Blockchain) and its Potential for Disruptive Applications
 
Go Programming Language - Learning The Go Lang way
Go Programming Language - Learning The Go Lang wayGo Programming Language - Learning The Go Lang way
Go Programming Language - Learning The Go Lang way
 
Building Resilient Microservices
Building Resilient Microservices Building Resilient Microservices
Building Resilient Microservices
 
App using golang indicthreads
App using golang  indicthreadsApp using golang  indicthreads
App using golang indicthreads
 
Building on quicksand microservices indicthreads
Building on quicksand microservices  indicthreadsBuilding on quicksand microservices  indicthreads
Building on quicksand microservices indicthreads
 
How to Think in RxJava Before Reacting
How to Think in RxJava Before ReactingHow to Think in RxJava Before Reacting
How to Think in RxJava Before Reacting
 
Iot secure connected devices indicthreads
Iot secure connected devices indicthreadsIot secure connected devices indicthreads
Iot secure connected devices indicthreads
 
Real world IoT for enterprises
Real world IoT for enterprisesReal world IoT for enterprises
Real world IoT for enterprises
 
IoT testing and quality assurance indicthreads
IoT testing and quality assurance indicthreadsIoT testing and quality assurance indicthreads
IoT testing and quality assurance indicthreads
 
Functional Programming Past Present Future
Functional Programming Past Present FutureFunctional Programming Past Present Future
Functional Programming Past Present Future
 
Harnessing the Power of Java 8 Streams
Harnessing the Power of Java 8 Streams Harnessing the Power of Java 8 Streams
Harnessing the Power of Java 8 Streams
 
Building & scaling a live streaming mobile platform - Gr8 road to fame
Building & scaling a live streaming mobile platform - Gr8 road to fameBuilding & scaling a live streaming mobile platform - Gr8 road to fame
Building & scaling a live streaming mobile platform - Gr8 road to fame
 
Internet of things architecture perspective - IndicThreads Conference
Internet of things architecture perspective - IndicThreads ConferenceInternet of things architecture perspective - IndicThreads Conference
Internet of things architecture perspective - IndicThreads Conference
 
Cars and Computers: Building a Java Carputer
 Cars and Computers: Building a Java Carputer Cars and Computers: Building a Java Carputer
Cars and Computers: Building a Java Carputer
 
Scrap Your MapReduce - Apache Spark
 Scrap Your MapReduce - Apache Spark Scrap Your MapReduce - Apache Spark
Scrap Your MapReduce - Apache Spark
 
Continuous Integration (CI) and Continuous Delivery (CD) using Jenkins & Docker
 Continuous Integration (CI) and Continuous Delivery (CD) using Jenkins & Docker Continuous Integration (CI) and Continuous Delivery (CD) using Jenkins & Docker
Continuous Integration (CI) and Continuous Delivery (CD) using Jenkins & Docker
 
Speed up your build pipeline for faster feedback
Speed up your build pipeline for faster feedbackSpeed up your build pipeline for faster feedback
Speed up your build pipeline for faster feedback
 
Unraveling OpenStack Clouds
 Unraveling OpenStack Clouds Unraveling OpenStack Clouds
Unraveling OpenStack Clouds
 
Digital Transformation of the Enterprise. What IT leaders need to know!
Digital Transformation of the Enterprise. What IT  leaders need to know!Digital Transformation of the Enterprise. What IT  leaders need to know!
Digital Transformation of the Enterprise. What IT leaders need to know!
 

Dernier

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 

Dernier (20)

Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 

Java EE 6 : Paving The Path For The Future

  • 1. Java EE 6 & GlassFish v3 Paving the path for future Arun Gupta (blogs.sun.com/arungupta, @arungupta) Sun Microsystems, Inc.
  • 2. Java EE: Past & Present Flexible Ease of Development Java EE 6 EJB Lite Java EE 5 Restful WS Web Ease of Web Beans Services Development Extensibility Annotations J2EE 1.4 EJB 3.0 Web Services, Persistence API Robustness Management, New and Enterprise Deployment, Updated Java J2EE 1.3 Async. Web Services Platform CMP, Connector Connector Architecture ` Java EE 6 J2EE 1.2 Servlet, JSP, Web Profile EJB, JMS JPE RMI/IIOP Project
  • 3. Compatible Java EE 5 Implementations 3
  • 4. Goals for the Java EE 6 Platform  Flexible & Light-weight  Extensible  Embrace Open Source Frameworks  Easier to use, develop on  Continue on path set by Java EE 5
  • 5. Java EE 6 is Flexible  Decouple specifications to allow more combinations  Expands potential licensee ecosystem  Profiles − Targeted bundle of technologies − Defined through the JCP − Web Profile Already Defined  Defined by the Java EE 6 Expert Group
  • 6. Java EE 6 Web Profile 1.0  Fully functional mid-sized profile − Actively discussed in the Java EE 6 Expert Group and outside it − Technologies  Servlets 3.0, JSP 2.2, EL 2.2, Debugging Support for Other Languages 1.0, JSTL 1.2, JSF 2.0, Common Annotations 1.1, EJB 3.1 Lite, JTA 1.1, JPA 2.0, Bean Validation 1.0, Managed Beans 1.0, Interceptors 1.1, Context & Dependency Injection 1.0, Dependency Injection for Java 1.0
  • 7. Java EE 6 is Lightweight  Pruning − Make some technologies optional  Pruned today, means − Optional in the next release − Deleted in the subsequent releases  Pruned technologies will be marked in Javadocs  Technologies − JAX-RPC, EJB 2.x Entity Beans, JAXR, JSR 88
  • 8. Java EE 6 is Extensible  Embrace open source frameworks − Wicket, Lift, Spring, Struts, ...  Zero-configuration, drag-and-drop for web frameworks − Servlets, servlet filters, context listeners for a framework get discovered and registered automatically  Plugin libraries using web fragments
  • 9. <web-fragment> <filter> <filter-name>wicket.helloworld</filter-name> <filter-class>org.apache.wicket.protocol.http.WicketFilter</filter-class> <init-param> <param-name>applicationClassName</param-name> <param-value>...</param-value> </init-param> </filter> <filter-mapping> <filter-name>wicket.helloworld</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> </web-fragment> http://blogs.sun.com/arungupta/entry/totd_91_applying_java_ee
  • 10. <web-fragment> <filter> <filter-name>LiftFilter</filter-name> <display-name>Lift Filter</display-name> <description>The Filter that intercepts lift calls</description> <filter-class>net.liftweb.http.LiftFilter</filter-class> </filter> <filter-mapping> <filter-name>LiftFilter</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> </web-fragment> http://blogs.sun.com/arungupta/entry/totd_101_applying_servlet_3
  • 11. Java EE 6 & Ease-of-development  Continue advancements of Java EE 5  Primary focus: Web Tier  General principles − Annotation-based programming model − Reduce or eliminate need for DD − Traditional API for advanced users
  • 12. EoD: EJB Simplified Packaging Java EE 5 Java EE 6 foo.war foo.ear WEB-INF/classes foo_web.war com.sun.FooServlet com.sun.TickTock WEB-INF/web.xml com.sun.FooBean WEB-INF/classes com.sun.FooHelper com.sun.FooServlet com.sun.TickTock foo_ejb.jar com.sun.FooBean com.sun.FooHelper web.xml ? http://blogs.sun.com/arungupta/entry/totd_95_ejb_3_1
  • 13. EoD: Servlets Servlet in Java EE 5: Two Files <!--Deployment descriptor /* Code in Java Class */ web.xml --> package com.sun; <web-app> public class MyServlet extends <servlet> HttpServlet { <servlet-name>MyServlet public void </servlet-name> doGet(HttpServletRequest <servlet-class> req,HttpServletResponse res) com.sun.MyServlet { </servlet-class> </servlet> ... <servlet-mapping> <servlet-name>MyServlet } </servlet-name> <url-pattern>/myApp/* ... </url-pattern> } </servlet-mapping> ... </web-app>
  • 14. EoD: Servlets in Java EE 6 package com.sun; @WebServlet(name=”MyServlet”, urlPattern=”/myApp/*”) public class MyServlet extends HttpServlet { public void doGet(HttpServletRequest req, HttpServletResponse res) { ... } http://blogs.sun.com/arungupta/entry/totd_81_getting_started_with
  • 15. Java EE 6 - Done  Specifications approved by the JCP (Dec 1)  Reference Implementation is GlassFish v3 (Dec 10)  TCK (Dec 10)
  • 16. Java EE 6 Specifications  The Platform  Java EE 6 Web Profile 1.0  Managed Beans 1.0
  • 17. Java EE 6 Specifications New  Context and Dependency Injection for Java EE (JSR 299)  Bean Validation (JSR 303)  Java API for RESTful Web Services (JSR 311)  Dependency Injection for Java (JSR 330)
  • 18. Java EE 6 Specifications Extreme Makeover  Java Server Faces 2.0 (JSR 314)  Java Servlets 3.0 (JSR 315)  Java Persistence 2.0 (JSR 317)  Enterprise Java Beans 3.1 & Interceptors 1.1 (JSR 318)  Java EE Connector Architecture 1.6 (JSR 322)
  • 19. Java EE 6 Specifications Updates  Java API for XML-based Web Services 2.2 (JSR 224)  Java API for XML Binding 2.2 (JSR 222)  Web Services Metadata MR3 (JSR 181)  JSP 2.2/EL 2.2 (JSR 245)  Web Services for Java EE 1.3 (JSR 109)  Common Annotations 1.1 (JSR 250)  Java Authorization Contract for Containers 1.3 (JSR 115)  Java Authentication Service Provider Interface for Containers 1.0 (JSR 196)
  • 20. Java EE 6 Specifications As is  JDBC 3.0 API  Java Naming and Directory Interface 1.2  Java Message Service 1.1  Java Transaction API 1.1  Java Transaction Service 1.0  JavaMail API Specification 1.4  JavaBeans Activation Framework 1.1  Java API for XML Processing 1.3  Java API for XML-based RPC 1.1  SOAP with Attachments API for Java 1.3  Java API for XML Registries 1.0  Java EE Management Specification 1.1 (JSR 77)  Java EE Deployment Specification 1.2 (JSR 88)  Java Management Extensions 1.2  Java Authentication and Authorization Service 1.0  Debugging Support for Other Languages (JSR 45)  Standard Tag Library for JSP 1.2 (JSR 52)  Streaming API for XML 1.0 (JSR 173)
  • 21. IDE Support  NetBeans 6.8  Eclipse 3.4+  IntelliJ 9.0
  • 22. Future Directions  JNLP-ize Java EE app client  Java EE SPI − - Allow service providers and other system level components to be plugged in
  • 23. Java EE 6 Training & Certification  Java EE6 Training Curriculum - Feb 2010  Java EE6 Certifications available - Mar 2010  Register your interest in the courses and certifications and receive information about promotions − https://dct.sun.com/dct/forms/reg_us_1611_480_0.jsp
  • 24. Java EE Adoption Metrics  Over 10 million downloads of Java EE SDKs annually  Amazon search for J2EE yields 4,167 books (367)  Amazon search for Java EE 1,681 books (448)  Java the world's most used programing language  Monster lists over 2,300 available Java EE / J2EE jobs  In the past four years: − JBoss purchased by Red Hat for 500 million − BEA purchased by Oracle for 7 Billion 24
  • 25. Java EE Adoption Y/Y Download Growth Over 18M Downloads 08/.../08 12,000,000 since FY'06 10,000,000 8,000,000 Active Users 6,000,000 Dow nloads 4,000,000 2,000,000 0 FY 06 FY 07 FY 08 FY 09
  • 26. Java EE: Scales as you scale Java EE/ J2EE Java EE/ J2EE 26 For today's Tiny is Tomorrow's Mega
  • 27. What is GlassFish ?  A community − Users, Partners, Testers, Developers, ... − Started in 2005 on java.net  Application Server − Enterprise Quality and Open Source (CDDL & GPL v2) − Java EE Reference Implementation − Full Commercial Support from Sun
  • 28. Sun GlassFish Enterprise Server Enterprise Manager Customer Advocate eLearning Credit Customer Focused 24x7 Support Support Team GlassFish Sun VIP Open Source Interoperability Patches & Application Server Support Upgrades 28
  • 29. GlassFish v3  Modular: − Maven 2 – Build & Module description − Felix – OSGi runtime (216 bundles) − Allow any type of Container to be plugged  Start Container and Services on demand  Embeddable: runs in-VM  Extensible − Rails, Grails, Django, ... 29
  • 30. Dynamic Languages & Frameworks http://glassfish-scripting.dev.java.net 30
  • 31. Rails Deployment Choices Credits: http://birdwatchersdigest.com 31
  • 32. Demo NetBeans / Eclipse & Java EE 6 http://blogs.sun.com/arungupta/entry/screencast_27_simple_web_application http://blogs.sun.com/arungupta/entry/screencast_28_simple_web_application http://blogs.sun.com/arungupta/entry/screencast_26_develop_run_debug/ http://blogs.sun.com/arungupta/entry/totd_93_getting_started_with/ http://blogs.sun.com/arungupta/entry/totd_94_a_simple_java http://blogs.sun.com/arungupta/entry/totd_95_ejb_3_1 http://blogs.sun.com/arungupta/entry/totd_102_java_ee_6 http://blogs.sun.com/arungupta/entry/totd_99_creating_a_java http://blog.arungupta.me/2008/11/screencast-28-simple-web-application-using-eclipse-and- glassfish-v3-prelude/ 32
  • 33. Embeddable GlassFish public void testServlet() throws Exception { int port = 9999; GlassFish glassfish = newGlassFish(port); URL url = new URL("http://localhost:" + port + "/" + NAME + "/SimpleServlet"); BufferedReader br = new BufferedReader( new InputStreamReader( url.openConnection().getInputStream())); assertEquals("Wow, I'm embedded!", br.readLine()); glassfish.stop(); } 33
  • 34. Embeddable GlassFish private GlassFish newGlassFish(int port) throws Exception { GlassFish glassfish = new GlassFish(port); ScatteredWar war = new ScatteredWar(NAME, new File("src/main/resources"), new File("src/main/resources/WEB-INF/web.xml"), Collections.singleton(new File("target/classes").toURI().toURL())); glassfish.deploy(war); System.out.println("Ready ..."); return glassfish; } 34
  • 35. CLI-based Administration  “asadmin” CLI utility  Administrative commands can be added with each container : @Service(name=”myCommand”) public class ChangeRandomCtr implements AdminCommand { @Param String s1; @Param String s2; …} −Available as : asadmin myCommand –s1 foo –s2 bar 35
  • 36. 36
  • 38. Light Weight & On-demand Monitoring  Event-driven light-weight and non-intrusive monitoring  Modules provide domain specific probes (monitoring events) − EJB, Web, Connector, JPA, Jersey, Orb, Ruby  End-to-end monitoring on Solaris using DTrace rd  3 party scripting clients − JavaScript to begin with 38
  • 40. REST Interface REST interface to management and  monitoring data −Configuration data, Commands invocation (start/stop instance, deploy, undeploy, ...), CRUD resources (JMS, JDBC, ...) −localhost:4848/management/domain −localhost:4848/monitoring/domain GET, POST, DELETE methods XML, JSON, HTML reps 40
  • 41. Demo GlassFish v3 REST Interface http://blogs.sun.com/arungupta/entry/totd_113_javafx_front_end http://blogs.sun.com/arungupta/entry/totd_116_glassfish_v3_administration 41
  • 43. References  glassfish.org  sun.com/glassfish  blogs.sun.com/theaquarium  twitter.com/glassfish  glassfish@sun.com
  • 44. Java EE 6 & GlassFish v3 Paving the path for future Arun Gupta (blogs.sun.com/arungupta, @arungupta) Sun Microsystems, Inc.