JBoss Application Server /
Enterprise Application Platform
Jasoct
AS Project Lead
…and Java EE 6
May 4, 2011
Dimitris Andreadis

Software Engineering Manager
JBoss Application Server
Agenda

• A Brief History of JBoss AS
• The Path to Java EE6
 • JBoss AS6
 • JBoss AS7
• Enterprise Application Platform 6 (EAP)
• Beyond Java EE6
About Me

JBoss AS, Engineering Manager                dandreadis.blogspot.com

  •2001, JBoss User
  •2003, JBoss Committer
  •2004, JBoss Full-time Core Developer
  •2006, JBoss AS Lead (v3.2.8+, v4.0.4+, v4.2.x, 5.0.x)
  •2009 - present, Manager of JBoss AS Core Team

And before JBoss?
 •7y experience in distributed systems (telcos, NMS/OSS)
 •BSc/MSc Computer Science (Athens/Dublin)
Agenda

• A Brief History of JBoss AS
• The Path to Java EE6
 • JBoss AS6
 • JBoss AS7
• Enterprise Application Platform 6 (EAP)
• Beyond Java EE6
JBoss AS Timeline
                                                                                                   JavaEE 6 Web Profile, JDK6
                                                                                                   Modular Service Container Architecture


                                                                                    JavaEE 6 Web Profile, JDK6
                                                                                                                           JBoss AS 7.0, 7.0.1, 7.0.2


                                                                                                                  JBoss AS 6.0, 6.1
                                           JavaEE 5 certification, JDK5 & 6
                                           MicroContainer Architecture
                                                                                                   JBoss AS 5.1


                  J2EE 1.4 certification                      JBoss AS 5: 5.0.0.GA, 5.0.1.GA
                  JDK 1.4
 JBoss Versions




                                                                        JBoss AS 4.2.0 – 4.2.3


                                       JBoss AS 4.0.0     – 4.0.5                JEE 5.0 compatible,
                                                                                 not certified (95% pass)
                                                                                 JDK5.0
                         JBoss AS 3.2.0     –     3.2.8
                                                                                                       Time

                  2003         2004             2005       2006         2007         2008          2009           2010        2011

                                    J2EE 1.3, JDK 1.3
                                    JMX MicroKernel Architecture
Agenda

• A Brief History of JBoss AS
• The Path to Java EE6
 • JBoss AS6
 • JBoss AS7
• Enterprise Application Platform 6 (EAP)
• Beyond Java EE6
JBoss AS 6.0/6.1 – Java EE6

• JBoss AS 6.0/6.1
  • Java EE6 Web Profile++ (or EE6 Full--)
  • Based on the 5.x Microcontainer
  • More lightweight than AS5

• New Stuff
  •   HornetQ (Messaging)
  •   Infinispan (Caching)
  •   Apache CXF (Web Services)
  •   mod_cluster
  •   …
JBoss AS 6.0/6.1 – Java EE6 (cont.)

• JBoss AS 6.0/6.1
  •   Deliver faster on Java EE6
  •   Stepping stone for AS7/EAP6
  •   Baking time for EE subsystems
  •   Measure interest on EE profiles


• Gotchas
  • JBoss AS6 will *not* be productized!
  • Currently in community maintenance mode
Planning for AS 7.0

• A hard look at the mirror
  •   Excess baggage (legacy subsystems and abstractions)
  •   Boot time & memory footprint
  •   Embeadability/testability
  •   Administration options


• It’s “free” and it doesn’t suck not enough anymore
  • Give me my Mojo back!
Planning for AS 7.0 (cont.)

• Major Goals
  • Make it Smaller, Faster, Sexier
  • Improve Manageability
  • Simplify Configuration

• Clean things up!
  • Remove abstraction layers
  • Remove legacy stuff
  • Modularize
Agenda

• A Brief History of JBoss AS
• The Path to Java EE6
 • JBoss AS6
 • JBoss AS7
• Enterprise Application Platform 6 (EAP)
• Beyond Java EE6
Introducing JBoss AS 7*!

• AS 7.0 – released Jul/2011
 • EE6 – Web Profile (+JCA, +JAX-RS) certified
 • EE6 “everything” distro

• AS 7.0.1 – released Aug/2011
 • MDB support, JSR-88, JPA w. older Hibernate 3

• AS 7.0.2 – released Sep/2011
 • JSF 2.1, @Asynchronous, PicketLink SSO, etc.


                      *A blazingly fast modular lightweight elegantly administrable
                           compliant application server with easy testing facilities!
