JBoss EAP6 High Availability
By Weinan Li
()
About this ebook
Related to JBoss EAP6 High Availability
Related ebooks
NW.js Essentials Rating: 0 out of 5 stars0 ratingsAdvanced Express Web Application Development Rating: 0 out of 5 stars0 ratingsGetting Started with Hazelcast - Second Edition Rating: 0 out of 5 stars0 ratingsMastering C# Concurrency Rating: 0 out of 5 stars0 ratings.Net Framework and Programming in ASP.NET Rating: 0 out of 5 stars0 ratingsWebRTC Blueprints Rating: 0 out of 5 stars0 ratingsBackbone.js Patterns and Best Practices Rating: 0 out of 5 stars0 ratingsLearning Heroku Postgres Rating: 0 out of 5 stars0 ratingsLearning NServiceBus Sagas Rating: 0 out of 5 stars0 ratingsPractical XMPP Rating: 0 out of 5 stars0 ratingsImplementing OpenShift Rating: 0 out of 5 stars0 ratingsMastering NetBeans Rating: 0 out of 5 stars0 ratingsInstant Play Framework Starter Rating: 0 out of 5 stars0 ratingsWildFly Cookbook Rating: 0 out of 5 stars0 ratingsApplication Support A Complete Guide - 2020 Edition Rating: 0 out of 5 stars0 ratingsDeveloping Web Services with Java APIs for XML Using WSDP Rating: 0 out of 5 stars0 ratingsMaster The Configuration Of Apache Tomcat On Linux Rating: 0 out of 5 stars0 ratingsIBM MQ A Complete Guide - 2020 Edition Rating: 0 out of 5 stars0 ratingsSpring 2.5 Aspect Oriented Programming Rating: 0 out of 5 stars0 ratingsLearn JSP in 24 Hours Rating: 0 out of 5 stars0 ratingsEvent-driven programming The Ultimate Step-By-Step Guide Rating: 0 out of 5 stars0 ratingsJump Start Web Performance Rating: 0 out of 5 stars0 ratingsChef Infrastructure Automation Cookbook - Second Edition Rating: 0 out of 5 stars0 ratingsTime series database A Clear and Concise Reference Rating: 0 out of 5 stars0 ratingsPractical OneOps Rating: 0 out of 5 stars0 ratingsJavaServer Faces: The Complete Reference Rating: 0 out of 5 stars0 ratingsLearning Software Architecture Rating: 0 out of 5 stars0 ratingsInfrastructure As A Code A Complete Guide - 2021 Edition Rating: 0 out of 5 stars0 ratingsAlfresco 3 Cookbook Rating: 0 out of 5 stars0 ratings
Internet & Web For You
Coding For Dummies Rating: 5 out of 5 stars5/5How to Disappear and Live Off the Grid: A CIA Insider's Guide Rating: 0 out of 5 stars0 ratingsHow to Be Invisible: Protect Your Home, Your Children, Your Assets, and Your Life Rating: 4 out of 5 stars4/5Podcasting For Dummies Rating: 4 out of 5 stars4/5Everybody Lies: Big Data, New Data, and What the Internet Can Tell Us About Who We Really Are Rating: 4 out of 5 stars4/5Get Rich or Lie Trying: Ambition and Deceit in the New Influencer Economy Rating: 0 out of 5 stars0 ratingsNo Place to Hide: Edward Snowden, the NSA, and the U.S. Surveillance State Rating: 4 out of 5 stars4/5Cybersecurity For Dummies Rating: 4 out of 5 stars4/5Coding All-in-One For Dummies Rating: 4 out of 5 stars4/5The Gothic Novel Collection Rating: 5 out of 5 stars5/5Grokking Algorithms: An illustrated guide for programmers and other curious people Rating: 4 out of 5 stars4/5Six Figure Blogging Blueprint Rating: 5 out of 5 stars5/5Social Engineering: The Science of Human Hacking Rating: 3 out of 5 stars3/5The Digital Marketing Handbook: A Step-By-Step Guide to Creating Websites That Sell Rating: 5 out of 5 stars5/5Remote/WebCam Notarization : Basic Understanding Rating: 3 out of 5 stars3/5The Hacker Crackdown: Law and Disorder on the Electronic Frontier Rating: 4 out of 5 stars4/5The $1,000,000 Web Designer Guide: A Practical Guide for Wealth and Freedom as an Online Freelancer Rating: 5 out of 5 stars5/5Hacking : The Ultimate Comprehensive Step-By-Step Guide to the Basics of Ethical Hacking Rating: 5 out of 5 stars5/5The Designer's Web Handbook: What You Need to Know to Create for the Web Rating: 0 out of 5 stars0 ratingsLearn JavaScript in 24 Hours Rating: 3 out of 5 stars3/5The Beginner's Affiliate Marketing Blueprint Rating: 4 out of 5 stars4/5How To Start A Profitable Authority Blog In Under One Hour Rating: 5 out of 5 stars5/5C++ Learn in 24 Hours Rating: 0 out of 5 stars0 ratingsWeb Designer's Idea Book, Volume 4: Inspiration from the Best Web Design Trends, Themes and Styles Rating: 4 out of 5 stars4/5Stop Asking Questions: How to Lead High-Impact Interviews and Learn Anything from Anyone Rating: 5 out of 5 stars5/5Mike Meyers' CompTIA Security+ Certification Guide, Third Edition (Exam SY0-601) Rating: 5 out of 5 stars5/5
Reviews for JBoss EAP6 High Availability
0 ratings0 reviews
Book preview
JBoss EAP6 High Availability - Weinan Li
Table of Contents
JBoss EAP6 High Availability
Credits
About the Author
About the Reviewers
www.PacktPub.com
Support files, eBooks, discount offers and more
Why Subscribe?
Free Access for Packt account holders
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Errata
Piracy
Questions
1. JBoss EAP6 Overview
Understanding high availability
JBoss EAP6 high availability
JBoss Web, Apache httpd, mod_jk, and mod_cluster
EJB session bean
JBossWS and RESTEasy
HornetQ
Hibernate and Narayana
JGroups and JBoss Remoting
Domain management
Installing JBoss EAP6
The JBoss EAP6 startup mode
The domain mode
The standalone mode
Starting JBoss EAP6 in the standalone mode
Understanding the startup process
The standalone.xml file
Alternative configuration files
The --help option
Configuration files
Starting JBoss EAP6 in the domain mode
The domain mode
Configuration files
The domain.xml file
The host.xml file
The domain-controller section
The servers section
XSD documents
Summary
2. Using JBoss EAP6
Configuring the JBoss EAP6 management console
Security realms
Setting up an admin account
Using the web-based management console
Deploying a project in the standalone mode
Testing
Deployment scanner
Introducing JBoss DMR
Deploying a project in the domain mode
The main-server-group
Testing
CLI Usages
Connecting to CLI
ls
cd
Basic commands
echo-dmr
read-operation
The GUI
Deploying a project
Summary
3. Setting Up a JBoss EAP6 Cluster
Designing a cluster
Setting up a server group
The main-server-group versus other-server-group
Server configuration
Setting up master
Configuring host.xml
Adding a user account for slave server
Setting up HornetQ
Setting up slave
Configuring host.xml
Configuring domain.xml on slave
Testing the server group
Running master
Running slave
Checking the server status
Project deployment
Deploying a project to other-server-group
Clustering with the standalone mode
Summary
4. Load Balancing with mod_jk
Preparing a machine to install Apache httpd
Compiling and installing Apache httpd
Downloading httpd
Compiling httpd
Installing httpd
Starting httpd
Stopping httpd
Configuring httpd
Compiling and installing mod_jk
Installing JK
Configuring JK
Configuring httpd-jk.conf
The workers.properties configuration
Testing the cluster
The jk-status module
Summary
5. Load Balancing with mod_cluster
The design of mod_cluster
Installing mod_cluster
Downloading mod_cluster
Compiling and installing mod_cluster
Configuring mod_cluster
Configuring httpd.conf
Configuring mod_cluster
Configuring EAP6
Testing the cluster
Starting up httpd
The protocol analysis
The advertising channel
The management channel
The connector channel analysis
Accessing the cluster
Failover
Stress testing
Summary
6. Clustering with SSL
Using SSL in JBoss EAP6
Enabling SSL in EAP6
Using SSL in the JBoss EAP6 cluster
Configuring JK with SSL
Generating a certificate for httpd
Configuring httpd to use certificates
Summary
7. Configuring mod_cluster with SSL
The design of mod_cluster
Enabling SSL for the mod_cluster management channel
An introduction to SSL mutual authentication
Configuring SSL mutual authentication
Creating a CA certificate
Creating a certificate for httpd
Setting up OpenSSL
Signing the httpd.csr file
Creating a certificate for EAP6
Configuring httpd
Configuring EAP6
Testing the configuration
Enabling SSL in the proxy channel
Summary
8. Developing Distributed Applications
Web session replication
CDI-session-scoped bean replication
Configuring sticky sessions with JK
Configuring sticky sessions with mod_cluster
Summary
Index
JBoss EAP6 High Availability
JBoss EAP6 High Availability
Copyright © 2013 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.
First published: December 2013
Production Reference: 1171213
Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham B3 2PB, UK.
ISBN 978-1-78328-243-2
www.packtpub.com
Cover Image by Aniket Sawant (<aniket_sawant_photography@hotmail.com>)
Credits
Author
Weinan Li
Reviewers
Dustin Kut Moy Cheung
Jean-Frederic Clere
Ty Lim
Martin Večeřa
Acquisition Editors
Owen Roberts
Erol Staveley
Commissioning Editor
Sruthi Kutty
Technical Editors
Pooja Nair
Humera Shaikh
Ritika Singh
Nachiket Vartak
Copy Editors
Alisha Aranha
Roshni Banerjee
Sarang Chari
Karuna Narayanan
Deepa Nambiar
Kirti Pai
Project Coordinator
Ankita Goenka
Proofreader
Jonathan Todd
Indexer
Hemangini Bari
Graphics
Sheetal Aute
Ronak Dhruv
Valentina Dsilva
Production Coordinator
Shantanu Zagade
Cover Work
Shantanu Zagade
About the Author
Weinan Li started off as a Metro Railway Engineer and has worked at Alcatel since 2004 playing with hardware and assembly language.
He entered Red Hat in 2011 and is currently working as a Senior Software Engineer in the JBoss EAP team. He is also the productization leader of JBoss EWS and an active contributor to RESTEasy.
He currently lives in Beijing with his wife and their three-year-old son.
I would like to thank Veena Manjrekar from Packt Publishing who recommended me to write this book. I also give my gratitude to the editors from Packt Publishing, Sruthi Kutty and Ankita Goenka, who have given me great support during the writing process of this book.
I would like to thank my colleagues from Red Hat who have patiently answered my questions and helped me to review this book. They are Dustin Kut Moy Cheung, Fernando Nasser, Jean-Frederic Clere, Michal Babacek, Mladen Turk, Paul Ferraro, and Radoslav Husar. I would like to thank Martin Večeřa and Ty Lim who have given me a lot of advice.
I would like to especially thank Jean-Frederic Clere who has given me a lot of guidance during the writing process of this book. I would also like to thank all the people from the JBoss community who have inspired me to write this book.
Finally, thank you to my parents, my wife, and my son. I love you.
About the Reviewers
Dustin Kut Moy Cheung was born and raised in the island of Mauritius. Dustin's interest in computers was sparked when he obtained his first computer at the age of nine. Since then, he became determined to head into a career in the software world. He values spending time with his close friends, and looks at pictures of puppies and kittens in his spare time.
I'd like to thank Weinan for giving me the opportunity to review this book. I'd also like to thank the awesome people at Red Hat, Toronto; you guys rock! To my friends scattered around the world, I miss you! And of course, I wouldn't be here without the unconditional love and dedication of my parents. Thank you Papi and Mami!
Jean-Frederic Clere was born in France, where he studied. After a few years of consulting work there, he started to write servers for applications and moved to Barcelona, Spain. In 2000, he started contributing to Apache Software Foundation projects. Since 2006 he has been working for Red Hat in the JBoss division where he takes care of the web layer and the Apache httpd as a proxy for the Application Server. Actually, he lives in Neuchatel, Switzerland.
I would like to thank my wife Adelina for her patience with my geek behavior and all the colleagues and friends from Open Source communities who make my contributions possible.
Ty Lim is an experienced IT professional with more than 15 years' experience working on various operating system and middleware platforms. He has professional experience with IBM WebSphere Application Server, Apache Tomcat, Apache httpd server, and various other middleware and operating system platforms. He has experience working in various industries that include healthcare, telecommunications, financial, and software development. He holds a Bachelor of Science in Computer Science from the University of the Pacific, and a Master of Science degree in Computer Information Systems from Boston University.
I would like to thank my friends and family for their continued support.
To my HH
friends, let's always keep the party going.
Martin Večeřa is a JBoss Quality Assurance Manager within a division of Red Hat. He has a passion for bleeding-edge projects and technologies. His main area of interest is Java middleware and performance testing in which he has almost 10 years' experience. Previously, he has developed information systems for power plants and medical companies. He publishes articles on Java middleware to various international and local web magazines and is a co-author of a blog on the PerfCake Performance Testing Framework.
www.PacktPub.com
Support files, eBooks, discount offers and more
You might want to visit www.PacktPub.com for support files and downloads related to your book.
Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at www.PacktPub.com and as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at
At www.PacktPub.com, you can also read a collection of free technical articles, sign up for a range of free newsletters and receive exclusive discounts and offers on Packt books and eBooks.