O'Reilly logo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

JBoss: Developer's Guide

Book Description

Build your own enterprise applications and integration flows with JBoss and its products

About This Book

  • Build fast, smart, and flexible applications using JBoss
  • Couple one or more JBoss products to effectively solve various business problems
  • Explore the JBoss product ecosystem for improving the performance of your projects

Who This Book Is For

If you are a Java developer who wants to have a complete view of the JBoss ecosystem or quickly explore a specific JBoss Product, then this is the book you want. Integrators and consultants, familiar with JBoss, who want integrate several JBoss products within their ongoing project will also find this book useful.

What You Will Learn

  • Create new applications or integrate existing systems with JBoss products
  • Setup and manage a JBoss domain
  • Setup and manage a JBoss Fuse cluster with Fabric and Apache Karaf
  • Create and deploy OSGi applications on JBoss Fuse containersv
  • Manage enterprise data with JBoss Datagrid
  • Aggregate various data sources with JBoss Data virtualization to offer data as a service
  • Optimize your business and workflows with both JBoss Business RulesManagement System and JBoss Business Process Management platforms.

In Detail

Have you often wondered what is the best JBoss product to solve a specific problem? Do you want to get started with a specific JBoss product and know how to integrate different JBoss products in your IT Systems? Then this is the book for you.

Through hands-on examples from the business world, this guide presents details on the major products and how you can build your own Enterprise services around the JBoss ecosystem.

Starting with an introduction to the JBoss ecosystem, you will gradually move on to developing and deploying clustered application on JBoss Application Server, and setting up high availability using undertow or HA proxy loadbalancers.

As you are moving to a micro service archicture, you will be taught how to package existing Java EE applications as micro service using Swarm or create your new micro services from scratch by coupling most popular Java EE frameworks like JPA, CDI with Undertow handlers.

Next, you will install and configure JBoss Data grid in development and production environments, develop cache based applications and aggregate various data source in JBoss data virtualization.

You will learn to build, deploy, and monitor integration scenarios using JBoss Fuse and run both producers/consumers applications relying on JBoss AMQ.

Finally, you will learn to develop and run business workflows and make better decisions in your applications using Drools and Jboss BPM Suite Platform.

Style and Approach