AS7 Key Features

• Fast and Lightweight
• Modular, OSGi enabled
• Unified, user focused configuration
• Multiple management interfaces
• Support for multi-node management
AS7 Architecture
                                         JBoss
               MSC                                                          DMR                          Controller                                Threads
                                        Modules


                                                     Server Controller Service

        Deployers                       VFS                      Jandex                      Reflect Cache                                      Repository

                                                                 Core Infrastructure




                                                                                                              FS Secanner

                                                                                                                            Transaction
               Datasource




                                                     Messaging
   Connector




                                                                                  Remoting



                                                                                                   Security




                                                                                                                                                       JAX-RS
                                                                  Naming

                                                                           OSGi
                                 EJB3

                                        Weld




                                                                                             SAR




                                                                                                                                          Web




                                                                                                                                                                JMX
                                               JPA




                                                                                                                                                  WS
                            EE




                                                                       Subsystems
MSC Architecture


                     Service Builder


                    Service Registry


                    Service Controller


   Service   Deps         Value        Listeners   Injectors


              Concurrent Service Container
Key attributes of MSC

Small, lightweight, and efficient
   •216K JAR, Tiny memory overhead
Highly concurrent & scalable state machine
   •State transitions are “tasks”
Services are primarily interface based
   •No reflection or XML required!
Only two non-error, non-transition states
   •UP & DOWN
Multiple startup modes
   •Active, Passive, On-Demand, Lazy, Never
#@*%ing fast!




   http://community.jboss.org/wiki/AS7StartupTimeShowdown
Boot Time Results
Memory Comparison
How is it done?

• Concurrent startup/deployments
• Faster resource lookup/classloading
• Annotation indexing
• Caching reflection metadata
• Lazy loading of (some) services
• StAX based descriptor parsing
• Starting from scratch 
Modularity
Modularity - JBoss Modules
Small, lightweight, and efficient
   •O(1) Dep resolution
   •Concurrent class loading (lockless on most VMs)
   •207k JAR
“Pure” modular class loading
   •Modules only see what they import (includes JDK classes!)
External module definitions
   •Don’t have to break open the JAR
Dynamic
   •Modules can be redefined
Extensible
   •JBoss OSGi implemented on modules
modulesorghornetqmainmodule.xml
<module xmlns="urn:jboss:module:1.0" name="org.hornetq">
  <resources>
    <resource-root path="hornetq-core-2.2.7.Final.jar"/>
    <resource-root path="hornetq-jms-2.2.7.Final.jar"/>
</resources>


  <dependencies>
    <module name="javax.api"/>
    <module name="javax.jms.api" />
    <module name="org.jboss.jts"/>
    <module name="org.jboss.netty"/>
  </dependencies>
</module>
Two Operational Modes

Standalone
  •Traditional JBoss single JVM server
  •Management facilities IN-VM
  •No lifecycle management (only shutdown)
Domain
  •Multi-JVM, multi-server model
  •Management coordinated by Domain Controller Process
  •Multiple server instances (JVMs) per Host
  •Full lifecycle managed by Process Controller
Domain Mode Physical Topology
Filesystem Layout
  jboss-7.1.x
    bin
          standalone.conf        Standalone Mode JVM Parameters

          standalone.sh          Standalone Mode

          domain.sh              Domain Mode
          jboss-admin.sh         Command Line Interface

    bundles      OSGi Bundles

                 Static JBoss Module Definitions
    modules
    standalone
          configuration
                    standalone.xml     Standalone Unified Configuration
          deployments                  File System Deployment
          logs
          data                         Internal Data (includes repository)
Filesystem Layout (cont)

   jboss-7.1.x
     domain
           configuration
                     standalone.xml   Domain Wide Unified Configuration
                     host.xml         Host Controller Configuration

           servers
                     server-one       Server “One” JVM instance data
                              logs
                              data
                     server-two       Server “Two” JVM instance data
                              logs
                              data
User-focused Configuration
<bean name="TransactionManager" class="com.arjuna.ats.jbossatx.jta.TransactionManagerService">
    <annotation>@org.jboss.aop.microcontainer.aspects.jmx.JMX(name="jboss:service=TransactionManager",
exposedInterface=com.arjuna.ats.jbossatx.jta.TransactionManagerServiceMBean.class, registerDirectly=true)</annotation>

