SlideShare une entreprise Scribd logo
1  sur  22
Télécharger pour lire hors ligne
Java EE: Past & Present
                                                                                                        Right Sizing
                                                                                       Ease of
Creating Quick & Powerful                                                            Development        Java EE 6
                                                                                                        EJB Lite
Web Applications withWeb Services
                                                                                      Java EE 5
                                                                                      Ease of
                                                                                                        Restful WS

Oracle, GlassFish,                                                                    Development
                                                                                                        Web Beans
                                                                                                        Extensibility
                          J2EE 1.4
NetBeans / Eclipse Web Services,
              Robustness
                                                                                      Annotations
                                                                                      EJB 3.0
       Enterprise                                          Management,                Persistence API
      Java Platform             J2EE 1.3                   Deployment,                New and
                                      CMP,
                                                           Async.                     Updated
                                   Connector
                       `                                   Connector                                    Java EE 6
Arun Gupta, GlassFish Guy
          J2EE 1.2                Architecture                                         Web Services

Sun Microsystems, Inc.
         Servlet, JSP,                                                                                  Web Profile
blog.arungupta.me
  JPE
 Project
          EJB, JMS
           RMI/IIOP

            Creating Quick and Powerful Web Applications using Oracle, GlassFish and NetBeans/Eclipse                        1
                                                                                                                   Slide 1
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 5 / 6 Reference Implementation
         > Full Commercial Support from Sun




http://glassfish.org
                Creating Quick and Powerful Web Applications using Oracle, GlassFish and NetBeans/Eclipse
                                                                                                            Slide 2
State of GlassFish
• GlassFish v2
     > Java EE 5 Reference Implementation
     > Clustering, Load-balancing, High Availability
     > Web-based / CLI Administration Console
     > .NET Web services interoperability
     > Current release: GlassFish v2.x
• GlassFish v3
     > Java EE 6 Reference Implementation
     > Modular (OSGi), Embeddable, Extensible
     > Java EE, Rails, Grails, Django, ...
     > Going final this year
          Creating Quick and Powerful Web Applications using Oracle, GlassFish and NetBeans/Eclipse
                                                                                                      Slide 3
Sun GlassFish Enterprise Server

                                          Enterprise Manager



              Customer
              Advocate                                                                eLearning
                                                                                      Credit



 Customer Focused                                                                                 24x7 Support
 Support Team
                                              GlassFish
                                             Open Source
   Sun VIP
                                           Application Server                                     Patches &
   Interoperability
                                                                                                  Upgrades
   Support
          Creating Quick and Powerful Web Applications using Oracle, GlassFish and NetBeans/Eclipse
                                                                                                                 Slide 4
Java EE 6: Ease of Development (EJB.Lite)
        Java EE 5                                                                       Java EE 6
  foo.ear                                                                 foo.war

   foo_web.war                                                            WEB-INF/classes
                                                                           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 ?

            Creating Quick and Powerful Web Applications using Oracle, GlassFish and NetBeans/Eclipse
                                                                                                        Slide 5
EoD Example - Servlets
Servlet in Java EE 5: Create two source files
<!--Deployment descriptor                                   /* Code in Java Class */
  web.xml -->
<web-app>                                                   package com.foo;
  <servlet>                                                 public class MyServlet
    <servlet-name>MyServlet                                 extends HttpServlet {
      </servlet-name>                                       public void
       <servlet-class>                                      doGet(HttpServletRequest
         com.foo.MyServlet
       </servlet-class>                                     req,HttpServletResponse res)
  </servlet>                                                {
  <servlet-mapping>
    <servlet-name>MyServlet                                 ...
       </servlet-name>
    <url-pattern>/myApp/*                                   }
       </url-pattern>
  </servlet-mapping>
   ...                                                      ...
</web-app>
                                                            }


           Creating Quick and Powerful Web Applications using Oracle, GlassFish and NetBeans/Eclipse
                                                                                                       Slide 6
EoD Example - Servlets
Servlet in Java EE 6: In many cases a single source file

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




           Creating Quick and Powerful Web Applications using Oracle, GlassFish and NetBeans/Eclipse
                                                                                                       Slide 7
Java EE 6 Wizards

http://blog.arungupta.me/2008/11/screencast-27-simple-web-application-using-netbeans-6-5-ide-and-glassfish-v3-prelude/
http://blog.arungupta.me/2009/10/totd-108-java-ee-6-web-application-jsf-2-0-jpa-2-0-ejb-3-1-using-oracle-netbeans-and-glassfish/
http://blog.arungupta.me/2009/08/totd-94-a-simple-java-server-faces-2-0-jpa-2-0-application-getting-started-with-java-ee-6-using-netbeans-6-8-m1-glassfish-v3/
http://blog.arungupta.me/2009/08/totd-95-ejb-3-1-java-server-faces-2-0-jpa-2-0-web-application-getting-started-with-java-ee-6-using-netbeans-6-8-m1-glassfish-v3/
http://blog.arungupta.me/2008/11/screencast-28-simple-web-application-using-eclipse-and-glassfish-v3-prelude/
http://blog.arungupta.me/2009/09/totd-102-java-ee-6-servlet-3-0-and-ejb-3-1-wizards-in-eclipse/

                                    Creating Quick and Powerful Web Applications using Oracle, GlassFish and NetBeans/Eclipse
                                                                                                                                                                    Slide 8
Java Persistence API
• Java EE specification that defines Object to
  Relational Mapping
• Annotations to persist POJOs
• JPQL to query database objects
• Requires a Persistence Provider and a Database
  > Common Persistence Providers: TopLinkEssentials,
    EclipseLink, ...
  > Common Databases: Oracle, MySQL, ...




           Creating Quick and Powerful Web Applications using Oracle, GlassFish and NetBeans/Eclipse
                                                                                                       Slide 9
JPA Sample
@Entity class Employee {
     @Id private int id;
     private String firstName;
     private String lastName;
     pubic Employee (int id,
                   String firstName,
                   String lastName) {
      ...
     }

    public String getFullName(){
        return firstName + lastName;
     }
    ...
}




            Creating Quick and Powerful Web Applications using Oracle, GlassFish and NetBeans/Eclipse
                                                                                                        Slide 10
JPA Wizards
http://blog.arungupta.me/2009/09/totd-107-connect-to-oracle-database-using-netbeans/
http://blog.arungupta.me/2009/10/totd-108-java-ee-6-web-application-jsf-2-0-jpa-2-0-ejb-3-1-using-oracle-netbeans-and-glassfish/
http://blog.arungupta.me/2009/08/totd-99-creating-a-java-ee-6-application-using-mysql-jpa-2-0-and-servlet-3-0-with-glassfish-tools-bundle-for-eclipse/
                                     Creating Quick and Powerful Web Applications using Oracle, GlassFish and NetBeans/Eclipse
                                                                                                                                                         Slide 11
RESTful Web Services
•   JAX-RS: Java API for RESTful Web Services
•   Annotation-based server-side API
•   HTTP-centric
•   Jersey: Implementation of JAX-RS
    > Also provides client-side API




             Creating Quick and Powerful Web Applications using Oracle, GlassFish and NetBeans/Eclipse
                                                                                                         Slide 12
JAX-RS Sample
@Path("widgets/{id}")
@Produces("application/widgets+xml")
@Consumes("application/widgets+xml")
public class WidgetResource {
    private Widget w;
    public WidgetResource(@PathParam("id") String id) {
         this.w = locateRecord(id);
    }

    @GET
    Widget getWidget() {
          return w;
    }

    @PUT
    Widget updateWidget(Widget update) {
          w = processUpdate(update);
          return w;
    }
}




            Creating Quick and Powerful Web Applications using Oracle, GlassFish and NetBeans/Eclipse
                                                                                                        Slide 13
RESTful Wizards
http://blog.arungupta.me/2009/10/totd-112-exposing-oracle-database-tables-as-restful-entities-using-jax-rs-glassfish-and-netbeans/


                                 Creating Quick and Powerful Web Applications using Oracle, GlassFish and NetBeans/Eclipse
                                                                                                                                     Slide 14
Dynamic Languages & Frameworks




http://glassfish-scripting.dev.java.net
                    Creating Quick and Powerful Web Applications using Oracle, GlassFish and NetBeans/Eclipse
                                                                                                                Slide 15
Rails Deployment Choices




                                                                                Credits: http://birdwatchersdigest.com




       Creating Quick and Powerful Web Applications using Oracle, GlassFish and NetBeans/Eclipse
                                                                                                                         Slide 16
http://blog.arungupta.me/2008/11/screencast-26-developrundebug-rails-application-using-netbeans-ide-and-glassfish-v3-prelude/
http://blog.arungupta.me/2009/10/totd-110-jruby-on-rails-application-using-oracle-on-glassfish/
http://blog.arungupta.me/2009/10/totd-111-rails-scaffold-for-a-pre-existing-table-using-oracle-and-glassfish/

                                   Creating Quick and Powerful Web Applications using Oracle, GlassFish and NetBeans/Eclipse
                                                                                                                                Slide 17
Extending GlassFish ... 1, 2, 3.
    @Service(name="mycommand")
    @Scoped(PerLookup.class)
    public class CLIPluggabilityCommand implements AdminCommand {
    ...
    }

    ...
    // this value can be either runtime or os for our demo
    @Param(primary=true)
    String inParam;
    ...

   public void execute(AdminCommandContext context) {
   ...
   }


http://java.net/blog/2008/11/07/extending-glassfish-v3-prelude-easy-1-2-3


                                    Creating Quick and Powerful Web Applications using Oracle, GlassFish and NetBeans/Eclipse
                                                                                                                                Slide 18
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




http://blog.arungupta.me/2009/09/totd-104-glassfish-v3-monitoring-how-to-monitor-a-rails-app-using-asadmin-javascript-jconsole-rest/
                                      Creating Quick and Powerful Web Applications using Oracle, GlassFish and NetBeans/Eclipse
                                                                                                                                       Slide 19
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


http://blog.arungupta.me/2009/08/totd-96-glassfish-v3-rest-interface-to-monitoring-and-management-json-xml-and-html-representations/
                                   Creating Quick and Powerful Web Applications using Oracle, GlassFish and NetBeans/Eclipse
                                                                                                                                       Slide 20
References
•   glassfish.org
•   blogs.sun.com/theaquarium
•   twitter.com/glassfish
•   glassfish@sun.com




          Creating Quick and Powerful Web Applications using Oracle, GlassFish and NetBeans/Eclipse
                                                                                                      Slide 21
Java EE: Past & Present
                                                                                                        Right Sizing
                                                                                       Ease of
Creating Quick & Powerful                                                            Development        Java EE 6
                                                                                                        EJB Lite
Web Applications withWeb Services
                                                                                      Java EE 5
                                                                                      Ease of
                                                                                                        Restful WS

Oracle, GlassFish,                                                                    Development
                                                                                                        Web Beans
                                                                                                        Extensibility
                          J2EE 1.4
NetBeans / Eclipse Web Services,
              Robustness
                                                                                      Annotations
                                                                                      EJB 3.0
       Enterprise                                          Management,                Persistence API
      Java Platform             J2EE 1.3                   Deployment,                New and
                                      CMP,
                                                           Async.                     Updated
                                   Connector
                       `                                   Connector                                    Java EE 6