The book works through the major JBoss products, with examples and instructions to help you understand each product and how they work together.

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. Preface
    1. Introduction
    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
  2. Introduction to the JBoss Ecosystem
    1. Beos bank project
    2. JBoss Developer Studio
      1. Installation
      2. Integration Stack
    3. The Forge console
      1. Working with the Forge CLI
        1. Creating Maven projects
        2. Creating a Java class
        3. Adding attributes to classes
        4. Building projects with Forge
    4. Summary
  3. Developing and Hosting Scalable Web Applications
    1. Installation and configuration
    2. Architecture and features
    3. Practical JBoss
      1. Lab - setting up a simple JBoss EAP domain
        1. JBoss EAP 7 installation
        2. Configuring authentication
          1. Creating a management to manage your EAP domain
          2. Configuring host authentication
        3. Setting up the domain host and interfaces
          1. Checking the management interfaces
          2. Reviewing the domain controller configuration
        4. Configuring slaves - host-slave.xml
        5. Starting the domain
      2. Lab - using the JBoss CLI
        1. Creating server groups
        2. Creating a server instance
      3. Clustered high available money TransferWebApp
        1. Implementing a clustered money transfer web page
          1. JBoss CLI deployment
          2. JBoss as maven plugin
          3. Session replication demo
          4. Archiving automatic cluster failover
          5. Session distribution on limited nodes and passivation
          6. Cluster isolation by server groups
        2. Creating datasources
          1.  Creating a module
          2. Creating a MySQL driver
          3. Datasource
          4. Testing the datasource
        3. Lab accessing databases with JPA
          1.  Referencing a datasource
          2.  Creating entities
          3. Inserting a MoneyTransferRequest
        4. Leveraging the existing features to define security policies
          1. Creating a database security domain
          2. Plugging a security domain in a web application
          3. Deploying the application and checking the secure pages
        5. Customizing/overriding security policies
          1. Creating a custom login module
          2.  Deploying the module on JBoss
    4. Summary
  4. Custom Web Deployment using Undertow and Swarm
    1. Undertow - purpose and architecture
      1. Creating your first Undertow server
      2. Undertow request life cycle
      3. Undertow handlers
        1. Path handlers
        2. Reverse proxy handler
    2. Microservices with Undertow
      1. Reading money transfer details
      2. Running the application
    3. Load balancing with an Undertow subsystem
    4. Innovative microservice packaging with WildFly Swarm
    5. Summary
  5. Storing and Accessing Distributed Data
    1. JBoss Data Grid architecture
      1. Versioning
      2. Running configuration
    2. Working with caches
      1. Library mode in Java SE
      2. Cache Listener
      3. Client-Server mode
    3. Clustering and visualizing caches
      1. Building the Datagrid cluster
      2. Visualizing the cluster
      3. Replicated and distributed
    4. Cache advanced usages
      1. REST API
      2. Cache expiration and eviction
    5. XML configuration
    6. Grid computing
      1. Distributed Streams
      2. Distributed execution
    7. Cache security
    8. Summary
  6. Exposing Data as a Service
    1. Introduction to data virtualization
      1. JBoss data virtualization architecture
      2. JBoss Data Virtualization installation
        1. Installing JDV Server
        2. Setting up JDV features in JBoss Developer Studio
    2. Developing virtual databases
      1. Business case
      2. Data preparation
      3. Modeling data sources with JBoss data virtualization
        1. Creating the beosbank-datavirt Teiid Model project
        2. Creating a MySQL source model
        3. Creating a Postgres source model
        4. Creating a MongoDB source model
      4. Building Virtual Base Layers
        1. Creating the AF_Transactions_VBL model
        2. Building and deploying federated data views
        3. Accessing virtual databases
        4. Virtual procedures
    3. Summary
  7. Integrating Applications with JBoss Fuse
    1. JBoss Fuse architecture
      1. Installing JBoss Fuse
        1. Basic Fuse installation
        2. Creating a Fuse cluster with Fabric8 and Apache Zookeeper
    2. Developing and deploying OSGi applications on the JBoss Fuse platform
      1. Content- and source-based routering
        1. Creating a project
        2. Creating the business logic
        3. Preparing the beosbank-moneytransfer-cacheloader test environment
          1. MySQL database
          2. JBoss Datagrid and infinispan visualizer
        4. Running Fuse applications on a standalone Karaf container
        5. Running beosbank-moneytransfer-cacheloader on Fuse Fabric
          1. Creating a profile
          2. Deploying the profile in the fabric
          3. Updating profiles and properties to use the encrypted password
      2. Proxying web services
        1. Business case
        2. Solution
      3. File processing and data transformation
    3. Summary
  8. Delivers Information Safely and Connects IoT
    1. JBoss AMQ architecture and installation
      1. JBoss AMQ architecture
      2. JBoss AMQ insallation
    2. Connecting clients to routers and brokers
      1. Lab description
      2. Simulate the network
      3. Create and start Fidelity broker instances
      4. Create the router
      5. Router configuration
    3. Connecting IoT devices
    4. AMQ topologies
    5. Summary
  9. Making Better Decisions in Your Applications
    1. JBoss BRMS components and architecture
    2. Installing the JBoss BRMS platform
    3. Authoring business rules with JBoss BRMS
      1. Authoring rules in Business Central
        1. Creating a rule-based project
        2. Creating a data object
        3. Creating business rules 
        4. Creating test scenarios in BRMS
      2. Implementing a decision table
    4.  Real-time decisions with BRMS
    5. Complex event processing
    6. Summary
  10. Developing Workflows
    1. Process modeling with JBoss BPMS
      1. Installing JBoss BPM
      2. The BPMN2 notation
    2.  The Beosbank practical sample
      1. Creating the beosbank-bpms-withdrawal project
      2. Modeling withdrawal data objects
      3. Modeling the WelcomeUserProcess
        1. The process configuration
        2. Greeting manual task
        3. Filling in the withdrawal form user task
        4. Modeling the checkUserInput BRMS task
        5. Modeling the WelcomeScript task and go back gateway
        6. Building and running the process
        7. Integrating the WelcomeUser in a parent process
    3. Summary