<annotation>@org.jboss.managed.api.annotation.ManagementObject(name="TransactionManager",componentType=@org.jb
oss.managed.api.annotation.ManagementComponent(type = "MCBean", subtype =
"JTA"),targetInterface=com.arjuna.ats.jbossatx.jta.TransactionManagerServiceMBean.class)
     </annotation>

    <property name="transactionTimeout">300</property>
    <property name="objectStoreDir">${jboss.server.data.dir}/tx-object-store</property>




<subsystem xmlns="urn:jboss:domain:transactions:1.0">
       <recovery-environment socket-binding="txn-recovery-environment"
                status-socket-binding="txn-status-manager"/>
       <core-environment socket-binding="txn-socket-process-id"/>
</subsystem>
Management APIs

• Command Line Interface (CLI)
• Remote Java API
• HTTP/JSON API
• GWT-based console
Dynamic Model Representation (DMR)

• Central Detyped Management API
   •All management operations operate with/on DMR
   •Strictly backwards compatible
• Represents simple and complex types
   •int, long, big int, double, big dec, boolean, string, bytes, list,
   object, property, expression
• Auto-converts like dynamic languages
• Self describing
• Convertible to/from JSON
• Also has a defined binary protocol (optionally b64)
Roadmap

AS 7.0.2 last version of 7.0 series


AS 7.1 – Targeting EE 6 Full Profile
   • 7.1 Alpha, really soon
   • 7.1 Beta, Oct/2011
   • 7.1 CR/Final, end of 2011

JBoss AS 7.1 will be the base for JBoss
  Enterprise Application Platform 6 (EAP)
Agenda

• A Brief History of JBoss AS
• The Path to Java EE6
 • JBoss AS6
 • JBoss AS7
• Enterprise Application Platform 6 (EAP)
• Beyond Java EE6
The Community JBoss Application Server (AS)
vs. the Enterprise Application Platform (EAP)


• Community Project (JBoss AS)
  •- JBoss As We Know It
  •- Sponsored by JBoss/Red Hat
  •- Allow innovation at a faster pace


• Enterprise Application Platform (EAP)
  •- Forks the community project at stable points
  •- Integrates with JBoss Developer Studio / JBoss Operations Network
  •- Rigorously tested (performance, scalability, SpecJ, etc.)
  •- Certified on multiple OS, JVM, DBs combinations
  •- Cumulative Patch cycles
  •- Supported for 5 + 2 years.
JBoss AS vs JBoss EAP
Agenda

• A Brief History of JBoss AS
• The Path to Java EE6
 • JBoss AS6
 • JBoss AS7
• Enterprise Application Platform 6 (EAP)
• Beyond Java EE6
AS7 PaaS - www.jboss.org/openshift.html
dimitris.andreadis@redhat.com   http://dandreadis.blogspot.com

