IBM WebSphere Application Server Liberty Profile Guide for Developers

Book description

IBM® WebSphere® Application Server V8.5 includes a Liberty profile, which is a highly composable, dynamic application server profile. It is designed for two specific use cases: Developer with a smaller production run time, and production environments. For a developer, it focuses on the tasks that a developer does most frequently and makes it possible for the developer to complete those tasks as quickly and as simply as possible. For production environments, it provides a dynamic, small footprint run time to be able to maximize system resources.

This IBM Redbooks® publication provides you with information to effectively use the WebSphere Application Server V8.5 Liberty profile along with the WebSphere Application Server Developer Tools for Eclipse, for development and testing of web applications that do not require a full Java Platform. It provides a quick guide on getting started, providing a scenario-based approach to demonstrate the capabilities of the Liberty profile along with the developer tools. This provides a simplified, but comprehensive, application development and testing environment.

The intended audience for this book is developers of web and Open Services Gateway initiative (OSGi) applications who are familiar with web and OSGi application concepts.

This book has been updated to reflect the new features in WebSphere Application Server.

Table of contents

  1. Front cover
  2. Notices
    1. Trademarks
  3. IBM Redbooks promotions
  4. Preface
    1. Authors
    2. Now you can become a published author, too!
    3. Comments welcome
    4. Stay connected to IBM Redbooks
  5. Chapter 1. An introduction to the Liberty profile
    1. 1.1 Liberty profile overview
      1. 1.1.1 Programming models
      2. 1.1.2 Supported development environments
      3. 1.1.3 Application development and deployment tools
      4. 1.1.4 Additional resources
    2. 1.2 Simplified configuration
      1. 1.2.1 Server definition
      2. 1.2.2 Server configuration using the server.xml file
      3. 1.2.3 Bootstrap properties
      4. 1.2.4 Portable configuration using variables
      5. 1.2.5 New configuration types and validation
      6. 1.2.6 Encoding passwords
      7. 1.2.7 Shared configuration using includes
      8. 1.2.8 Dynamic configuration updates
    3. 1.3 Runtime composition with features and services
      1. 1.3.1 Feature management
      2. 1.3.2 Automatic service discovery
    4. 1.4 Frictionless application development
      1. 1.4.1 Quick start using dropins
      2. 1.4.2 Configuration-based application deployment
      3. 1.4.3 Using loose configuration for applications
      4. 1.4.4 Configuring an application’s context root
      5. 1.4.5 Compatibility with WebSphere Application Server
    5. 1.5 Product extensions
    6. 1.6 Overview of Java EE 7
      1. 1.6.1 Java EE 7 Web Profile
      2. 1.6.2 Java EE 7 Full Platform
  6. Chapter 2. Installation
    1. 2.1 Installing the WebSphere developer tools
      1. 2.1.1 Installation from Eclipse Marketplace
      2. 2.1.2 Installation from the WASdev community site
      3. 2.1.3 Installation from downloaded installation files
    2. 2.2 Installing the Liberty profile
      1. 2.2.1 Installation using the Liberty profile developer tools
      2. 2.2.2 Installation using the command line
      3. 2.2.3 Installation on z/OS
      4. 2.2.4 The Liberty profile runtime environment and server directory structure
    3. 2.3 Configuring the server runtime JDK
      1. 2.3.1 Defining the JRE from within workbench
      2. 2.3.2 Configuring the system JRE
      3. 2.3.3 Using server.env to define the JRE
      4. 2.3.4 Specifying JVM properties
    4. 2.4 Starting and stopping a Liberty profile server
      1. 2.4.1 Starting and stopping the server by using the command line
      2. 2.4.2 Starting and stopping the server from the workbench
  7. Chapter 3. Developing and deploying web applications
    1. 3.1 Developing applications using the Liberty profile developer tools
      1. 3.1.1 Using the tools to create a simple servlet application
      2. 3.1.2 Developing and deploying a JSP application
      3. 3.1.3 Developing and deploying a JSF application
      4. 3.1.4 Developing and deploying JAX-RS applications
      5. 3.1.5 Using Context and Dependency Injection in web applications with the Liberty profile developer tools
      6. 3.1.6 Developing JAX-WS web services applications with the Liberty profile developer tools
      7. 3.1.7 Developing WebSocket applications with the Liberty profile developer tools
      8. 3.1.8 Debugging applications with the Liberty profile developer tools
    2. 3.2 Developing outside the Liberty profile developer tools
      1. 3.2.1 Feature enablement
      2. 3.2.2 Dynamic application update
      3. 3.2.3 Common development configuration
      4. 3.2.4 Dynamic configuration
      5. 3.2.5 API JAR files
      6. 3.2.6 Debugging applications
      7. 3.2.7 Using Maven to automate tasks for the Liberty profile
      8. 3.2.8 Using Ant to automate tasks for the Liberty profile
    3. 3.3 Controlling class visibility in applications
      1. 3.3.1 Using shared libraries in applications
      2. 3.3.2 Creating a shared library in the Liberty profile developer tools
      3. 3.3.3 Creating a shared library outside of the tools
      4. 3.3.4 Using libraries to override Liberty profile server classes
      5. 3.3.5 Global libraries
      6. 3.3.6 Using a classloader to control API visibility
  8. Chapter 4. Iterative development of OSGi applications
    1. 4.1 Introduction to OSGi applications in Liberty profile
    2. 4.2 Developing OSGi applications in the Liberty profile developer tools
      1. 4.2.1 Using the tools to build an OSGi application
      2. 4.2.2 Using the tools to deploy and test an OSGi application
      3. 4.2.3 Adding an OSGi web application bundle
      4. 4.2.4 Deploying an OSGi application to Liberty in the cloud
    3. 4.3 Developing OSGi applications outside Liberty profile developer tools
      1. 4.3.1 Building and deploying OSGi applications outside of the tools
      2. 4.3.2 Using Maven to automate OSGi development tasks
      3. 4.3.3 Using Ant to automate OSGi development tasks
  9. Chapter 5. Developing enterprise applications with Liberty profile
    1. 5.1 Data access in the Liberty profile
      1. 5.1.1 Accessing data using a data source and JDBC
      2. 5.1.2 Developing JPA applications
      3. 5.1.3 Data access with noSQL database
    2. 5.2 Developing Enterprise JavaBeans applications
      1. 5.2.1 What’s new in developing EJB applications for Liberty profile
      2. 5.2.2 Developing applications using local EJB
      3. 5.2.3 Developing applications using remote EJB
      4. 5.2.4 Developing applications using timers
    3. 5.3 Developing Java Message Service applications
      1. 5.3.1 What’s new in JMS 2.0 API?
      2. 5.3.2 Developing applications using JMS 2.0 API
      3. 5.3.3 Developing a message-driven bean (MDB) application
    4. 5.4 Developing applications using asynchronous and concurrent features
      1. 5.4.1 Developing using @Asynchronous in servlets and filters
      2. 5.4.2 Developing using @Asynchronous in session beans
      3. 5.4.3 Developing using Concurrent API
    5. 5.5 Developing applications using JavaMail
      1. 5.5.1 Writing, testing, and deploying the JavaMail sample application
  10. Chapter 6. Configuring application security
    1. 6.1 Enabling SSL
      1. 6.1.1 Configuration using the WebSphere developer tools
      2. 6.1.2 Configuration using the command line
    2. 6.2 HTTPS redirect
    3. 6.3 Form login
      1. 6.3.1 Defining the basic user registry
      2. 6.3.2 Updating an application to support Form Login
      3. 6.3.3 Defining bindings between the application and the server
    4. 6.4 Securing EJB applications
    5. 6.5 Securing JMS applications
      1. 6.5.1 Setting up user authentication
      2. 6.5.2 Setting up user authorization
    6. 6.6 JAX-WS security
    7. 6.7 Securing NoSQL applications
      1. 6.7.1 Securing MongoDB applications
      2. 6.7.2 Securing CouchDB applications
    8. 6.8 Authenticating users in Liberty profile
      1. 6.8.1 User registries for WebSphere Liberty profile
      2. 6.8.2 Custom authentication methods
  11. Chapter 7. Serviceability and troubleshooting
    1. 7.1 Logs and trace
      1. 7.1.1 Inspecting the output logs and trace
      2. 7.1.2 Configuration of an additional trace
    2. 7.2 Server memory dump
    3. 7.3 MBeans and JConsole
    4. 7.4 OSGi Debug console
    5. 7.5 Event logging feature
    6. 7.6 Slow request detection and hung request detection capabilities
    7. 7.7 Timed Operations feature
  12. Chapter 8. From development to production
    1. 8.1 Configuring a server for production use
      1. 8.1.1 Turning off application monitoring
      2. 8.1.2 Turning off configuration file monitoring
      3. 8.1.3 Generating a web server plug-in configuration
    2. 8.2 Using the package utility
      1. 8.2.1 Packaging a Liberty profile server by using the WebSphere developer tools
      2. 8.2.2 Packaging a Liberty profile server from a command prompt
      3. 8.2.3 Using the Job Manager to package and distribute Liberty profile servers
      4. 8.2.4 Using the Liberty collective to distribute Liberty profile servers
    3. 8.3 Moving an application to the full profile
      1. 8.3.1 Programming model differences between full profile and Liberty profile
      2. 8.3.2 Configuration differences between full profile and Liberty profile
    4. 8.4 Using the Liberty profile on z/OS
      1. 8.4.1 IBM z/OS Connect
      2. 8.4.2 WebSphere optimized local adapters for z/OS
      3. 8.4.3 Disabling z/OS operator console command handling
  13. Chapter 9. Developing and deploying custom features
    1. 9.1 Considerations for creating custom features
    2. 9.2 Defining a custom feature
      1. 9.2.1 Elements of a feature
      2. 9.2.2 Visibility constraints for features, packages, and services
      3. 9.2.3 Subsystem content: Writing a minify-compatible feature
      4. 9.2.4 Using the tools to create a custom feature
      5. 9.2.5 Creating a Liberty feature manually
      6. 9.2.6 Automatic provisioning: Creating an auto-feature
      7. 9.2.7 Packaging native code in your bundles
      8. 9.2.8 Packaging features for delivery
  14. Appendix A. Additional material
    1. Locating the web material
    2. Using the web material
  15. Related publications
    1. Online resources
    2. Help from IBM
  16. Back cover

Product information

  • Title: IBM WebSphere Application Server Liberty Profile Guide for Developers
  • Author(s):
  • Release date: July 2015
  • Publisher(s): IBM Redbooks
  • ISBN: 9780738440873