JBoss AS 5 Development

JBoss AS 5 Development
eBook: $29.99
Formats: PDF, PacktLib, ePub and Mobi formats
save 15%!
Print + free eBook + free PacktLib access to the book: $79.98    Print cover: $49.99
save 44%!
Free Shipping!
UK, US, Europe and selected countries in Asia.
Also available on:
Table of Contents
Sample Chapters
  • A complete guide for JBoss developers covering everything from basic installation to creating, debugging, and securing Java EE applications on this popular, award-winning JBoss application server
  • Master the most important areas of Java Enterprise programming including EJB 3.0, web services, the security framework, and more
  • Starts with the basics of JBoss AS and moves on to cover important advanced topics with the help of easy-to-understand practical examples
  • Written in a very simple and readable style, this book includes essential tips and tricks that will help you master JBoss AS development

Book Details

Language : English
Paperback : 416 pages [ 235mm x 191mm ]
Release Date : December 2009
ISBN : 1847196829
ISBN 13 : 9781847196828
Author(s) : Francesco Marchioni
Topics and Technologies : All Books, Enterprise Products and Platforms, Java, JBoss, Open Source

Table of Contents

Chapter 1: Installing Core Components
Chapter 2: What's New in JBoss AS 5?
Chapter 3: Customizing JBoss AS Services
Chapter 4: Developing EJB 3 Session Beans
Chapter 5: Developing JPA Entities
Chapter 6: Creating a Web Application
Chapter 7: Developing Applications with JBoss Messaging Service
Chapter 8: Developing Applications with JBoss and Hibernate
Chapter 9: Managing JBoss AS
Chapter 10: Developing Applications with JBoss Web Services
Chapter 11: Clustering JBoss AS
Chapter 12: Developing a Clustered Application
Chapter 13: JBoss AS Security
Chapter 14: Securing JBoss AS Applications
  • Chapter 1: Installing Core Components
    • Prologue
      • What you will get in this book
      • JBoss big bang
    • Introduction
    • Installing the Java environment
    • Installing JBoss AS 5
      • Starting up JBoss AS
      • Stopping JBoss
        • Stopping JBoss on a remote machine
    • Installing Eclipse
    • Plugins: The heart of Eclipse
      • Installing JBoss Tools plugins
      • Installing JBoss Tools plugins manually
        • Connecting Eclipse with JBoss
    • Summary
  • Chapter 2: What's New in JBoss AS 5?
    • Application server features
      • The core modules of JBoss AS 5
        • Cutting edge EJB container
        • The new messaging provider
        • Rock solid transaction manager
        • Enhanced web container
        • JBoss Web Services 3.0
        • Improved clustering support
      • The application server structure
    • The next generation application server
      • From JMX to the Microcontainer
        • The new library configuration
      • JBoss AS 5 server configurations
      • The "standard" configuration
        • The "web" configuration
        • The former server configurations
    • Creating a custom server configuration
      • The starting point: JBoss AS service map
      • Custom configuration sample: Adding JMS to the web configuration
      • JBoss virtual file system
    • Summary
  • Chapter 3: Customizing JBoss AS Services
    • How to monitor JBoss AS services
      • The JMX console
        • An example: Using the JMX console to display the JNDI tree
      • The admin console
      • The twiddle utility
    • JBoss AS thread pool
      • Application server thread pool anatomy
      • How many threads for your applications?
        • Analyze what your threads are doing
    • Configuring logging services
      • Appenders
        • Console file appender
        • File appenders
        • Other appenders
      • Layout of logs
      • Logging categories
        • Configuring your own logger
      • Managing logs through JMX agents
    • Configuring the connection to the database
      • Configuring a datasource in JBoss AS
        • Additional datasource properties
      • Setting up a new datasource
        • Gathering connection pool statistics
        • Deploying datasources at application level
        • High availability datasources
        • Connecting from a remote client
    • Configuring the transaction service
      • Preserving data integrity
      • Global and local transactions
      • Configuring JBoss transactions
        • Monitoring transactions
    • Summary
  • Chapter 4: Developing EJB 3 Session Beans
    • Java EE made easier
    • Developing Enterprise JavaBeans
      • Developing Session Beans
        • Stateless Session Beans
        • Stateful Session Beans
    • Configuring the EJB container
      • Configuring Stateless Session Bean pool size
        • Specializing the configuration
      • Configuring the Stateful Session Bean cache
        • How to disable Stateful Bean passivation
    • Summary
  • Chapter 5: Developing JPA Entities
    • Data persistence meets a standard
      • Working with JPA
      • Creating a sample application
      • Setting up the database
        • Rolling the EJB project
        • Creating a Session Bean client
        • Creating a test client for our AppStore
    • Summary
  • Chapter 6: Creating a Web Application
    • Developing web layout
      • Installing JSF on JBoss AS
      • Setting up navigation rules
      • Adding a JSF managed bean
      • Setting up the view
      • Assembling and deploying the application
        • Running the store
    • Configuring JBoss Web Server
      • Customizing connectors
        • The new Apache Portable Runtime connector
        • Installing the APR connector
      • Configuring contexts
      • Configuring virtual hosts
      • Configuring HTTP logs
      • Tuning advice
        • Disable DNS lookup
        • Choose the right HTTP connector
        • Set the correct size for your thread pool
        • Monitoring your thread pool
    • Summary
  • Chapter 7: Developing Applications with JBoss Messaging Service
    • Short introduction to JMS
      • The building blocks of JMS
    • The new JBoss Messaging system
      • Configuring connection factories
      • Configuring JMS destinations
        • Inspecting destination attributes
        • Advanced message configuration
    • Developing JMS applications
      • Message-driven beans
        • Configuring message-driven beans
      • Creating a sample application
      • Message-driven POJOs
    • Advanced JBoss Messaging
      • JBoss Messaging bridge
        • Adding a remote JMS provider
      • Configuring the persistence service
      • Securing destinations
        • MDB access control
    • Summary
  • Chapter 8: Developing Applications with JBoss and Hibernate
    • Introducing Hibernate
      • Creating a Hibernate application
        • Setting up the database schema
        • A new Eclipse project
        • Reversing your schema into Java classes
        • Adding Hibernate configuration to your project
        • Adding a web client to your project
        • Packaging and deploying the application
        • Using the wizard to generate EJB 3
        • Hibernate and EJB: Friends or opponents?
        • Using Hibernate with EJB
    • Summary
  • Chapter 9: Managing JBoss AS
    • Introducing Java Management Extension
    • Developing MBeans
      • A simple MBean
        • Testing your MBean from the JMX console
        • Testing your application programmatically
      • MBeans dependency
      • Sending MBeans notifications
        • Receiving heartbeat notifications
        • Sending your own notifications
    • Service POJOs
      • Creating a web test client
      • Exposing your service as an EJB
      • Service POJO dependency
    • JBoss AS Administration Console
      • Managing applications
      • Deploying/undeploying applications
        • Updating an application
        • Starting/stopping/restarting an application
      • Administering resources
        • Adding a new resource
        • Managing resources
      • Metrics
    • Summary
  • Chapter 10: Developing Applications with JBoss Web Services
    • Web Service concepts
      • Strategies for building up Web Services
      • JBoss Web Services stack
        • A brief look at the JAX WS architecture
    • Coding Web Services with JBossWS
      • Developing a POJO Web Service
        • Inspecting the Web Service from the console
        • Using JBossWS tools
        • External Web Service clients
      • Exposing EJB as Web Services
        • Handling exceptions in Web Services
        • Generating a test client
        • Injecting Web Services
        • Web Service Handler chains
    • Summary
  • Chapter 11: Clustering JBoss AS
    • Cluster basics
    • Introducing JBoss AS cluster
      • JBoss AS clustering architecture
        • Smart proxies
        • External load balancer
    • JBoss AS 5 cluster configuration
      • Starting JBoss AS in cluster mode
        • Running cluster nodes on separate machines
        • Running cluster nodes on the same machine
    • JBoss AS clustered services
      • JBoss Cache (JBC)
        • Cache modes
        • Cache configuration
        • Configuring HTTP cache management
        • Configuring EJB 3.0 Stateful Session Bean cache
        • Configuring entity caching
        • JBoss cache and concurrency
      • The HAPartition service
        • Exploring HA singletons
      • The HA-JNDI service
        • Accessing HA-JNDI
        • HA-JNDI configuration
    • Clustering web applications
      • Configuring HTTP replication
      • HttpSession passivation/activation
      • Configuring load balancing
    • JMS clustering
    • Summary
  • Chapter 12: Developing a Clustered Application
    • Clustering Stateless Session Beans
    • Clustering Stateful Session Beans
      • Deploying a clustered SFSB
      • Testing the clustered SFSB
        • Programmatic replication of the session
    • Clustering entities
      • Revisiting the AppStore example
        • Inside the second-level cache
    • Clustering web applications
      • Testing HTTP session replication
    • Summary
  • Chapter 13: JBoss AS Security
    • Approaching Java Security API
      • The JAAS security model
    • Introducing JBossSX
      • Securing the JMX console
        • Dynamic login configuration
        • Stacked login configuration
        • Logging and auditing
        • Securing the transport layer
        • Enabling the Secure Socket Layer on JBoss AS
    • Summary
  • Chapter 14: Securing JBoss AS Applications
    • Securing the AppStore application
      • HTTP role authentication
        • Encrypting passwords
      • EJB role authorization
        • Java EE programmatic security
      • Writing secure Java SE clients
    • Securing applications at transport level
      • Running the AppStore with HTTPS
      • Securing the RMI-IIOP transport: SSL BlackJack
    • Securing Web Services
      • Web Services authorization
      • Web Services encryption
        • Client and server configuration files
    • Encrypting the POJOWebService
      • Securing the Web Service
      • Securing the client
      • Running the example
      • Signing SOAP messages
        • Debugging SOAP messages
    • Summary

