SlideShare une entreprise Scribd logo
1  sur  41
Télécharger pour lire hors ligne
Java EE 6 & GlassFish v3:
Paving the path for the future
      <Insert Picture Here>




Arun Gupta, Java EE & GlassFish Guy,
Oracle Corp
blogs.sun.com/arungupta, @arungupta
Are you tweeting ?



#glassfish
 #sparkit
Java EE: Past & Present                                                        Flexible
                                                                 Ease of
                                                               Development        Java EE 6
                                                                                  Pruning
                                                                Java EE 5         Extensibility
                                                 Web            Ease of
                                               Services                           Profiles
                                                                Development
                                                                Annotations
                                                                                  Ease-of-dev
                                               J2EE 1.4         EJB 3.0           EJB Lite
                                               Web Services,    Persistence API   RESTful WS
                           Robustness          Management,      New and           CDI
           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
                                                                                   Managed
                                                                                   Bean 1.0

May 1998   Dec 1999        Sep 2001             Nov 2003          May 2006           Dec 2010
           10 specs        13 specs             20 specs          23 specs           28 specs
Compatible Java EE 5 Impl




http://java.sun.com/javaee/overview/compatibility-javaee5.jsp
Compatible Java EE 6 Impls

Today:




Coming:
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 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
• Technologies marked in Javadocs
  • 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 - Done

• Specifications approved by the JCP




                   10
• Reference Implementation is GlassFish v3
• TCK




               20
         ec
        D
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 1.0 (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)
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: Servlets
   Servlet in Java EE 5: Two Files

<!--Deployment descriptor      /* Code in Java Class */
  web.xml -->