Arun Gupta, GlassFish Guy
          J2EE 1.2                Architecture                                         Web Services

Sun Microsystems, Inc.
         Servlet, JSP,                                                                                  Web Profile
  JPE     EJB, JMS
blog.arungupta.me
 Project   RMI/IIOP

            Creating Quick and Powerful Web Applications using Oracle, GlassFish and NetBeans/Eclipse                         22
                                                                                                                   Slide 22

Contenu connexe

Tendances

Jfokus 2012 : The Java EE 7 Platform: Developing for the Cloud
Jfokus 2012 : The Java EE 7 Platform: Developing for the CloudJfokus 2012 : The Java EE 7 Platform: Developing for the Cloud
Jfokus 2012 : The Java EE 7 Platform: Developing for the Cloud
Arun Gupta
 
Jfokus 2012: PaaSing a Java EE Application
Jfokus 2012: PaaSing a Java EE ApplicationJfokus 2012: PaaSing a Java EE Application
Jfokus 2012: PaaSing a Java EE Application
Arun Gupta
 

Tendances (20)

The Java EE 7 Platform: Developing for the Cloud
The Java EE 7 Platform: Developing for the CloudThe Java EE 7 Platform: Developing for the Cloud
The Java EE 7 Platform: Developing for the Cloud
 