Francesco Marchioni

Francesco Marchioni is a Sun Certified Enterprise Architect employed for an Italian company based in Rome. He started learning Java in 1997 and since then has followed the path to the newest application program interfaces released by Sun. He joined the JBoss community in 2000, when the application server was running release 2.x.

He has spent many years as a software consultant, where he has envisioned many successful software migrations from vendor platforms to open source products such as JBoss AS, fulfilling the tight budget requirements of current times.

Over the past 5 years, he has been authoring technical articles for OReilly Media and is running an IT portal focused on JBoss products (http://www.mastertheboss.com).

He has authored the following titles:

  • JBoss AS 5 Development, Packt Publishing (December 2009), which describes how to create and deploy Java Enterprise applications on JBoss AS (http://www.packtpub.com/jboss-as-5-development/book)
  • AS 5 Performance Tuning, Packt Publishing (December 2010), which describes how to deliver fast and efficient applications on JBoss AS (http://www.packtpub.com/jboss-5-performance-tuning/book)
  • JBoss AS 7 Configuration, Deployment, and Administration, Packt Publishing (December 2011), which covers all the aspects of the newest application server release (http://www.packtpub.com/jboss-as-7-configurationdeployment-administration/book)

He has also co-authored the book Infinispan Data Grid Platform, Packt Publishing (August 2012), with Manik Surtani, which covers all the aspects related to the configuration and development of applications using the Infinispan Data Grid Platform (http://www.packtpub.com/infinispan-data-grid-platform/book).

Code Downloads

Download the code and support files for this book.

Submit Errata

Please let us know if you have found any errors not listed on this list by completing our errata submission form. Our editors will check them and add them to this list. Thank you.


- 3 submitted: last submission 10 Dec 2012

Errata type: Code | Page number: 156

In the code snippet,

"<tHost name="myvirtualhost1" autoDeploy="false"
deployOnStartup="false" deployXML="false">" should be "<Host name="myvirtualhost" autoDeploy="false" deployOnStartup="false" deployXML="false">".


Errata type: Others | Page number: 181

In the tip on this page: This stuff is generally useless for the bean developer and you can get rid of it by adding the @SuppressWarning annotation before the onMessage() method: @SuppressWarnings(value={"all"}) public void onMessage(Message msg) {}
Should be:
This stuff is generally useless for the bean developer and you can get rid of it by raising the log severity of interceptors to "ERROR". Simply add the following three lines to your jboss-log4j.xml file: < category name="org.jboss.ejb3.interceptors"> < priority value="ERROR"> < /category >


Errata type: Code | Page number: 69

In the code snippet "</ha-local-tx-datasource>" should be "</local-tx-datasource>"


Sample chapters

You can view our sample chapters and prefaces of this title on PacktLib or download sample chapters in PDF format.

Frequently bought together

JBoss AS 5 Development +    Software Development on the SAP HANA Platform =
50% Off
the second eBook
Price for both: €36.65

Buy both these recommended eBooks together and get 50% off the cheapest eBook.

What you will learn from this book

  • Install the server core components and the development environment for JBoss AS easily and quickly
  • Master the JBoss core services and tackle most common configuration issues
  • Set up, configure, and deploy a complete Java EE Application on JBoss AS
  • Learn all the nuts and bolts of the new JMS Provider: JBoss Messaging service
  • Seamlessly integrate your Hibernate applications into the application server architecture
  • Understand what Managed services are and how they can boost your applications
  • Easily develop web applications using JBoss web services
  • Learn theory behind clustering and see some concrete programming examples
  • Secure your applications using JBoss security framework

In Detail

JBoss AS is the most used Java application server on the market meeting high standards of reliability, efficiency, and robustness and is used to build powerful and secure Java EE applications. It supports the most important areas of Java Enterprise programming including EJB 3.0, dependency injection, web services, the security framework, and more. Getting started with JBoss application server development can be challenging; however, with the right approach and guidance, you can easily master it and this book promises that.

Written in an easy-to-read style, this book will take you from the basics of JBoss AS—such as installing core components and plug-ins—to the skills that will make you a JBoss developer to be reckoned with, covering advanced topics such as developing applications with JBoss Messaging service, JBoss web services, clustered applications, and more.

You will learn the necessary steps to install a suitable environment for developing enterprise applications on JBoss AS. Then, your journey will continue through the heart of the application server, explaining how to customize each service for optimal usage. You will learn how to design Enterprise applications using Eclipse and JBoss plug-ins. You will then learn how to enable distributed communication using JMS. Storing and retrieving objects will be made easier using Hibernate. The core section of the book will take you into the programming arena with tested, real-world examples. The example programs have been carefully crafted to be easy to understand and useful as starting points for your applications.

This book will kick-start your productivity and help you to master JBoss AS development. The author's experience with JBoss enables him to share insights on JBoss AS development, in a clear and friendly way. By the end of the book, you will have the confidence to apply all the newest programming techniques to your JBoss applications.

This practical guide will show you how to gain hands-on experience rapidly on Java EE development using JBoss AS with easy-to-understand and practical programming examples


This book follows a tutorial-based approach starting with simple examples, which are enriched in the following chapters as new topics are introduced. Each chapter provides clear instructions and detailed screenshots, as the user approaches a new facet of the development environment. Most complex topics have been explained using practical examples, which will help you to master JBoss AS development.

Who this book is for

If you are a Java architect or developer who wants to get the most out of the latest release of the JBoss application server or a JBoss administrator who wants a clear and simple reference for JBoss services, this book is for you. You are not expected to have accumulated experience on the application server though you must know the basic concepts of Java EE.

Code Download and Errata
Packt Anytime, Anywhere
Register Books
Print Upgrades
eBook Downloads
Video Support
Contact Us
Awards Voting Nominations Previous Winners
Judges Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software
Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software