<web-app>                      package com.sun;
  <servlet>                    public class MyServlet extends
    <servlet-name>MyServlet    HttpServlet {
             </servlet-name>   public void
       <servlet-class>         doGet(HttpServletRequest
         com.sun.MyServlet     req,HttpServletResponse res)
       </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
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                     web.xml ?
        com.sun.FooHelper



http://blogs.sun.com/arungupta/entry/totd_95_ejb_3_1
IDE Support for Java EE 6
Books on Java EE
http://education.oracle.com/pls/web_prod-plq-dad/db_pages.getlppage?page_id=212&path=SADJ
What is GlassFish ?

• A community
  • Users, Partners, Testers, Developers, ...
  • Started in 2005 on java.net
• Application Server
  • Open Source (CDDL & GPL v2)
  • Java EE Reference Implementation
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, ...
     • Administration, Monitoring, Logging, Deployment, ...


http://blogs.sun.com/dochez/entry/glassfish_v3_extensions_part_5
GlassFish v3 & OSGi
 • No OSGi APIs are used in GlassFish
   • HK2 provides abstraction layer
 • All GlassFish modules are OSGi bundles
 • Felix is default, also runs on Knopflerfish & Equinox
    • Can run in an existing shell
    • 216 modules in v3




http://blogs.sun.com/arungupta/entry/totd_103_glassfish_v3_with
http://blogs.sun.com/arungupta/entry/totd_118_managing_osgi_bundles
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
Dynamic Languages & Frameworks




http://glassfish-scripting.dev.java.net
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
Demo
GlassFish v3 Administration
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
• 3rd party scripting clients
  • JavaScript to begin with
Demo
 GlassFish v3 Monitoring




http://blogs.sun.com/arungupta/entry/totd_104_glassfish_v3_monitoring
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
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
Boost your productivity
   Retain session across deployment
asadmin redeploy –properties keepSessions=true helloworld.war
Boost your productivity
Deploy-on-Save
Oracle said ...



 “GlassFish joins WebLogic Server in the best Java
 EE application server offering in the industry”
 “GlassFish continues as the Java EE RI and as an
 open source project.”
 “Oracle plans to add GlassFish Enterprise Server to
 all WebLogic offerings.”
 “GlassFish also available as standalone offering.”



http://blogs.sun.com/arungupta/entry/glassfish_strategy_by_oracle_sun
References

• glassfish.org
• blogs.sun.com/theaquarium
• twitter.com/glassfish
• glassfish@sun.com
Java EE 6 & GlassFish v3:
Paving the path for the future
      <Insert Picture Here>




Arun Gupta, Java EE & GlassFish Guy,
Oracle Corp
blogs.sun.com/arungupta, @arungupta

Contenu connexe

Tendances

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
 
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 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 & 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 & 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 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 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
 
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
Java EE 6 & GlassFish 3Java EE 6 & GlassFish 3
Java EE 6 & GlassFish 3
 
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 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 EE 6 Component Model Explained
Java EE 6 Component Model Explained Java EE 6 Component Model Explained
Java EE 6 Component Model Explained
 
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
 
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
 
Java EE6 CodeCamp16 oct 2010
Java EE6 CodeCamp16 oct 2010Java EE6 CodeCamp16 oct 2010
Java EE6 CodeCamp16 oct 2010
 
Sun Java EE 6 Overview
Sun Java EE 6 OverviewSun Java EE 6 Overview
Sun Java EE 6 Overview
 
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
 
Glassfish Overview Fontys 20090520
Glassfish Overview Fontys 20090520Glassfish Overview Fontys 20090520
Glassfish Overview Fontys 20090520
 
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
 
Java 7 workshop
Java 7 workshopJava 7 workshop
Java 7 workshop
 
Whats Cool in Java E 6
Whats Cool in Java E 6Whats Cool in Java E 6
Whats Cool in Java E 6
 
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
 

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 & GlassFish v3: Paving the path for the future - Spark IT 2010

Andrei Niculae - JavaEE6 - 24mai2011
Andrei Niculae - JavaEE6 - 24mai2011Andrei Niculae - JavaEE6 - 24mai2011
Andrei Niculae - JavaEE6 - 24mai2011
Agora Group
 

Similaire à Java EE 6 & GlassFish v3: Paving the path for the future - Spark IT 2010 (20)

Java E
Java EJava E
Java E
 
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 & 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 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 ...
 
Java EE 6 and GlassFish portfolio
Java EE 6 and GlassFish portfolioJava EE 6 and GlassFish portfolio
Java EE 6 and GlassFish portfolio
 
Java Enterprise Edition 6 Overview
Java Enterprise Edition 6 OverviewJava Enterprise Edition 6 Overview
Java Enterprise Edition 6 Overview
 
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 EE 6
Java EE 6Java EE 6
Java EE 6
 
Java EE6 Overview
Java EE6 OverviewJava EE6 Overview
Java EE6 Overview
 
Andrei Niculae - JavaEE6 - 24mai2011
Andrei Niculae - JavaEE6 - 24mai2011Andrei Niculae - JavaEE6 - 24mai2011
Andrei Niculae - JavaEE6 - 24mai2011
 
Glass Fishv3 March2010
Glass Fishv3 March2010Glass Fishv3 March2010
Glass Fishv3 March2010
 
Java EE 6 Aquarium Paris
Java EE 6 Aquarium ParisJava EE 6 Aquarium Paris
Java EE 6 Aquarium Paris
 
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
 
Basic method for Java EE Web Profile
Basic method for Java EE Web ProfileBasic method for Java EE Web Profile
Basic method for Java EE Web Profile
 
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 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
 
Java EE8 - by Kito Mann
Java EE8 - by Kito Mann Java EE8 - by Kito Mann
Java EE8 - by Kito Mann
 
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 7: the Voyage of the Cloud Treader
Java EE 7: the Voyage of the Cloud TreaderJava EE 7: the Voyage of the Cloud Treader
Java EE 7: the Voyage of the Cloud Treader
 

Plus de Arun Gupta

Plus de 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
 
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
 
NoSQL - Vital Open Source Ingredient for Modern Success
NoSQL - Vital Open Source Ingredient for Modern SuccessNoSQL - Vital Open Source Ingredient for Modern Success
NoSQL - Vital Open Source Ingredient for Modern Success
 
Package your Java EE Application using Docker and Kubernetes
Package your Java EE Application using Docker and KubernetesPackage your Java EE Application using Docker and Kubernetes
Package your Java EE Application using Docker and Kubernetes
 
Nuts and Bolts of WebSocket Devoxx 2014
Nuts and Bolts of WebSocket Devoxx 2014Nuts and Bolts of WebSocket Devoxx 2014
Nuts and Bolts of WebSocket Devoxx 2014
 

Dernier

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Dernier (20)

🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
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
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.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
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
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)
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
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
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
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...
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
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
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
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...
 