TDC 2011: OSGi-enabled Java EE Application
TDC 2011: OSGi-enabled Java EE ApplicationTDC 2011: OSGi-enabled Java EE Application
TDC 2011: OSGi-enabled Java EE Application
 
WebLogic 12c Developer Deep Dive at Oracle Develop India 2012
WebLogic 12c Developer Deep Dive at Oracle Develop India 2012WebLogic 12c Developer Deep Dive at Oracle Develop India 2012
WebLogic 12c Developer Deep Dive at Oracle Develop India 2012
 
Java EE 6 and GlassFish portfolio
Java EE 6 and GlassFish portfolioJava EE 6 and GlassFish portfolio
Java EE 6 and GlassFish portfolio
 
GlassFish REST Administration Backend
GlassFish REST Administration BackendGlassFish REST Administration Backend
GlassFish REST Administration Backend
 
Java EE 7: Developing for the Cloud at Java Day, Istanbul, May 2012
Java EE 7: Developing for the Cloud at Java Day, Istanbul, May 2012Java EE 7: Developing for the Cloud at Java Day, Istanbul, May 2012
Java EE 7: Developing for the Cloud at Java Day, Istanbul, May 2012
 
Java EE / GlassFish Strategy & Roadmap @ JavaOne 2011
Java EE / GlassFish Strategy & Roadmap @ JavaOne 2011Java EE / GlassFish Strategy & Roadmap @ JavaOne 2011
Java EE / GlassFish Strategy & Roadmap @ JavaOne 2011
 