JBoss AS / EAP and Java EE6

  • 1.
    JBoss Application Server/ Enterprise Application Platform Jasoct AS Project Lead …and Java EE 6 May 4, 2011 Dimitris Andreadis Software Engineering Manager JBoss Application Server
  • 2.
    Agenda • A BriefHistory of JBoss AS • The Path to Java EE6 • JBoss AS6 • JBoss AS7 • Enterprise Application Platform 6 (EAP) • Beyond Java EE6
  • 3.
    About Me JBoss AS,Engineering Manager dandreadis.blogspot.com •2001, JBoss User •2003, JBoss Committer •2004, JBoss Full-time Core Developer •2006, JBoss AS Lead (v3.2.8+, v4.0.4+, v4.2.x, 5.0.x) •2009 - present, Manager of JBoss AS Core Team And before JBoss? •7y experience in distributed systems (telcos, NMS/OSS) •BSc/MSc Computer Science (Athens/Dublin)
  • 4.
    Agenda • A BriefHistory of JBoss AS • The Path to Java EE6 • JBoss AS6 • JBoss AS7 • Enterprise Application Platform 6 (EAP) • Beyond Java EE6
  • 5.
    JBoss AS Timeline JavaEE 6 Web Profile, JDK6 Modular Service Container Architecture JavaEE 6 Web Profile, JDK6 JBoss AS 7.0, 7.0.1, 7.0.2 JBoss AS 6.0, 6.1 JavaEE 5 certification, JDK5 & 6 MicroContainer Architecture JBoss AS 5.1 J2EE 1.4 certification JBoss AS 5: 5.0.0.GA, 5.0.1.GA JDK 1.4 JBoss Versions JBoss AS 4.2.0 – 4.2.3 JBoss AS 4.0.0 – 4.0.5 JEE 5.0 compatible, not certified (95% pass) JDK5.0 JBoss AS 3.2.0 – 3.2.8 Time 2003 2004 2005 2006 2007 2008 2009 2010 2011 J2EE 1.3, JDK 1.3 JMX MicroKernel Architecture
  • 6.
    Agenda • A BriefHistory of JBoss AS • The Path to Java EE6 • JBoss AS6 • JBoss AS7 • Enterprise Application Platform 6 (EAP) • Beyond Java EE6
  • 7.
    JBoss AS 6.0/6.1– Java EE6 • JBoss AS 6.0/6.1 • Java EE6 Web Profile++ (or EE6 Full--) • Based on the 5.x Microcontainer • More lightweight than AS5 • New Stuff • HornetQ (Messaging) • Infinispan (Caching) • Apache CXF (Web Services) • mod_cluster • …
  • 8.
    JBoss AS 6.0/6.1– Java EE6 (cont.) • JBoss AS 6.0/6.1 • Deliver faster on Java EE6 • Stepping stone for AS7/EAP6 • Baking time for EE subsystems • Measure interest on EE profiles • Gotchas • JBoss AS6 will *not* be productized! • Currently in community maintenance mode
  • 9.
    Planning for AS7.0 • A hard look at the mirror • Excess baggage (legacy subsystems and abstractions) • Boot time & memory footprint • Embeadability/testability • Administration options • It’s “free” and it doesn’t suck not enough anymore • Give me my Mojo back!
  • 10.
    Planning for AS7.0 (cont.) • Major Goals • Make it Smaller, Faster, Sexier • Improve Manageability • Simplify Configuration • Clean things up! • Remove abstraction layers • Remove legacy stuff • Modularize
  • 11.
    Agenda • A BriefHistory of JBoss AS • The Path to Java EE6 • JBoss AS6 • JBoss AS7 • Enterprise Application Platform 6 (EAP) • Beyond Java EE6
  • 13.
    Introducing JBoss AS7*! • AS 7.0 – released Jul/2011 • EE6 – Web Profile (+JCA, +JAX-RS) certified • EE6 “everything” distro • AS 7.0.1 – released Aug/2011 • MDB support, JSR-88, JPA w. older Hibernate 3 • AS 7.0.2 – released Sep/2011 • JSF 2.1, @Asynchronous, PicketLink SSO, etc. *A blazingly fast modular lightweight elegantly administrable compliant application server with easy testing facilities!
  • 14.
    AS7 Key Features •Fast and Lightweight • Modular, OSGi enabled • Unified, user focused configuration • Multiple management interfaces • Support for multi-node management
  • 15.
    AS7 Architecture JBoss MSC DMR Controller Threads Modules Server Controller Service Deployers VFS Jandex Reflect Cache Repository Core Infrastructure FS Secanner Transaction Datasource Messaging Connector Remoting Security JAX-RS Naming OSGi EJB3 Weld SAR Web JMX JPA WS EE Subsystems
  • 16.
    MSC Architecture Service Builder Service Registry Service Controller Service Deps Value Listeners Injectors Concurrent Service Container
  • 17.
    Key attributes ofMSC Small, lightweight, and efficient •216K JAR, Tiny memory overhead Highly concurrent & scalable state machine •State transitions are “tasks” Services are primarily interface based •No reflection or XML required! Only two non-error, non-transition states •UP & DOWN Multiple startup modes •Active, Passive, On-Demand, Lazy, Never
  • 18.
    #@*%ing fast! http://community.jboss.org/wiki/AS7StartupTimeShowdown
  • 19.
  • 20.
  • 21.
    How is itdone? • Concurrent startup/deployments • Faster resource lookup/classloading • Annotation indexing • Caching reflection metadata • Lazy loading of (some) services • StAX based descriptor parsing • Starting from scratch 
  • 22.
  • 23.
    Modularity - JBossModules Small, lightweight, and efficient •O(1) Dep resolution •Concurrent class loading (lockless on most VMs) •207k JAR “Pure” modular class loading •Modules only see what they import (includes JDK classes!) External module definitions •Don’t have to break open the JAR Dynamic •Modules can be redefined Extensible •JBoss OSGi implemented on modules
  • 24.
    modulesorghornetqmainmodule.xml <module xmlns="urn:jboss:module:1.0" name="org.hornetq"> <resources> <resource-root path="hornetq-core-2.2.7.Final.jar"/> <resource-root path="hornetq-jms-2.2.7.Final.jar"/> </resources> <dependencies> <module name="javax.api"/> <module name="javax.jms.api" /> <module name="org.jboss.jts"/> <module name="org.jboss.netty"/> </dependencies> </module>
  • 25.
    Two Operational Modes Standalone •Traditional JBoss single JVM server •Management facilities IN-VM •No lifecycle management (only shutdown) Domain •Multi-JVM, multi-server model •Management coordinated by Domain Controller Process •Multiple server instances (JVMs) per Host •Full lifecycle managed by Process Controller
  • 26.
  • 27.
    Filesystem Layout jboss-7.1.x bin standalone.conf Standalone Mode JVM Parameters standalone.sh Standalone Mode domain.sh Domain Mode jboss-admin.sh Command Line Interface bundles OSGi Bundles Static JBoss Module Definitions modules standalone configuration standalone.xml Standalone Unified Configuration deployments File System Deployment logs data Internal Data (includes repository)
  • 28.
    Filesystem Layout (cont) jboss-7.1.x domain configuration standalone.xml Domain Wide Unified Configuration host.xml Host Controller Configuration servers server-one Server “One” JVM instance data logs data server-two Server “Two” JVM instance data logs data
  • 29.
    User-focused Configuration <bean name="TransactionManager"class="com.arjuna.ats.jbossatx.jta.TransactionManagerService"> <annotation>@org.jboss.aop.microcontainer.aspects.jmx.JMX(name="jboss:service=TransactionManager", exposedInterface=com.arjuna.ats.jbossatx.jta.TransactionManagerServiceMBean.class, registerDirectly=true)</annotation> <annotation>@org.jboss.managed.api.annotation.ManagementObject(name="TransactionManager",componentType=@org.jb oss.managed.api.annotation.ManagementComponent(type = "MCBean", subtype = "JTA"),targetInterface=com.arjuna.ats.jbossatx.jta.TransactionManagerServiceMBean.class) </annotation> <property name="transactionTimeout">300</property> <property name="objectStoreDir">${jboss.server.data.dir}/tx-object-store</property> <subsystem xmlns="urn:jboss:domain:transactions:1.0"> <recovery-environment socket-binding="txn-recovery-environment" status-socket-binding="txn-status-manager"/> <core-environment socket-binding="txn-socket-process-id"/> </subsystem>
  • 30.
    Management APIs • CommandLine Interface (CLI) • Remote Java API • HTTP/JSON API • GWT-based console
  • 31.
    Dynamic Model Representation(DMR) • Central Detyped Management API •All management operations operate with/on DMR •Strictly backwards compatible • Represents simple and complex types •int, long, big int, double, big dec, boolean, string, bytes, list, object, property, expression • Auto-converts like dynamic languages • Self describing • Convertible to/from JSON • Also has a defined binary protocol (optionally b64)
  • 32.
    Roadmap AS 7.0.2 lastversion of 7.0 series AS 7.1 – Targeting EE 6 Full Profile • 7.1 Alpha, really soon • 7.1 Beta, Oct/2011 • 7.1 CR/Final, end of 2011 JBoss AS 7.1 will be the base for JBoss Enterprise Application Platform 6 (EAP)
  • 33.
    Agenda • A BriefHistory of JBoss AS • The Path to Java EE6 • JBoss AS6 • JBoss AS7 • Enterprise Application Platform 6 (EAP) • Beyond Java EE6
  • 34.
    The Community JBossApplication Server (AS) vs. the Enterprise Application Platform (EAP) • Community Project (JBoss AS) •- JBoss As We Know It •- Sponsored by JBoss/Red Hat •- Allow innovation at a faster pace • Enterprise Application Platform (EAP) •- Forks the community project at stable points •- Integrates with JBoss Developer Studio / JBoss Operations Network •- Rigorously tested (performance, scalability, SpecJ, etc.) •- Certified on multiple OS, JVM, DBs combinations •- Cumulative Patch cycles •- Supported for 5 + 2 years.
  • 35.
    JBoss AS vsJBoss EAP
  • 37.
    Agenda • A BriefHistory of JBoss AS • The Path to Java EE6 • JBoss AS6 • JBoss AS7 • Enterprise Application Platform 6 (EAP) • Beyond Java EE6
  • 44.
    AS7 PaaS -www.jboss.org/openshift.html
  • 45.
    dimitris.andreadis@redhat.com http://dandreadis.blogspot.com