Java EE 6 & GlassFish v3: Paving the path for the future - Spark IT 2010

  • 1. Java EE 6 & GlassFish v3: Paving the path for the future <Insert Picture Here> Arun Gupta, Java EE & GlassFish Guy, Oracle Corp blogs.sun.com/arungupta, @arungupta
  • 2. Are you tweeting ? #glassfish #sparkit
  • 3. Java EE: Past & Present Flexible Ease of Development Java EE 6 Pruning Java EE 5 Extensibility Web Ease of Services Profiles Development Annotations Ease-of-dev J2EE 1.4 EJB 3.0 EJB Lite Web Services, Persistence API RESTful WS Robustness Management, New and CDI 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 Managed Bean 1.0 May 1998 Dec 1999 Sep 2001 Nov 2003 May 2006 Dec 2010 10 specs 13 specs 20 specs 23 specs 28 specs
  • 4. Compatible Java EE 5 Impl http://java.sun.com/javaee/overview/compatibility-javaee5.jsp
  • 5. Compatible Java EE 6 Impls Today: Coming:
  • 6. 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
  • 7. 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
  • 8. Java EE 6 is Lightweight • Pruning • Make some technologies optional • Pruned today, means • Optional in the next release • Deleted in the subsequent releases • Technologies marked in Javadocs • JAX-RPC, EJB 2.x Entity Beans, JAXR, JSR 88
  • 9. 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
  • 10. <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
  • 11. <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
  • 12. Java EE 6 - Done • Specifications approved by the JCP 10 • Reference Implementation is GlassFish v3 • TCK 20 ec D
  • 13. Java EE 6 Specifications • The Platform • Java EE 6 Web Profile 1.0 • Managed Beans 1.0
  • 14. Java EE 6 Specifications New • Context and Dependency Injection for Java EE (JSR 299) • Bean Validation 1.0 (JSR 303) • Java API for RESTful Web Services (JSR 311) • Dependency Injection for Java (JSR 330)
  • 15. 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)
  • 16. 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)
  • 17. 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)
  • 18. 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
  • 19. EoD: Servlets Servlet in Java EE 5: Two Files <!--Deployment descriptor /* Code in Java Class */ web.xml --> <web-app> package com.sun; <servlet> public class MyServlet extends <servlet-name>MyServlet HttpServlet { </servlet-name> public void <servlet-class> doGet(HttpServletRequest com.sun.MyServlet req,HttpServletResponse res) </servlet-class> { </servlet> ... <servlet-mapping> <servlet-name>MyServlet } </servlet-name> ... <url-pattern>/myApp/* } </url-pattern> </servlet-mapping> ... </web-app>
  • 20. 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
  • 21. 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 web.xml ? com.sun.FooHelper http://blogs.sun.com/arungupta/entry/totd_95_ejb_3_1
  • 22. IDE Support for Java EE 6
  • 25. What is GlassFish ? • A community • Users, Partners, Testers, Developers, ... • Started in 2005 on java.net • Application Server • Open Source (CDDL & GPL v2) • Java EE Reference Implementation
  • 26. 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, ... • Administration, Monitoring, Logging, Deployment, ... http://blogs.sun.com/dochez/entry/glassfish_v3_extensions_part_5
  • 27. GlassFish v3 & OSGi • No OSGi APIs are used in GlassFish • HK2 provides abstraction layer • All GlassFish modules are OSGi bundles • Felix is default, also runs on Knopflerfish & Equinox • Can run in an existing shell • 216 modules in v3 http://blogs.sun.com/arungupta/entry/totd_103_glassfish_v3_with http://blogs.sun.com/arungupta/entry/totd_118_managing_osgi_bundles
  • 28. 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
  • 29. Dynamic Languages & Frameworks http://glassfish-scripting.dev.java.net
  • 30. 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
  • 31.
  • 33. 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 • 3rd party scripting clients • JavaScript to begin with
  • 34. Demo GlassFish v3 Monitoring http://blogs.sun.com/arungupta/entry/totd_104_glassfish_v3_monitoring
  • 35. 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
  • 36. 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
  • 37. Boost your productivity Retain session across deployment asadmin redeploy –properties keepSessions=true helloworld.war
  • 39. Oracle said ... “GlassFish joins WebLogic Server in the best Java EE application server offering in the industry” “GlassFish continues as the Java EE RI and as an open source project.” “Oracle plans to add GlassFish Enterprise Server to all WebLogic offerings.” “GlassFish also available as standalone offering.” http://blogs.sun.com/arungupta/entry/glassfish_strategy_by_oracle_sun
  • 40. References • glassfish.org • blogs.sun.com/theaquarium • twitter.com/glassfish • glassfish@sun.com
  • 41. Java EE 6 & GlassFish v3: Paving the path for the future <Insert Picture Here> Arun Gupta, Java EE & GlassFish Guy, Oracle Corp blogs.sun.com/arungupta, @arungupta