Java EE 7: Developing for the Cloud at Geecon, JEEConf, Johannesburg
Java EE 7: Developing for the Cloud at Geecon, JEEConf, JohannesburgJava EE 7: Developing for the Cloud at Geecon, JEEConf, Johannesburg
Java EE 7: Developing for the Cloud at Geecon, JEEConf, Johannesburg
 
GlassFish & Java EE Business Update @ CEJUG
GlassFish & Java EE Business Update @ CEJUGGlassFish & Java EE Business Update @ CEJUG
GlassFish & Java EE Business Update @ CEJUG
 
The Java EE 7 Platform: Productivity & HTML5 at JavaOne Latin America 2012
The Java EE 7 Platform: Productivity & HTML5 at JavaOne Latin America 2012The Java EE 7 Platform: Productivity & HTML5 at JavaOne Latin America 2012
The Java EE 7 Platform: Productivity & HTML5 at JavaOne Latin America 2012
 
Running your Java EE 6 applications in the Cloud
Running your Java EE 6 applications in the CloudRunning your Java EE 6 applications in the Cloud
Running your Java EE 6 applications in the Cloud
 
Jfokus 2012 : The Java EE 7 Platform: Developing for the Cloud
Jfokus 2012 : The Java EE 7 Platform: Developing for the CloudJfokus 2012 : The Java EE 7 Platform: Developing for the Cloud
Jfokus 2012 : The Java EE 7 Platform: Developing for the Cloud
 
Jfokus 2012: PaaSing a Java EE Application
Jfokus 2012: PaaSing a Java EE ApplicationJfokus 2012: PaaSing a Java EE Application
Jfokus 2012: PaaSing a Java EE Application
 
The State of Java under Oracle at JCertif 2011
The State of Java under Oracle at JCertif 2011The State of Java under Oracle at JCertif 2011
The State of Java under Oracle at JCertif 2011
 
