IBM WebSphere Application Server Community Edition Version 3.0 IBM WebSphere Application Server Community Edition Version 3.0 -- More than Java EE 6 In this presentation, you will learn the major features provided in IBM WebSphere® Application Server Community Edition Version 3.0(CE 3.0 hereafter). CE 3.0 is a Java™ EE 6 certified application server, besides that, it also supports OSGi programming model. Agenda Overview Feature highlights OSGi support Summary Q&A Agenda The presentation includes overview, feature highlights, how OSGi programming model is supported and final wrap-up. History History Started in 2005, based on Apache Geronimo Mission Create a free application server from Best-of-Breed Open Source components with world class IBM services Comply with technical specifications for easy development Provide migration paths to other products in WebSphere family IBM WebSphere Community Edition server was firstly release in 2005 as version 1.0, which was based on Apache Geronimo 1.0 and complies with Java EE 5 specifications. As a member of WebSphere family, CE harvests best-of-breed open source components and has been released as a free product for development and use. Furthermore, CE provides migration paths to other products in WebSphere family, such as WebSphere Application Server, WebSphere Application Server Network Deployment. Feature highlights Feature highlights Small Footprint: ~100MB download Liberal product license Free to use in development, testing, and production Custom Server Assembly Customizable server assemblies that contain only components you want or required by your applications Full featured administrative console For almost all daily administrative operations Easing administration, deployment, monitoring, and debugging! Eclipse plug-in with Helios support For creating, deploying, and debugging applications Database Support Integrated Apache Derby for development and production IBM DB2®, MySQL, MS SQL Server, Oracle, and others The footprint of a CE server is about 100 Megabytes. You can use CE server for testing, development or production without any license fee. CE server has a full featured web console for daily operations such as performance tuning, asset management and application deployment. With a fully modularized architecture, you can even extract a new server assembly that contains specific components that you need. CE server embeds Apache Derby as its database server and provides various support to different database vendors such as IBM DB2, MySQl, Oracle, MS SQL server and many more. For application development and debugging, you can use CE server adapter in Eclipse development tools directly. Feature highlight – Custom Server Assembly Feature highlight – Custom Server Assembly Full featured console - it’s even in Chinese! Select the functions you want - that’s it! To customize a new server assembly, you can use CE web console by selecting the functions you want and then follow the wizard. The only thing worth noting is that you must select Geronimo Framework plug-in group for each new server assembly. Behind the scene – An open source party? Behind the scene – An open source party? As the foundation of a CE server, Apache Geronimo integrates lots of open source projects such as OpenEJB, Tomcat, OpenJPA, ActiveMQ, Derby, Tranql, Tuscany and so on. For example, Tomcat is the Web container for both CE server and Geronimo. At the core – Geronimo kernel Geronimo Kernel glues third party components into an application server, wrapping each of them as a GBean. What is GBean? POJO wired with xml configuration or annotation May implement some lifecycle interfaces Managed by Geronimo kernel GBean GBean GBean GBean GBean GBean GBean GBean GBean GBean … Geronimo Kernel Apache Geronimo Kernel At the core – Geronimo kernel Geronimo kernel glues all those open source components into an application server using its GBean techniques. GBean is a POJO wired with xml file configuration or annotations, the life cycle of GBean is managed by Geronimo kernel. Geronimo architecture G Apache Geronimo Kernel Tomcat Java EE Applications Java EE Applications Jetty Open JPA AXIS OWB Wink MyFaces TranQL Active MQ Bean Validation CXF Open EJB Security Transactions Logging Naming Dependency Management Component Repository Component Configuration Lifecycle Management Aries Java EE applications Java EE Server Components Kernel Kernel Services Base Server Components Geronimo architecture Looking at the architecture of Geronimo, the kernel provides kernel services for various components, and each component implements Java EE component specifications. By binding them together, you have a fully compliant Java EE application server. Support service & more Support service & more IBM provides paid support service for Geronimo. IBM also provides a free commercial distribution of Geronimo, called WebSphere Application Server Community Edition. 3 tiers of support contracts available - Very low cost Long lived service/support streams Quick availability of security fixes and hi impact bugs No need to maintain a build environment and support stream. IBM does this for you. Access to experts who are members of the OS development communities Integration with WebSphere family of products Redistributable (need to sign a simple agreement with IBM) IBM provides paid support service for both Geronimo and CE server. As for CE server, IBM provides 3 tiers of support at very low cost for each version and integration with other WebSphere products. If you want to redistribute CE server, you need to sign a simple agreement with IBM. Agenda CE overview CE V3.0 highlight Support for OSGi Enterprise Summary Agenda Now, let’s take a look at some major new features in CE 3.0. What’s new in V3.0 What’s new in V3.0 Java EE 6 support Kernel OSGi-fication OSGi basic programming model support OSGi Enterprise support Development tool empowered for OSGi Improved user experience CE 3.0 re-factored its kernel based on OSGi framework and thus provides a hybrid run time environment for both Java EE and OSGi applications. CE 3.0 is fully compliant with Java EE 6 specifications and provides enterprise support for OSGi applications. You can use CE 3.0 for Java EE application development and an additional OSGi development tool for OSGi development. Java EE 6 support Java EE 6 support JSR Apache implementation Servlet 3.0 Apache Tomcat 7.x EJB 3.1 Apache OpenEJB 3.2.x JPA 2.0 Apache OpenJPA 2.x CDI Apache OpenWebBeans 1.x JAX-WS 2.2 Apache Axis2 2.x / Apache CXF 2.3.x JAX-RS Apache Wink Bean Validation Apache Bean Validation JSF 2.0 Apache Myfaces 2.x JCA 1.6 Apache Geronimo sub project … … This page lists component specifications of Java EE 6 and the corresponding implementation module within CE 3.0. Kernel OSGi-fication (1 of 2) Tomcat bundles OpenEJB bundles OpenJPA bundles OWB bundles … bundles ActiveMQ bundles App Bundles GBean App Bundles … Bundles CE 3.0 is based on Geronimo 3.0, which brings OSGi into its kernel . OSGi Runtime (Felix/Equinox) Provisioning Admin Shell Blueprint OSGi Container – Apache Karaf Geronimo server GBean GBean GBean GBean GBean GBean GBean GBean GBean … Geronimo Kernel Kernel OSGi-fication (1 of 2) GBean is still there and can be exported as OSGi service. Apache Felix or Eclipse Equinox as the OSGi runtime Apache Karaf to bootstrap kernel and components All server components and user applications are OSGi bundles. As for the Geronimo kernel in 3.0, GBeans are still there and they can be exported as OSGi services. All server components and user applications will be managed as OSGi bundles. Apache Karaf is the OSGi container to bootstrap Geronimo kernel and other components. You can choose to use Apache Felix or Eclipse Equinox as your OSGi run time environment cause both modules are embedded in CE server. Kernel OSGi-fication (2 of 2) Class loader rewritten to better manage dependencies Pre-3.0 : Multi-parent class loader One class loader can have more than one parent class loaders. Modules are wired to each other with explicit dependency configuration at module level. Having potential class duplicates/conflicts and class loading performance challenges 3.0 : OSGi Bundle Class loader One class loader for One Bundle/Jar Modules are wired to each other at Java package level in OSGi runtime. Fine-grained dependency App C Class loader System Class loader App A Class loader …… JPA Class loader JSF Class loader App B Class loader Web service Class loader Tomcat Plug-in Tomcat Catalina Tomcat Shared JAX-WS API Tomcat Util Annotation API Servlet API JAXB API … Jasper Pre-3.0: Multi-parent Class loader 3.0: OSGi Bundle Class loader Kernel OSGi-fication (2 of 2) Class loader rewritten to better manage dependencies The advantage of class loading mechanism in CE 3.0 is we use OSGi bundle class loader instead of multi-parent class loader. By using OSGi bundle class loader, each bundle has one class loader and modules are wired to each other at package level. While in multi-parent class loader scenarios, modules are wired to each other with explicit dependency configuration at module level which might lead to certain class casting exceptions and performance issues. OSGi basic programming model support OSGi basic programming model support Bundle and BundleContext can be injected into Java EE components using the @Resource annotation, opening the door to OSGi world… EJB Servlet BundleContext.addXXXListener( ) BundleContext.getBundles( ) BundleContext.getService( ) BundleContext.registerService( ) … As for the support of OSGi programming model, we can use @Resource annotation to inject OSGi bundle and bundle context into Java EE components, thus you can access any resources within a OSGi bundle from an Java EE component such as EJB and servlet. Development tool empowered for OSGi Free Eclipse Plug-in for OSGi Applications Graphical tools to develop OSGi applications and bundles Includes features that increase developer productivity Creates OSGi Applications for any Aries-based server runtime Supports Eclipse WTP 3.6 (Helios) or later http://www.ibm.com/developerworks/rational/downloads/10/rationaldevtoolsforosgiapplications.html CE Eclipse Plug-in (WEP) Provides integrated development and testing environment for Java EE6 and OSGi Applications on CE. Integrated with Web Tools, Java EE productivity tools, and other capabilities in Eclipse OSGi Application Plug-in is optional. If installed, supports development of OSGI EBA. Supports deployment to Geronimo http://geronimo.apache.org/development-tools.html Eclipse WTP PDE JDT … CE Eclipse Plug-in (WEP) OSGi Application Plug-in Community Edition Server Start/stop/publish Development tool empowered for OSGi There are two different tools you can use in Eclipse. CE Eclipse plug-in provides integrated development and testing environment for Java EE 6 and OSGi applications. OSGi application plug-in provides supports for creating OSGi application and bundles. By using both tools together, we can development and test OSGi enterprise applications on CE 3.0 server. Improved user experience Improved user experience Administrative console refactored Enhanced navigation experience with Web 2.0 technology and user engineering Integrated OSGi bundle management console 3rd party component configuration eased Use 3rd-components’ original configuration style In CE 3.0, the navigation panel is redesigned as two new views. For frequently used tasks, you can use basic views and you can use advanced view for full operations to the server. You can also use the quick launch bar to locate a menu by typing keywords. And there is an integrated OSGi management portlet on the console for bundle management. Agenda CE overview CE 3.0 highlight Support for OSGi Enterprise Summary Agenda In the following pages, we’ll learn about some basics regarding OSGi enterprise support. What is it – OSGi Enterprise Spec V4.2 What is it – OSGi Enterprise Spec V4.2 Release on March 22nd, 2010 Made by the OSGi Enterprise Expert Group (EEG) Brings Enterprise technologies and OSGi together Using existing Java SE/EE specifications: JNDI, JPA, JTA, JMX, WebApps… Adds Spring-derived component model and dependency injection container – Blueprint Container Java EE provides the core enterprise application programming model. Deploying modules as OSGi bundles simplifies reuse between applications, provides versioning, encourages (and enforces) modular design and enables dynamic module updates. Embedded Desktop Enterprise OSGi Enterprise specification was released by OSGi Enterprise Expert Group(EEG) on March 22, 2010. The specification intends to integrate existing enterprise technologies such as JNDI, persistence, transaction support into OSGi world. For example, the blueprint container specification is used for dependency injection which is derived from Spring framework. Implementation and extension by Implementation and extension by Apache Aries, a new Apache project for OSGi enterprise support Creating components to enable OSGi Application Programming Model Implementing OSGi EEG standards Blueprint container JNDI integration JPA integration JTA integration JMX META-INF/services handler … Introducing new technologies to push into standards Enterprise Bundle Application: Programming Model for developing, assembling and deploying, as OSGi bundles, modular applications that exploit Java EE and OSGi technologies. Aries is currently used by: Geronimo JBoss OSGi WebSphere Application Server Feature Pack for OSGi Applications and JPA 2.0 Apache Aries becomes a top-level Apache project in 2010 and delivers a set of pluggable Java components for enabling enterprise OSGi application programming model. The Aries project provides enterprise OSGi components such as blueprint container and projects to integrate enterprise technologies such as JNDI, JTA, JPA into OSGi environment to make these available to OSGi bundles. Example – A “Blog” Application Example – A “Blog” Application Blogging Service Blog Persistence Service blog-servlet Web application bundle OSGI-INF/ persistence.xml WEB-INF/ web.xml OSGI-INF/blueprint/ blueprint.xml OSGI-INF/blueprint/ blueprint.xml JNDI EM blog.eba blog blog-persistence blog-api Blueprint Component Model JNDI integration Container-Managed JPA Persistence & JTA Transactions Application Assembly & Deployment The Blog sample is used to demonstrate how to use JPA, JTA and blueprint in an enterprise OSGi application. The blog enterprise bundle application is composed by four bundles: blog-api bundle, blog web bundle, blog persistent bundle and blog business bundle. The blog persistent bundle uses JPA as the persistence layer. Aries Blueprint Container Aries Blueprint Container A DI container standardizing established Spring conventions XML Blueprint definition describes component configuration and scope Optionally publish and consume components to/from OSGi service registry Simplifies unit testing outside either Java EE or OSGi runtime Managed beans publishes service consumes service A static assembly and configuration of components (POJOs)? Blueprint bundle OSGI-INF/blueprint/ blueprint.xml Sample blueprint.xml ..... The Blueprint Container specification uses an extender pattern, whereby an extender bundle monitors the state of bundles in the framework and performs actions on behalf of those bundles based on their state. The Blueprint extender bundle waits for the bundles to be activated and checks whether they are Blueprint bundles. A bundle is considered to be a Blueprint bundle when it contains one or more Blueprint XML files. These XML files are at a fixed location under the OSGI-INF/blueprint/ directory or are specified explicitly in the Bundle-Blueprint manifest header. During initialization, the Blueprint Container ensures that mandatory service references are satisfied, registers all the services into the service registry, and creates initial component instances. The Blueprint extender bundle also destroys the Blueprint Container for a bundle when the bundle is stopped. Aries JNDI integration Aries JNDI integration Provides JNDI-based access to OSGi Service Registry ... registerService InitialContext ic = new InitialContext(); BloggingService blog= ic.lookup("osgi:services/" + BloggingService.class.getName()); getService A way for a Web component to access a Blueprint component OSGi Service Registry JNDI Context Aries JNDI integration provides JNDI-based access to OSGi service registry. You can use blueprint to register OSGi services into the OSGi service Registry. To look up OSGi services, use osgi:services: scheme to locate the service you are looking for. Aries JPA Container – Blueprint Integration Aries JPA Container – Blueprint Integration The Aries JPA container context bundle provides a blueprint namespace for dependency injection of managed JPA resources. Managed persistence units (EntityManagerFactory objects) can be injected with or without a JTA Transaction Services implementation. Managed persistence contexts (EntityManager objects) are only available with a JTA Transaction Services implementation. Both managed persistence units and managed persistence contexts behave as per the JPA specification. Sample blueprint.xml with JPA resource injection and container-managed transactions Aires JPA provides managed persistence for the blueprint container. The Aries JPA container provides JPA support for OSGi persistence bundles. In the OSGi persistence bundle, both managed persistence units and managed persistence contexts behave per the JPA specification. The code snippet on this page is a sample blueprint file with JPA resource injection and container-managed transaction. Aries JTA integration Aries JTA integration Apache Aries integrates the OSGi Transaction Service Reference Implementation (Apache Geronimo Transaction Manager). Transaction-blueprint bundle registers a “jta” Blueprint namespace handler to provide container-managed transactions for BP components. Aries transaction support integrates the OSGi transaction service reference implementation which also serves as Geronimo transaction manager. You can register a JTA blueprint namespace handler to provide container-manager transaction. Aries JMX Integration JMX OSGi Manager <> Framework MBean <> Bundle State MBean <> Service State MBean <> Package State MBean <> Configuration Admin MBean <> Permission Admin MBean <> Provisioning ServiceMBean <> User Admin MBean Permission Admin Configuration Admin Provisioning Service User Admin MBean Server <> Blueprint MBean Aries JMX Integration Implements OSGi JMX specification. Aries JMX bundle automatically registers the JMX MBeans into any javax.management.MBeanServer service in the OSGi Service Registry. Framework MBeans Compendium MBeans Additional Aries MBeans Aries JMX bundle automatically registers the JMX MBeans into any javax.management.MBeanServer service in the OSGi Service Registry. Aries Application Assembly and Deployment – EBA Aries Application Assembly and Deployment – EBA The “application” project provides pluggable infrastructure to support deployment of an application consisting of a collection of bundles as a logical unit from an Enterprise Bundle Archive (archive with .eba extn). An “Enterprise OSGi Application”. Constituent bundles may be contained (“by-value”) in the .eba archive or referenced in APPLICATION.MF Only explicitly declared Services are exposed from the application. Configuration by exception - absence of APPLICATION.MF means: Application content is the set of bundles contained by-value plus any repository-hosted dependencies identified during deployment. Application Manifest Enumerates constituent bundles Declares Application “externals” blog.eba blog-persistence.jar blog.jar blog-servlet.jar Bundle Repository json4j.jar The suffix of an Aries application is EBA, which means enterprise bundle archive. The EBA must have an application.mf manifest file in it. Only explicitly declared services are exposed from the application. Agenda CE overview CE3.0 highlight Support for OSGi Enterprise Summary Agenda Let’s wrap-up the presentation. Summary Summary IBM CE server is a lightweight, customizable server environment that brings together many best-of-breed open source components. CE 3.0 is featured with Java EE 6 and OSGi programming model support, bringing all the benefits of OSGi into the EE world. CE is release by IBM and free-of-charge To summarize the presentation, we need to remember that IBM WebSphere Community server is released by IBM and free to use. It’s a light-weight, customizable server that brings together many best-of-breed open source components. The version 3.0 of CE server is feature with Java EE 6 and OSGi programming model support, and brings all the benefits of OSGi architecture into the Java EE world. Resources Resources Apache Geronimo Project http://geronimo.apache.org/ Apache Geronimo Documentation https://cwiki.apache.org/geronimo/ Apache Aries Project http://incubator.apache.org/aries/ WebSphere Application Server Community Edition http://www.ibm.com/websphere/wasce You may refer to the resources listed on this page to learn more about Apache Geronimo and CE. Feedback Feedback Your feedback is valuable You can help improve the quality of IBM Education Assistant content to better meet your needs by providing feedback. Did you find this module useful? Did it help you solve a problem or answer a question? Do you have suggestions for improvements? Click to send email feedback: mailto:iea@us.ibm.com?subject=Feedback_about_overview.ppt This module is also available in PDF format at: ../overview.pdf You can help improve the quality of IBM Education Assistant content by providing feedback. Trademarks