You are previewing Mastering JBoss Enterprise Application Platform 7.
O'Reilly logo
Mastering JBoss Enterprise Application Platform 7

Book Description

Create modular scalable enterprise-grade applications with JBoss Enterprise Application Platform 7

About This Book

  • Leverage the power of JBoss EAP 7 along with Java EE 7 to create professional enterprise grade applications.

  • Get you applications cloud ready and make them highly scalable using this advanced guide.

  • Become a pro Java Developer and move ahead of the crowd with this advanced practical guide.

  • Who This Book Is For

    The ideal target audience for this book is Java System Administrators who already have some experience with JBoss EAP and who now want explore in depth creating Enterprise grade apps with the latest JBoss EAP version.

    What You Will Learn

  • Configure services using the Command Line Interface

  • Deliver fault tolerant server configurations

  • Harden the application server with advanced techniques

  • Expand the application server's horizon with tools such as like Docker/OpenShift

  • Create enterprise ready configurations using clustering techniques.

  • Deliver advanced security solutions and learn how to troubleshoot common network/performance issues

  • In Detail

    The JBoss Enterprise Application Platform (EAP) has been one of the most popular tools for Java developers to create modular, cloud-ready, and modern applications. It has achieved a reputation for architectural excellence and technical savvy, making it a solid and efficient environment for delivering your applications.

    The book will first introduce application server configuration and the management instruments that can be used to control the application server. Next, the focus will shift to enterprise solutions such as clustering, load balancing, and data caching; this will be the core of the book. We will also discuss services provided by the application server, such as database connectivity and logging. We focus on real-world example configurations and how to avoid common mistakes. Finally, we will implement the knowledge gained so far in terms of Docker containers and cloud availability using RedHat's OpenShift.

    Style and approach

    If you are a Java developer who wants to level-up to modern day Java web development with the latest Java EE 7 and JBoss EAP 7, this book is the ideal solution for you. It addresses (in a clear and simple way) proof-of-concept scenarios such as clustering and cloud and container configurations, and explains how to solve common issues.

    Downloading the example code for this book. You can download the example code files for all Packt books you have purchased from your account at http://www.PacktPub.com. If you purchased this book elsewhere, you can visit http://www.PacktPub.com/support and register to have the code file.

    Table of Contents

    1. Mastering JBoss Enterprise Application Platform 7
      1. Mastering JBoss Enterprise Application Platform 7
      2. Credits
      3. About the Authors
      4. About the Reviewer
      5. www.PacktPub.com
        1. Why subscribe?
        2. Free access for Packt account holders
      6. Preface
        1. What this book covers
        2. What you need for this book
        3. Who this book is for
        4. Conventions
        5. Reader feedback
        6. Customer support
          1. Downloading the example code
          2. Downloading the color images of this book
          3. Errata
          4. Piracy
          5. Questions
      7. 1. Installation and Configuration
        1. What's new in EAP 7?
        2. Installing EAP 7
          1. Installing from the ZIP file
          2. Installing EAP from RPM
          3. Installing from the JAR installer
          4. Installing from the source
          5. Other installation options
        3. Starting the application server
        4. Stopping the application server
        5. Basic server administration
        6. EAP 7 basic configuration
          1. Standalone configuration
          2. Domain configuration
        7. Application server core building blocks
          1. Extensions
          2. Paths
          3. Interfaces
          4. Socket bindings and socket binding groups
          5. System properties
          6. Profiles and subsystems
        8. Summary
      8. 2. The CLI Management Tool
        1. Connecting to the CLI
        2. Using the CLI
        3. Basic operations
          1. Managing server state
          2. Deploying and undeploying an application using CLI
          3. Creating a configuration snapshot
        4. Features of the CLI
          1. Batch mode
            1. Commands in batch mode
          2. Scripting in the CLI
          3. Using the CLI in offline mode
          4. Using the CLI in graphical mode
        5. Summary
      9. 3. Managing EAP in Domain Mode
        1. Domain mode breakdown
          1. Domain physical components
          2. Domain logical components
        2. Handy domain properties
        3. Electing the domain controller
        4. Creating an advanced domain
          1. Building up your domain
          2. Configuring host controllers
            1. Connecting other host controllers
          3. Tweaking the domain settings
        5. Domain controller failover
          1. Basic solution – building a watchdog procedure
          2. Using domain start up options to allow host controller restart
          3. Using domain discovery to elect a new domain controller
          4. Using a centralized store for your server configurations
        6. Additional EAP 7 features
          1. Connecting EAP 6 host controllers to an EAP 7 domain controller
          2. Hierarchical profiles
          3. Profile cloning
        7. Summary
      10. 4. Deploying Applications
        1. Overview of deployments
        2. Deployment in standalone mode
          1. Automatic deployment
          2. Deployment triggered by the user
          3. Deploying using the CLI
          4. Deploying using the web console
        3. Deployment in domain mode
          1. Deployment using the CLI
          2. Deployment using the web console
        4. Advanced deployment strategies
          1. Deployment overlays
        5. Summary
      11. 5. Load Balancing
        1. The need for balancing
        2. Load balancing with mod_cluster
          1. Configuring EAP 7 as load balancer
            1. Configuring the frontend server
              1. Advantages of an all-in-one solution
          2. Configuring mod_cluster with Apache
            1. Installing mod_cluster on the Apache web server
            2. Testing mod_cluster
            3. Troubleshooting mod_cluster
              1. Security checks
              2. Network checking
              3. Network checks for non-Linux machines
            4. Configuring mod_cluster to use TCP transport
          3. Determining the optimal load configuration between Apache and JBoss
          4. Configuring balancing groups
            1. Why use balancing groups?
          5. Configuring mod_cluster balancing factors
            1. Adding custom mod_cluster metrics
        3. Using other balancing solutions
          1. Configuring mod_jk
          2. Configuring mod_proxy
          3. Configuring Nginx load balancer
        4. Summary
      12. 6. Clustering EAP 7
        1. Clustering overview and misconceptions
        2. Clustering in standalone mode
          1. Testing in standalone mode
        3. Clustering from a network point of view
        4. Clustering in domain mode
          1. Server-group configuration
          2. Testing in domain mode
        5. Advanced topics
          1. Clustering using TCP
          2. EJBs in a clustered environment
          3. Testing clustered EJB
        6. Summary
      13. 7. Logging
        1. The basics of logging
          1. Default log file locations
        2. Configuring handlers
          1. Console handler
          2. Periodic log handlers
          3. Size handlers
            1. Combining size and periodic log files
          4. Adding asynchronous behavior
          5. Custom handlers
          6. JBoss SyslogHandler
            1. Filtering logs
        3. Configuring loggers
          1. Defining new loggers
        4. Managing your application logging
          1. Per-deployment logging
          2. Logging profiles
        5. Reading logs with management interfaces
          1. Reading logs from the CLI
          2. Streaming logging through HTTP
        6. Building a centralized logging system
        7. Summary
      14. 8. Configuring Database Connectivity
        1. Introduction to datasources
        2. Datasource overview
          1. Prerequisites
        3. Adding a JDBC 4 driver module
        4. Configuring a JDBC 4-compliant driver
        5. Defining a new datasource
          1. Connection pool for a datasource
          2. Flushing a pool's connections
            1. Validating pool's connection
        6. Defining an XA-datasource
          1. Connection pool for an XA-datasource
          2. Difference between XA and non-XA datasource
        7. Hardening datasource configuration
          1. Password encryption
          2. Password protection using the vault
        8. Summary
      15. 9. Configuring EAP 7 for Java EE Applications
        1. Configuring the EJB container
          1. Configuring the stateless EJB pool
          2. Configuring the message driven bean pool
          3. Configuring the stateful EJB cache
            1. Controlling the amount of stateful beans in the cache
        2. Configuring the web server
          1. Undertow core server configuration
            1. Configuring Undertow connectors
            2. Configuring the pool of threads used by Undertow
            3. Migrating from web configurations
              1. Migrating Valve components
          2. Configuring Undertow to serve static content
          3. Undertow servlet container
        3. Monitoring your applications
          1. Using JConsole to display graphical attributes
          2. Data mining using the ELK stack
          3. Using Byteman to trace your application
        4. Summary
      16. 10. Messaging Administration
        1. Introduction to Artemis MQ
        2. Configuring broker transport
        3. Configuring persistence
        4. Configuring destinations
        5. Routing messages to other destinations
          1. Diverting messages to other destinations
          2. Creating a bridge between two ActiveMQ Artemis servers
            1. ActiveMQ Artemis source configuration
          3. ActiveMQ Artemis target configuration
          4. Bridging messages to another JMS broker
        6. Clustering
          1. Configuring server discovery
            1. Broadcast groups
            2. Discovery groups
          2. Configuring high availability
          3. HA with shared-store
            1. Restoring the master node
          4. HA with data replication
            1. Shared-store versus replication
        7. Summary
      17. 11. Securing the Application Server
        1. Creating security domains
          1. Internal based login modules
          2. External based login modules
            1. Database login module
              1. Troubleshooting security domains
              2. Hardening the database login modules
            2. Creating a Kerberos security domain
              1. Basic Kerberos configuration
              2. Running the Kerberos server
              3. Testing the Kerberos login against management interfaces
              4. Using Kerberos to provide SSO
        2. Securing the management interfaces with LDAP
          1. Setting up LDAP authentication
            1. HA LDAP
        3. Configuring RBAC
          1. Mapping individual users
          2. Mapping groups to roles
            1. Mapping groups with property files
            2. Mapping groups with LDAP
          3. Scoped roles
          4. Generating certificates
          5. Creating an SSL realm
        4. Securing the management interfaces
        5. Summary
      18. 12. New Security Features of EAP 7
        1. EAP 7 new security model
        2. Introducing elytron
          1. Elytron building blocks
          2. An overview of the elytron subsystem
          3. Creating a FileSystem security realm
          4. Developing a JDBC realm
          5. Developing an LDAP realm
        3. Introducing Red Hat SSO
          1. Installing Red Hat SSO server
          2. Creating a new realm
          3. Configuring client applications
            1. Installing the client template on the server
        4. Summary
      19. 13. Using EAP 7 with Docker
        1. Getting to grips with Docker
          1. Basic components of containers
          2. Installing Docker
          3. Running your first container
        2. Creating your Docker images
          1. Building our image
            1. Inspecting the server logs
        3. Managing the server storage
          1. Mounting a volume from the host machine
            1. Troubleshooting mounting volumes from the host machine
          2. Using a data container
        4. Managing multiple containers
          1. Using Docker compose
            1. Composing EAP 7 with a Database
            2. Composing a cluster of EAP 7 nodes
        5. Summary
      20. 14. Running EAP 7 on the Cloud Using OpenShift
        1. Introducing OpenShift
        2. OpenShift Online
        3. Developing and deploying your first OpenShift application in the cloud
        4. Summary