Java Summit Chennai: JAX-RS 2.0
Java Summit Chennai: JAX-RS 2.0Java Summit Chennai: JAX-RS 2.0
Java Summit Chennai: JAX-RS 2.0
 
Building HTML5 WebSocket Apps in Java at JavaOne Latin America 2012
Building HTML5 WebSocket Apps in Java at JavaOne Latin America 2012Building HTML5 WebSocket Apps in Java at JavaOne Latin America 2012
Building HTML5 WebSocket Apps in Java at JavaOne Latin America 2012
 
GlassFish REST Administration Backend at JavaOne India 2012
GlassFish REST Administration Backend at JavaOne India 2012GlassFish REST Administration Backend at JavaOne India 2012
GlassFish REST Administration Backend at JavaOne India 2012
 
Designing JEE Application Structure
Designing JEE Application StructureDesigning JEE Application Structure
Designing JEE Application Structure
 
PaaSing a Java EE 6 Application at Geecon 2012
PaaSing a Java EE 6 Application at Geecon 2012PaaSing a Java EE 6 Application at Geecon 2012
PaaSing a Java EE 6 Application at Geecon 2012
 
JBoss Application Server 7
JBoss Application Server 7JBoss Application Server 7
JBoss Application Server 7
 

En vedette (7)

Cejv659 week09 glassfish-s14
Cejv659 week09 glassfish-s14Cejv659 week09 glassfish-s14
Cejv659 week09 glassfish-s14
 
Getting Started with the NetBeans Platform
Getting Started with the NetBeans PlatformGetting Started with the NetBeans Platform
Getting Started with the NetBeans Platform
 
Eclipse Vs Netbeans
Eclipse Vs NetbeansEclipse Vs Netbeans
Eclipse Vs Netbeans
 
What's New in NetBeans IDE 7.x
What's New in NetBeans IDE 7.xWhat's New in NetBeans IDE 7.x
What's New in NetBeans IDE 7.x
 
JavaFX 8 - GUI by Illusion
JavaFX 8 - GUI by IllusionJavaFX 8 - GUI by Illusion
JavaFX 8 - GUI by Illusion
 
JavaFX Presentation
JavaFX PresentationJavaFX Presentation
JavaFX Presentation
 
Java Basics for selenium
Java Basics for seleniumJava Basics for selenium
Java Basics for selenium
 

Similaire à Creating Quick and Powerful Web applications with Oracle, GlassFish and NetBeans/Eclipse

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

