GlassFish v3, OSGi, Java EE 6 Preview and Tools

Document Sample
GlassFish v3, OSGi, Java EE 6 Preview and Tools Powered By Docstoc
					                    GlassFish v3, OSGi, Java EE 6
                    Preview and Tools


                            … and Spring too if you insist




Alexis Moussine-Pouchkine
GlassFish Team, Sun Microsystems
   Timeline of Project GlassFish




Tomcat
 Jasper
 Catalina
                                                                            v3                        v3
  JSTL                   v1                                              “Prelude”                (Java EE 6)
  Struts     GlassFish
   Crimson    Launch                         v2                                            v2.1
   XSLTC
    Xalan
   Xerces


  JAXB         June      May              Sept.                             Oct/Nov Jan           Fall-2009
JAX-RPC
   JSF         2005      2006             2007                               2008 2008
                           2009 CommunityOne Conference: North | no.sun.com/communityone
                                                                                            (you are here)      2
GlassFish Downloads




              2009 CommunityOne Conference: North | no.sun.com/communityone   3
Actual Usage




               2009 CommunityOne Conference: North | no.sun.com/communityone   4
GlassFish around you




               2009 CommunityOne Conference: North | no.sun.com/communityone   5
If there was only one reason...




                                                          ... we care about both
                 2009 CommunityOne Conference: North | no.sun.com/communityone     6
Introducing
GlassFish v3 Prelude




               2009 CommunityOne Conference: North | no.sun.com/communityone   7
Modular and Dynamic

 Modular : Apache Felix (OSGi)
 Extensible : HK2
 Yet very Fast !
                                                                              Security   Config
                  Grails JRuby/Rails
                              Web                                             Naming Injection

                                            dispatch
                                               GlassFish Kernel
              browser
                                     Grizzly                                                  requests
                                                                           HK2
                 Bundles repositories                                    Services
                                                                       OSGi Runtime
                                                                                              services
                  2009 CommunityOne Conference: North | no.sun.com/communityone                          8
Admin Console




                2009 CommunityOne Conference: North | no.sun.com/communityone   9
GlassFish v3
Developer Features




          2009 CommunityOne Conference: North | no.sun.com/communityone   10
Painless Java EE development !

 Java EE development doesn't have to be painful :)
 Incremental compile of all Java EE artifacts
 Auto-deploy of all Java EE and static artifacts




                  2009 CommunityOne Conference: North | no.sun.com/communityone   11
Session Retention

  Deployment option to maintain stateful sessions
   across re-deployments

$ asadmin redeploy --properties
  keepSessions=true myapp.war

  Greatly simplifies the
    development paradigm.

  Integrated in NetBeans 6.5 :


                   2009 CommunityOne Conference: North | no.sun.com/communityone   12
    Yes, Eclipse too !




GlassFish (v2/v3) + Eclipse 3.4 Tools Bundle: http://download.java.net/glassfish/eclipse/
                               2009 CommunityOne Conference: North | no.sun.com/communityone   13
Update Center




                2009 CommunityOne Conference: North | no.sun.com/communityone   14
Prelude to Java EE 6
(via GlassFish Update Center)

 JSF 2.0 Preview                                     EJB 3.1 Preview
   • Integrated Facelets                                  • WAR packaging
   • First-class Ajax                                     • Singleton
       support                                            • No Interface View
   •   Pub/Sub Events                                     • TimerService
   •   Composite                                          • Asynchronous
       components                                           operations
   •   Better resource                                    • ...
       handling
                                                     JAX-RS 1.0
   •   Groovy integration                                 • Final and supported

                     2009 CommunityOne Conference: North | no.sun.com/communityone   15
JAX-RS (JSR 311) with Jersey

 Making it easy to build RESTful Web services
 Production-quality Reference Implementation
@javax.ws.rs.Path("/users/{id}")
public class UserResource {
    @javax.ws.rs.GET
    @javax.ws.rs.Produces("text/xml")
    public String getUser( @PathParam("id")
      String userName) {
        ...
    }
}

 Final and supported v1.0
 Fine client API too
                  2009 CommunityOne Conference: North | no.sun.com/communityone   16
GlassFish Embedded


  AppServer glassfish = new AppServer(8080);
  glassfish.deployWar(warFile);




              2009 CommunityOne Conference: North | no.sun.com/communityone   17
GlassFish Embedded
public class Main {
  public static void main (String[] args) {
    AppServer glassfish = new AppServer(8080);
    glassfish.deployWar(warFile);
  }
}




                2009 CommunityOne Conference: North | no.sun.com/communityone   18
GlassFish Embedded
 @BeforeClass
 public static void setUpClass () {
   AppServer glassfish = new AppServer(8080);
   glassfish.deployWar(warFile);
 }

 @Test
 public void pingApplication () {
   ...
 }




               2009 CommunityOne Conference: North | no.sun.com/communityone   19
Extending GlassFish v3

 Plain OSGi bundles
  • Drop in glassfish/modules
 Managed OSGi bundles
  • asadmin deploy --type osgi
 HK2 Services
  • Simple services
 SpringBeans
  • TBD...




                      2009 CommunityOne Conference: North | no.sun.com/communityone   20
A lot more ...

 Dynamic languages : Rails, Grails, Django, ...
 Comet, Cometd/Bayeux
 Full support for mod_jk, WebDAV, CGI, SSI
 Web Services Metro 1.4 (.Net 3.5)                      console user

 IPS/pkg(5)        domain.xml
                                   Central Config
                                                  Admin Console
 RESTful admin                                C
                          Container
 Monitoring                Runtime
                                              o
                                              n     GUI Parts
 Extensible              Grizzly Adapter
                                              f
                                              i
   • Engine                                                                    g      Admin commands

   • Admin console                                                       Kernel
   • Config file
                                     client/browser                                    admin invocation
                      2009 CommunityOne Conference: North | no.sun.com/communityone                       21
GlassFish v3 Prelude – Practical

 Get it from http://glassfish.org
 Choice !
  • Eclipse or NetBeans
  • Runs on Java 5 and Java 6 (Java EE 6 will mandate Java 6)
  • Felix or Equinox
 Download size: 26MB
  • Graphical Installer
  • Zip version
  • Community-contributed IzPack installer
 Questions and feedback to :
 USERS@glassfish.dev.java.net or GlassFish forum.
 Supported product, subscriptions available

                     2009 CommunityOne Conference: North | no.sun.com/communityone   22
GlassFish v3 Roadmap

 V3 Prelude
  • Today!

 V3 Final aligned with Java EE 6
  • Starting a series of Milestone releases
  • Targeted for Fall 2009
  • Clustering, central admin likely on the update center

 V3.1 full clustering
  • Likely 6 to 9 months after V3




                      2009 CommunityOne Conference: North | no.sun.com/communityone   23
                       GlassFish v3, OSGi, Java EE 6 Preview
                       and Tools




Alexis Moussine-Pouchkine
alexis.mp@sun.com
http://blogs.sun.com/alexismp