Similaire à Creating Quick and Powerful Web applications with Oracle, GlassFish and NetBeans/Eclipse (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
 
Sun Java EE 6 Overview
Sun Java EE 6 OverviewSun Java EE 6 Overview
Sun Java EE 6 Overview
 
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
 
Java EE 6 & GlassFish v3: Paving the path for the future - Spark IT 2010
Java EE 6 & GlassFish v3: Paving the path for the future - Spark IT 2010Java EE 6 & GlassFish v3: Paving the path for the future - Spark IT 2010
Java EE 6 & GlassFish v3: Paving the path for the future - Spark IT 2010
 
Java EE 6 : Paving The Path For The Future
Java EE 6 : Paving The Path For The FutureJava EE 6 : Paving The Path For The Future
Java EE 6 : Paving The Path For The Future
 
Java EE 6 & GlassFish v3: Paving the path for the future - Tech Days 2010 India
Java EE 6 & GlassFish v3: Paving the path for the future - Tech Days 2010 IndiaJava EE 6 & GlassFish v3: Paving the path for the future - Tech Days 2010 India
Java EE 6 & GlassFish v3: Paving the path for the future - Tech Days 2010 India
 
Glassfish - FISL10 - Arun Gupta
Glassfish - FISL10 - Arun GuptaGlassfish - FISL10 - Arun Gupta
Glassfish - FISL10 - Arun Gupta
 
Java EE 6 & GlassFish v3 at Vancouver JUG, Jan 26, 2010
Java EE 6 & GlassFish v3 at Vancouver JUG, Jan 26, 2010Java EE 6 & GlassFish v3 at Vancouver JUG, Jan 26, 2010
Java EE 6 & GlassFish v3 at Vancouver JUG, Jan 26, 2010
 
JavaEE 6 and GlassFish v3 at SFJUG
JavaEE 6 and GlassFish v3 at SFJUGJavaEE 6 and GlassFish v3 at SFJUG
JavaEE 6 and GlassFish v3 at SFJUG
 
JUG Darmstadt - Java EE 7 - Auf in die Wolken!
JUG Darmstadt - Java EE 7 - Auf in die Wolken!JUG Darmstadt - Java EE 7 - Auf in die Wolken!
JUG Darmstadt - Java EE 7 - Auf in die Wolken!
 
GlassFish OSGi Server
GlassFish OSGi ServerGlassFish OSGi Server
GlassFish OSGi Server
 
Java EE 6 & GlassFish 3
Java EE 6 & GlassFish 3Java EE 6 & GlassFish 3
Java EE 6 & GlassFish 3
 
Java EE 7 - Into the Cloud
Java EE 7 - Into the CloudJava EE 7 - Into the Cloud
Java EE 7 - Into the Cloud
 
Java E
Java EJava E
Java E
 
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
 
Java EE 6 & GlassFish v3 @ DevNexus
Java EE 6 & GlassFish v3 @ DevNexusJava EE 6 & GlassFish v3 @ DevNexus
Java EE 6 & GlassFish v3 @ DevNexus
 
Andrei Niculae - glassfish - 24mai2011
Andrei Niculae - glassfish - 24mai2011Andrei Niculae - glassfish - 24mai2011
Andrei Niculae - glassfish - 24mai2011
 
Introduction To J Boss Seam
Introduction To J Boss SeamIntroduction To J Boss Seam
Introduction To J Boss Seam
 
Java Enterprise Edition 6 Overview
Java Enterprise Edition 6 OverviewJava Enterprise Edition 6 Overview
Java Enterprise Edition 6 Overview
 

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
 
Java EE and NoSQL using JBoss EAP 7 and OpenShift
Java EE and NoSQL using JBoss EAP 7 and OpenShiftJava EE and NoSQL using JBoss EAP 7 and OpenShift
Java EE and NoSQL using JBoss EAP 7 and OpenShift
 
Docker, Kubernetes, and Mesos recipes for Java developers
Docker, Kubernetes, and Mesos recipes for Java developersDocker, Kubernetes, and Mesos recipes for Java developers
Docker, Kubernetes, and Mesos recipes for Java developers
 
Thanks Managers!
Thanks Managers!Thanks Managers!
Thanks Managers!
 
Migrate your traditional VM-based Clusters to Containers
Migrate your traditional VM-based Clusters to ContainersMigrate your traditional VM-based Clusters to Containers
Migrate your traditional VM-based Clusters to Containers
 

Dernier

IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Dernier (20)

Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
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
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
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...
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
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
 
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...
 
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...
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
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
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 

Creating Quick and Powerful Web applications with Oracle, GlassFish and NetBeans/Eclipse

  • 1. Java EE: Past & Present Right Sizing Ease of Creating Quick & Powerful Development Java EE 6 EJB Lite Web Applications withWeb Services Java EE 5 Ease of Restful WS Oracle, GlassFish, Development Web Beans Extensibility J2EE 1.4 NetBeans / Eclipse Web Services, Robustness Annotations EJB 3.0 Enterprise Management, Persistence API Java Platform J2EE 1.3 Deployment, New and CMP, Async. Updated Connector ` Connector Java EE 6 Arun Gupta, GlassFish Guy J2EE 1.2 Architecture Web Services Sun Microsystems, Inc. Servlet, JSP, Web Profile blog.arungupta.me JPE Project EJB, JMS RMI/IIOP Creating Quick and Powerful Web Applications using Oracle, GlassFish and NetBeans/Eclipse 1 Slide 1
  • 2. 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 5 / 6 Reference Implementation > Full Commercial Support from Sun http://glassfish.org Creating Quick and Powerful Web Applications using Oracle, GlassFish and NetBeans/Eclipse Slide 2
  • 3. State of GlassFish • GlassFish v2 > Java EE 5 Reference Implementation > Clustering, Load-balancing, High Availability > Web-based / CLI Administration Console > .NET Web services interoperability > Current release: GlassFish v2.x • GlassFish v3 > Java EE 6 Reference Implementation > Modular (OSGi), Embeddable, Extensible > Java EE, Rails, Grails, Django, ... > Going final this year Creating Quick and Powerful Web Applications using Oracle, GlassFish and NetBeans/Eclipse Slide 3
  • 4. Sun GlassFish Enterprise Server Enterprise Manager Customer Advocate eLearning Credit Customer Focused 24x7 Support Support Team GlassFish Open Source Sun VIP Application Server Patches & Interoperability Upgrades Support Creating Quick and Powerful Web Applications using Oracle, GlassFish and NetBeans/Eclipse Slide 4
  • 5. Java EE 6: Ease of Development (EJB.Lite) Java EE 5 Java EE 6 foo.ear foo.war foo_web.war WEB-INF/classes 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 ? Creating Quick and Powerful Web Applications using Oracle, GlassFish and NetBeans/Eclipse Slide 5
  • 6. EoD Example - Servlets Servlet in Java EE 5: Create two source files <!--Deployment descriptor /* Code in Java Class */ web.xml --> <web-app> package com.foo; <servlet> public class MyServlet <servlet-name>MyServlet extends HttpServlet { </servlet-name> public void <servlet-class> doGet(HttpServletRequest com.foo.MyServlet </servlet-class> req,HttpServletResponse res) </servlet> { <servlet-mapping> <servlet-name>MyServlet ... </servlet-name> <url-pattern>/myApp/* } </url-pattern> </servlet-mapping> ... ... </web-app> } Creating Quick and Powerful Web Applications using Oracle, GlassFish and NetBeans/Eclipse Slide 6
  • 7. EoD Example - Servlets Servlet in Java EE 6: In many cases a single source file package com.foo; @WebServlet(name=”MyServlet”, urlPattern=”/myApp/*”) public class MyServlet extends HttpServlet { public void doGet(HttpServletRequest req, HttpServletResponse res) { ... } Creating Quick and Powerful Web Applications using Oracle, GlassFish and NetBeans/Eclipse Slide 7
  • 8. Java EE 6 Wizards http://blog.arungupta.me/2008/11/screencast-27-simple-web-application-using-netbeans-6-5-ide-and-glassfish-v3-prelude/ http://blog.arungupta.me/2009/10/totd-108-java-ee-6-web-application-jsf-2-0-jpa-2-0-ejb-3-1-using-oracle-netbeans-and-glassfish/ http://blog.arungupta.me/2009/08/totd-94-a-simple-java-server-faces-2-0-jpa-2-0-application-getting-started-with-java-ee-6-using-netbeans-6-8-m1-glassfish-v3/ http://blog.arungupta.me/2009/08/totd-95-ejb-3-1-java-server-faces-2-0-jpa-2-0-web-application-getting-started-with-java-ee-6-using-netbeans-6-8-m1-glassfish-v3/ http://blog.arungupta.me/2008/11/screencast-28-simple-web-application-using-eclipse-and-glassfish-v3-prelude/ http://blog.arungupta.me/2009/09/totd-102-java-ee-6-servlet-3-0-and-ejb-3-1-wizards-in-eclipse/ Creating Quick and Powerful Web Applications using Oracle, GlassFish and NetBeans/Eclipse Slide 8
  • 9. Java Persistence API • Java EE specification that defines Object to Relational Mapping • Annotations to persist POJOs • JPQL to query database objects • Requires a Persistence Provider and a Database > Common Persistence Providers: TopLinkEssentials, EclipseLink, ... > Common Databases: Oracle, MySQL, ... Creating Quick and Powerful Web Applications using Oracle, GlassFish and NetBeans/Eclipse Slide 9
  • 10. JPA Sample @Entity class Employee { @Id private int id; private String firstName; private String lastName; pubic Employee (int id, String firstName, String lastName) { ... } public String getFullName(){ return firstName + lastName; } ... } Creating Quick and Powerful Web Applications using Oracle, GlassFish and NetBeans/Eclipse Slide 10
  • 12. RESTful Web Services • JAX-RS: Java API for RESTful Web Services • Annotation-based server-side API • HTTP-centric • Jersey: Implementation of JAX-RS > Also provides client-side API Creating Quick and Powerful Web Applications using Oracle, GlassFish and NetBeans/Eclipse Slide 12
  • 13. JAX-RS Sample @Path("widgets/{id}") @Produces("application/widgets+xml") @Consumes("application/widgets+xml") public class WidgetResource { private Widget w; public WidgetResource(@PathParam("id") String id) { this.w = locateRecord(id); } @GET Widget getWidget() { return w; } @PUT Widget updateWidget(Widget update) { w = processUpdate(update); return w; } } Creating Quick and Powerful Web Applications using Oracle, GlassFish and NetBeans/Eclipse Slide 13
  • 14. RESTful Wizards http://blog.arungupta.me/2009/10/totd-112-exposing-oracle-database-tables-as-restful-entities-using-jax-rs-glassfish-and-netbeans/ Creating Quick and Powerful Web Applications using Oracle, GlassFish and NetBeans/Eclipse Slide 14
  • 15. Dynamic Languages & Frameworks http://glassfish-scripting.dev.java.net Creating Quick and Powerful Web Applications using Oracle, GlassFish and NetBeans/Eclipse Slide 15
  • 16. Rails Deployment Choices Credits: http://birdwatchersdigest.com Creating Quick and Powerful Web Applications using Oracle, GlassFish and NetBeans/Eclipse Slide 16
  • 18. Extending GlassFish ... 1, 2, 3. @Service(name="mycommand") @Scoped(PerLookup.class) public class CLIPluggabilityCommand implements AdminCommand { ... } ... // this value can be either runtime or os for our demo @Param(primary=true) String inParam; ... public void execute(AdminCommandContext context) { ... } http://java.net/blog/2008/11/07/extending-glassfish-v3-prelude-easy-1-2-3 Creating Quick and Powerful Web Applications using Oracle, GlassFish and NetBeans/Eclipse Slide 18
  • 19. 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 http://blog.arungupta.me/2009/09/totd-104-glassfish-v3-monitoring-how-to-monitor-a-rails-app-using-asadmin-javascript-jconsole-rest/ Creating Quick and Powerful Web Applications using Oracle, GlassFish and NetBeans/Eclipse Slide 19
  • 20. 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 http://blog.arungupta.me/2009/08/totd-96-glassfish-v3-rest-interface-to-monitoring-and-management-json-xml-and-html-representations/ Creating Quick and Powerful Web Applications using Oracle, GlassFish and NetBeans/Eclipse Slide 20
  • 21. References • glassfish.org • blogs.sun.com/theaquarium • twitter.com/glassfish • glassfish@sun.com Creating Quick and Powerful Web Applications using Oracle, GlassFish and NetBeans/Eclipse Slide 21
  • 22. Java EE: Past & Present Right Sizing Ease of Creating Quick & Powerful Development Java EE 6 EJB Lite Web Applications withWeb Services Java EE 5 Ease of Restful WS Oracle, GlassFish, Development Web Beans Extensibility J2EE 1.4 NetBeans / Eclipse Web Services, Robustness Annotations EJB 3.0 Enterprise Management, Persistence API Java Platform J2EE 1.3 Deployment, New and CMP, Async. Updated Connector ` Connector Java EE 6 Arun Gupta, GlassFish Guy J2EE 1.2 Architecture Web Services Sun Microsystems, Inc. Servlet, JSP, Web Profile JPE EJB, JMS blog.arungupta.me Project RMI/IIOP Creating Quick and Powerful Web Applications using Oracle, GlassFish and NetBeans/Eclipse 22 Slide 22