JBoss 4.0: The Official Guide

Overview

If you need to understand how JBoss works, why not learn it from the people who created it? JBoss 4.0 — The Official Guide is the authoritative resource recognized as the official print documentation for JBoss 4.0. The only book for advanced JBoss users, this guide presents a complete understanding to configuring and using JBoss 4.0. It is fully up-to-date with the new features and changes in JBoss 4.0, including those used to integrate development with Eclipse, incorporate Aspect-Oriented Programming and ...

See more details below
Available through our Marketplace sellers.
Other sellers (Paperback)
  • All (18) from $1.99   
  • New (5) from $30.46   
  • Used (13) from $1.99   
Close
Sort by
Page 1 of 1
Showing All
Note: Marketplace items are not eligible for any BN.com coupons and promotions
$30.46
Seller since 2009

Feedback rating:

(11003)

Condition:

New — never opened or used in original packaging.

Like New — packaging may have been opened. A "Like New" item is suitable to give as a gift.

Very Good — may have minor signs of wear on packaging but item works perfectly and has no damage.

Good — item is in good condition but packaging may have signs of shelf wear/aging or torn packaging. All specific defects should be noted in the Comments section associated with each item.

Acceptable — item is in working order but may show signs of wear such as scratches or torn packaging. All specific defects should be noted in the Comments section associated with each item.

Used — An item that has been opened and may show signs of wear. All specific defects should be noted in the Comments section associated with each item.

Refurbished — A used item that has been renewed or updated and verified to be in proper working condition. Not necessarily completed by the original manufacturer.

New
New Book. Shipped from UK within 10 to 14 business days. Established seller since 2000.

Ships from: Secaucus, NJ

Usually ships in 1-2 business days

  • Standard, 48 States
  • Standard (AK, HI)
$35.04
Seller since 2008

Feedback rating:

(18276)

Condition: New
Brand New, Perfect Condition, Please allow 4-14 business days for delivery. 100% Money Back Guarantee, Over 1,000,000 customers served.

Ships from: Westminster, MD

Usually ships in 1-2 business days

  • Canadian
  • International
  • Standard, 48 States
  • Standard (AK, HI)
$35.05
Seller since 2007

Feedback rating:

(23820)

Condition: New
BRAND NEW

Ships from: Avenel, NJ

Usually ships in 1-2 business days

  • Canadian
  • International
  • Standard, 48 States
  • Standard (AK, HI)
$57.00
Seller since 2010

Feedback rating:

(11)

Condition: New
4-20-05 other 1 BRAND NEW! ONLY Expedited orders are shipped with tracking number! *WE DO NOT SHIP TO PO BOX* Please allow up to 14 days delivery for order with standard ... shipping. SHIPPED FROM MULTIPLE LOCATIONS. Read more Show Less

Ships from: San Jose, CA

Usually ships in 1-2 business days

  • Canadian
  • Standard, 48 States
  • Standard (AK, HI)
  • Express, 48 States
  • Express (AK, HI)
$61.27
Seller since 2015

Feedback rating:

(6)

Condition: New
New

Ships from: Idyllwild, CA

Usually ships in 1-2 business days

  • Standard, 48 States
  • Standard (AK, HI)
  • Express, 48 States
  • Express (AK, HI)
Page 1 of 1
Showing All
Close
Sort by
Sending request ...

Overview

If you need to understand how JBoss works, why not learn it from the people who created it? JBoss 4.0 — The Official Guide is the authoritative resource recognized as the official print documentation for JBoss 4.0. The only book for advanced JBoss users, this guide presents a complete understanding to configuring and using JBoss 4.0. It is fully up-to-date with the new features and changes in JBoss 4.0, including those used to integrate development with Eclipse, incorporate Aspect-Oriented Programming and implement J2EE 1.4 functionality months ahead of the commercial competition. Get under the hood and explore everything that JBoss 4.0 can offer you with JBoss 4.0 — The Official Guide.

Read More Show Less

Product Details

  • ISBN-13: 9780672326486
  • Publisher: Sams
  • Publication date: 4/27/2005
  • Pages: 634
  • Product dimensions: 7.00 (w) x 9.13 (h) x 1.57 (d)

Meet the Author

Scott Stark, Ph.D. started out as a chemical engineer and graduated with a B.S. from the University of Washington, and he later earned a Ph.D. from the University of Delaware. While he was at Delaware, it became apparent that computers and programming were to be his passion, so he made the study of applying massively parallel computers to difficult chemical engineering problems the subject of his Ph.D. research. It has been all about distributed programming ever since. Scott currently serves as the chief technology officer of JBoss, Inc., an elite services company based out of Atlanta.

Marc Fleury, Ph.D. started in sales at Sun Microsystems France. A graduate of the Ecole Polytechnique, France's top engineering school, and an ex-lieutenant in the paratroopers, he has a master's in theoretical physics from the ENS ULM and a Ph.D. in physics for work he did as a visiting scientist at MIT (working with X-ray lasers). Marc currently serves as the president of JBoss, Inc.

Norman Richards is a JBoss developer and is currently the maintainer of this guide. He graduated with a B.S. in computer science from the University of Texas at Austin, where he researched evolving neural networks to play the game of go. Norman is the co-author of XDoclet in Action (Manning Publications).

Read More Show Less

Read an Excerpt

IntroductionIntroductionWhat This Book Covers

The primary focus of this book is the presentation of the standard JBoss 4.0 architecture components, from the perspectives of both their configuration and architecture. As a user of a standard JBoss distribution, you will gain an understanding of how to configure the standard components. Note that this book is not an introduction to J2EE or how to use J2EE in applications. It focuses on the internal details of the JBoss server architecture and how an implementation of a given J2EE container can be configured and extended.

As you read this book, you will gain a good understanding of the architecture and inte-gration of the standard components, which should enable you to extend or replace the standard components for your infrastructure needs. This book also shows you how to obtain the JBoss source code, along with how to build and debug the JBoss server.About JBoss

JBoss Application Server was first released in 1999. JBoss Group was founded in 2001, in order to provide expert technical support services. JBoss Group was incorporated in 2004 as JBoss Inc.:

  • Ownership—JBoss Inc. is employee owned and is venture backed by Matrix Partners, Accel Partners, and Intel.

  • Coverage—JBoss Inc. covers North America and Europe on a direct basis. JBoss Inc. provides coverage worldwide via its extensive authorized partner network.

  • Mission statement—JBoss Inc. will provide middleware technology that offers the lowest cost of ownership via open-source software licenses that are backed up by expert technical support services delivered by both JBoss Inc. and our authorizedservice partners. Our goal is to be the safe choice for enterprises and software providers alike.

  • Company description—JBoss Inc. is in the business of providing superior technical support to its customers. By backing up its immensely popular open-source Java products with technical support from the source, JBoss has become the new safe choice for middleware. Customers such as Apple, Best Western, Borland, Computer Associates, HP, Iona, La Quinta, MCI, Mitre, Nielsen Media Research, Siemens, Sonic, SEMA, Unisys, WebMethods, and Wells Fargo have embraced the Professional Open Source model whereby no-cost, open-source products are supported by the core development team. By providing direct access to the core developers, JBoss Inc. eliminates the runaround common with most commercial software providers.

Professional Open Source from JBoss Inc. offers the following:

  • Standards-based and stable Java middleware technology

  • No-cost, open-source product licenses

  • Backing by a professional and expert support staff

  • Comprehensive services, including professional support, training, and consulting

  • A very large and active community of developers

  • An extensive worldwide network of authorized and certified partners

Benefits of Professional Open Source from JBoss Inc. include the following:

  • Lowest possible total cost of ownership

  • Reliable and safe technology

  • Support, accountability, and trust from a stable company

  • Expedited problem resolution compared to commercial software vendors

About Open Source

The basic idea behind open source is very simple: When programmers can read, re- distribute, and modify the source code for a piece of software, the software evolves: People improve it, people adapt it, people fix bugs. And this can happen at a speed that, if you are used to the slow pace of conventional software development, seems astonishing. Open source is an often-misunderstood term that relates to free software. The Open Source Initiative (OSI) website provides a number of resources that define the various aspects of open source, including a definition of open source at http://www.opensource.org/docs/definition.html. The following quote from the OSI home page nicely summarizes the key aspects as they relate to JBoss:

We in the open source community have learned that this rapid evolutionary process produces better software than the traditional closed model, in which only a very few programmers can see the source and everybody else must blindly use an opaque block of bits.

Open Source Initiative exists to make this case to the commercial world.

Open source software is an idea whose time has finally come. For twenty years it has been building momentum in the technical cultures that built the Internet and the World Wide Web. Now it's breaking out into the commercial world, and that's changing all the rules. Are you ready?

—The Open Source Initiative

About Professional Open Source

JBoss is the leader in the second generation of open source, which JBoss Inc. has termed Professional Open Source. The Professional Open Source methodology is based on the following:

  • It hires and pays experts in the open-source community to write exceptional and innovative software full time.

  • It uses only open-source licenses that are friendly to end-user IT shops, independent software vendors, and the community itself.

  • Directly and through its authorized partners, JBoss Inc. delivers the best support services available, and all of them are backed up by the real product experts.

  • Unlike first-generation open-source providers, JBoss Inc. controls the direction and source code for its projects. It can ensure that all bug fixes and patches are rolled into future versions of its products.

  • By combining enterprise-proven technology, business-friendly open-source licenses, and world-class support services, JBoss Inc. has made Professional Open Source the safe choice for end-user enterprises and independent software vendors alike.

What's New in JBoss 4.0

The JBoss Application Server (JBoss AS) 4.0 is a production-ready Java 2 Enterprise Edition (J2EE) application server. It builds on the highly successful JBoss 3.2 line of open-source Java application servers with improved standards compliance and major feature enhancements. JBoss AS 4.0 offers the same level of quality and stability customers have grown to expect from JBoss 3.2. Key features of JBoss AS 4.0 include the following:

  • It is officially certified to be fully compliant to the J2EE 1.4 specification. JBoss AS 4.0 is the first production-ready J2EE 1.4 application server in the industry.

  • It provides full support for J2EE Web Services and the Service-Oriented Architecture (SOA).

  • It supports the aspect-oriented programming (AOP) model for developing middleware solutions. JBoss AOP greatly improves developer productivity.

  • It tightly integrates with Hibernate, the world's most popular object persistence framework, developed by JBoss, inside the application server container.

  • It improves clustering and distributed caching support, with a new internal caching architecture.

J2EE Certification and Standards Compliance

JBoss AS 4.0 is the industry's first officially certified J2EE 1.4 application server. The certification guarantees that JBoss AS 4.0 conforms to the formal J2EE specification. This allows developers to safely reuse J2EE components (for example, Enterprise JavaBeans EJBs) across different application servers. For example, a developer could easily migrate an EJB developed for WebLogic or WebSphere to JBoss. The certification makes JBoss 4.0 a safe upgrading choice for both existing JBoss users and users of other J2EE application servers.

Compared with JBoss AS 3.2, JBoss AS 4.0 implements the following new J2EE specifications in order to be J2EE 1.4 compliant:

  • JBoss AS 4.0 supports J2EE Web Services, including JAX-RPC (Java API for

  • JBoss AS 4.0 implements the JMS (Java Messaging Service) 1.1 specification instead of JMS 1.0 in JBoss AS 3.2. In JMS 1.0, client programming for the Point-to-Point and Pub/Sub domains was done using similar but separate class hierarchies. In JMS 1.1, there is now a domain-independent approach to programming the client application.

  • JBoss AS 4.0 implements the JCA (Java Connector Architecture) 1.5 specification instead of the JCA 1.0 in JBoss AS 3.2. The JCA 1.5 specification adds support for the life cycle management of resource adapters, worker thread management, and transaction and message inflow from the resource adapter to the application server.

  • JBoss AS 4.0 implements the new Java Authorization Contract for Containers (JACC) specification. JACC is a Java 2 permission-based mechanism for externalizing the authorization decision for accessing EJB methods and web resources. The new implementation is based on the JBoss AS 3.2 semantic of associating the J2EE declarative roles with the authenticated subject as a by-product of the JAAS authentication phase. JBoss AS 4.0 maintains compatibility with the JBoss AS 3.2 security configuration.

  • JBoss AS 4.0 implements the EJB 2.1 specification instead of EJB 2.0 in JBoss AS 3.2. The EJB 2.1 specification extends the message-driven bean contracts to support other messaging types in addition to JMS. It supports stateless session beans as web service endpoints. It also includes a new container-managed service called the EJB timer service.

Server Configuration and Services

A big change from JBoss AS 3.2.6 to 4.0.0 is the default server configurations. On JBoss AS 4.0.0, there are four server configurations:

  • minimal—The minimal configuration in JBoss AS 4.0.0 has the same meaning as the minimal configuration in JBoss AS 3.2.6. It starts the JBoss microkernel, JMX MBean server, and JNDI naming service.

  • standard—The standard configuration in JBoss AS 4.0.0 has the same meaning as the default configuration in JBoss AS 3.2.6. It starts all J2EE services in JBoss's optimized class loader. The JBoss AS 4.0.0 standard configuration yields better performance than other configurations when the components are deployed in the same JVM. But the deployed applications are less compartmentalized in this configuration.

  • default—The default configuration in JBoss AS 4.0.0 is new. It is the J2EE-certified configuration of the server. All J2EE services are deployed, and all components are compartmentalized. But the application performance in the JBoss AS 4.0.0 default configuration is not as optimized as that in the standard configuration.

  • all—The all configuration in JBoss AS 4.0.0 has the same meaning as the all configuration in JBoss AS 3.2.6. It starts all services, including clustering.

From JBoss AS 4.0.1, the server configuration names switch back to the JBoss 3.2 convention. The default configuration uses the JBoss optimized class loader, and the standard configuration goes away. The J2EE 1.4 certified configuration of JBoss (that is, the default configuration in JBoss AS 4.0.0) is distributed in a separate package from JBoss AS 4.0.1.

In addition to server configuration name changes, JBoss AS 4.0 also adds support for new types of server services. SARDeployer now recognizes the *.deployer archives (both in expanded directories and in zip files) and the *-deployer.

files as valid deployment options. The .deployer suffix is equivalent to the .sar suffix, and the -deployer.

filename suffix is equivalent to the -service.

descriptor filename suffix. These suffixes are sorted ahead of any other service types so that these .deployer services are started before other services. For example, the JBoss AOP services are deployed as a .deployer service archive (that is, the jboss-aop.deployer archive in the deploy directory). This makes sure that the JBoss AOP services are started early in the server startup process.JBoss AOP Support

Aspect-oriented middleware is a key innovation in JBoss AS 4.0. It drastically simplifies middleware application development and allows developers to extend the container services. In JBoss AS 4.0, you can deploy AOP-based services and applications directly into the application server. You can find a detailed introduction to aspect-oriented programming and the JBoss AOP framework on the JBoss website, at http://www.jboss.org/products/aop.

In JBoss AS 4.0.0's standard and all configurations (the default and all configurations in JBoss AS 4.0.1), AOP support is provided by the jboss-aop.deployer service. It is a new .deployer-type service similar to the .sar service. The following key features are supported by the jboss-aop.deployer service:

  • By default, you have to instrument the bytecode of your AOP applications offline, using the aopc utility, before you can deploy them into the application server. But you can enable load-time bytecode instrumentation via a configuration attribute in the jboss-aop.deployer/META-INF/jboss-service.

    file.

  • JBoss AS 4.0 ships with several prepackaged aspects to support security transaction asynchronous threads on plain old Java objects (POJOs). There are a number of predefined annotation tags in the baseaop.

    file. You can use those annotations in your POJOs to take advantage of the prepackaged aspect services.

  • JBoss AS 4.0 defines a new

    *-aop.

    . The *-aop.

    file specifies the binding for user-defined aspect classes. The aspect and binding become available to applications on the server.

  • JBoss AS 4.0 defines a new JAR archive file type with the .aop filename extension. The .aop file can be used to package user-defined aspects and their bindings. The jboss-aop.

    file must reside in the META-INF directory in the .aop archive. The .aop archive can be bundled inside other deployment archive files to provide aspect services to a specific application.

Hibernate Integration

Hibernate is a very popular object persistence framework developed by JBoss. It maps Java objects to tables in relational databases and vice versa. The object-relational mapping rules and datasources are specified in special Hibernate configuration files. In JBoss AS 4.0, Hibernate integration support is provided by the jboss-hibernate.deployer service, which is available in the default, standard, and all configurations. The jboss-hibernate.deployer service provides Hibernate framework libraries to all applications on the server.

For Hibernate applications, JBoss defines a new .har service archive type. You can package your Hibernate-mapped Java objects and mapping configuration files in the .har archive. You can also specify a datasource name and a JNDI name for this particular Hibernate configuration in the hibernate-service.

file in the .har archive. The benefit is that, in your applications, you only need to do a JNDI lookup to retrieve the correctly configured Hibernate SessionFactory object. There is no need to load the mapping and datasource configuration files manually in the application via API calls. In addition, the configuration settings in the hibernate-service.

file are manageable via the JBoss JMX Management Console.

The .har file can be bundled inside an .ear file or deployed on a standalone basis.Clustering and Caching

Many of the JBoss AS 4.0 clustering and caching improvements have been backported and made available in JBoss 3.2.3 to 3.2.7. Here's an overview of those improvements:

  • TreeCache, which is based on the JGroups technology, is officially adopted as the underlying distributed cache architecture for the clustering environment.

  • CacheLoader support (store/read from secondary storage) for both shared and unshared back-end stores is added. Currently, there are CacheLoader implementations for the Sleepycat Berkeley DB (BdbjeCacheLoader), for generic JDBC datasources, and for the file system (FileCacheLoader).

  • The HttpSession object is replicated across clustered servers. So if one server fails, the users are moved to a failover server without losing their sessions.

  • The Single Sign-On (SSO) security context is replicated across clustered servers. This way, the user is not required to log in again when a server fails.

  • The new loadbalancer service provides reverse-proxy support with silent failover.


© Copyright Pearson Education. All rights reserved.

Read More Show Less

Table of Contents

Introduction.

1. Installing and Building the JBoss Server.

Getting the Binary Files

Prerequisites

Installing the Binary Package

Directory Structure

The Default Server Configuration File Set

conf/jboss-minimal.xml

conf/jboss-service.xml

conf/jboss.web

conf/jndi.properties

conf/log4j.xml

conf/login-config.xml

conf/server.policy

conf/standardjaws.xml

conf/standardjboss.xml

conf/standardjbosscmp-jdbc.xml

conf/xmdesc/-mbean.xml

deploy/bsh-deployer.xml

deploy/cache-invalidation-service.xml

deploy/client-deployer-service.xml

deploy/ear-deployer.xml

deploy/ejb-deployer.xml

deploy/hsqldb-ds.xml

deploy/http-invoker.sar

deploy/jboss-aop.deployer

deploy/jboss-hibernate.deployer

deploy/jboss-local-jdbc.rar

deploy/jboss-ws4ee.sar

deploy/jboss-xa-jdbc.rar

deploy/jbossjca-service.sar

deploy/jbossweb-tomcat50.sar

deploy/jms/hsqldb-jdbc2-service.xml

deploy/jms/jbossmq-destinations-service.xml

deploy/jms/jbossmq-httpil.sar

deploy/jms/jbossmq-service.xml

deploy/jms/jms-ds.xml

deploy/jms/jms-ra.rar

deploy/jms/jvm-il-service.xml

deploy/jms/uil2-service.xml

deploy/jmx-console.war

deploy/jmx-invoker-service.sar

deploy/mail-ra.rar

deploy/mail-service.xml

deploy/management/console-mgr.sar and web-console.war

deploy/monitoring-service.xml

deploy/properties-service.xml

deploy/scheduler-service.xml and schedule-manager-service.xml

deploy/sqlexception-service.xml

deploy/uuid-key-generator.sar

Basic Installation Testing

Booting from a Network Server

Building the Server from Source Code

Accessing the JBoss CVS Repositories at SourceForge

Understanding CVS

Anonymous CVS Access

Obtaining a CVS Client

Building the JBoss Distribution Using the Source Code

Building the JBoss Distribution Using the CVS Source Code

An Overview of the JBoss CVS Source Tree

Using the JBossTest Unit Testsuite

2. The JBoss JMX Microkernel.

JMX

An Introduction to JMX

The JBoss JMX Implementation Architecture

The JBoss ClassLoader Architecture

Class Loading and Types in Java

JBoss XMBeans

Connecting to the JMX Server

Inspecting the Server: The JMX Console Web Application

Connecting to JMX Using RMI

Command-Line Access to JMX

Connecting to JMX Using Any Protocol

Using JMX as a Microkernel

The Startup Process

JBoss MBean Services

Writing JBoss MBean Services

Deployment Ordering and Dependencies

The JBoss Deployer Architecture

Deployers and Class Loaders

Exposing MBean Events via SNMP

The Event to Trap Service

Remote Access to Services, Detached Invokers

A Detached Invoker Example: The MBeanServer Invoker

Adaptor Service

JRMPInvoker: RMI/JRMP Transport

PooledInvoker: RMI/Socket Transport

IIOPInvoker: RMI/IIOP Transport

JRMPProxyFactory: Building Dynamic JRMP Proxies

HttpInvoker: RMI/HTTP Transport

JRMPInvoker: Clustered RMI/JRMP Transport

HttpInvoker: Clustered RMI/HTTP Transport

HttpProxyFactory: Building Dynamic HTTP Proxies

Steps to Expose Any RMI Interface via HTTP

3. Naming on JBoss.

An Overview of JNDI

The JNDI API

J2EE and JNDI: The Application Component Environment

The JBossNS Architecture

The Naming InitialContext Factories

Accessing JNDI over HTTP

Accessing JNDI over HTTPS

Securing Access to JNDI over HTTP

Securing Access to JNDI with a Read-only Unsecured Context

Additional Naming MBeans

4. Transactions on JBoss.

Transaction and JTA Overview

Pessimistic and Optimistic Locking

The Components of a Distributed Transaction

The Two-phase XA Protocol

Heuristic Exceptions

Transaction Identities and Branches

JBoss Transaction Internals

Adapting a Transaction Manager to JBoss

The Default Transaction Manager

UserTransaction Support

5. EJBs on JBoss.

The EJB Client-Side View

Specifying the EJB Proxy Configuration

The EJB Server-Side View

Detached Invokers: The Transport Middlemen

The HA JRMPInvoker: Clustered RMI/JRMP Transport

The HA HttpInvoker: Clustered RMI/HTTP Transport

The EJB Container

The EJBDeployer MBean

The Container Plug-in Framework

Entity Bean Locking and Deadlock Detection

Why JBoss Needs Locking

The Entity Bean Life Cycle

Default Locking Behavior

Pluggable Interceptors and Locking Policy

Deadlocking

Advanced Configurations and Optimizations

Running Within a Cluster

Troubleshooting

6. Messaging on JBoss.

JMS Examples

A Point-to-Point Example

A Pub-Sub Example

An Example of a Pub-Sub with a Durable Topic

An Example of P2P with MDB

JBossMQ Overview

The Invocation Layer Services

The SecurityManager Service

The DestinationManager Service

The MessageCache Service

The StateManager Service

The PersistenceManager Service

Destinations

JBossMQ Configuration and MBeans

The org.jboss.mq.il.jvm.JVMServerILService MBean

The org.jboss.mq.il.uil2.UILServerILService MBean

The org.jboss.mq.il.http.HTTPServerILService MBean

The org.jboss.mq.server.jmx.Invoker MBean

The org.jboss.mq.server.jmx.InterceptorLoader MBean

The org.jboss.mq.sm.jdbc.JDBCStateManager MBean

The org.jboss.mq.security.SecurityManager MBean

The org.jboss.mq.server.jmx.DestinationManager MBean

The org.jboss.mq.server.MessageCache MBean

The org.jboss.mq.pm.jdbc2.PersistenceManager MBean

Destination MBeans

Specifying the MDB JMS Provider

The org.jboss.jms.jndi.JMSProviderLoader MBean

The org.jboss.jms.asf.ServerSessionPoolLoader MBean

Integrating Non-JBoss JMS Providers

7. Connectors on JBoss.

JCA Overview

An Overview of the JBossCX Architecture

The BaseConnectionManager2 MBean

The RARDeployment MBean

The JBossManagedConnectionPool MBean

The CachedConnectionManager MBean

A Sample Skeleton of a JCA Resource Adaptor

Configuring JDBC Datasources

Configuring Generic JCA Adaptors

8. Security on JBoss.

J2EE Declarative Security Overview

Security References

Security Identity

Security Roles

EJB Method Permissions

Web Content Security Constraints

Enabling Declarative Security in JBoss

An Introduction to JAAS

What Is JAAS?

The JBoss Security Model

Enabling Declarative Security in JBoss, Revisited

The JBossSX Architecture

How JaasSecurityManager Uses JAAS

The JaasSecurityManagerService MBean

The JaasSecurityDomain MBean

An XML JAAS Login Configuration MBean

The JAAS Login Configuration Management MBean

Using and Writing JBossSX Login Modules

The DynamicLoginConfig Service

The Secure Remote Password (SRP) Protocol

Providing Password Information for SRP

Inside the SRP Algorithm

Running JBoss with a Java 2 Security Manager

Using SSL with JBoss and JSSE

Configuring JBoss for Use Behind a Firewall

Securing the JBoss Server

The jmx-console.war Service

The web-console.war Service

The http-invoker.sar Service

The jmx-invoker-adaptor-server.sar Service

9. Web Applications.

The Tomcat Service

The Tomcat server.xml File

The Connector Element

The Engine Element

The Host Element

The DefaultContext Element

The Logger Element

The Valve Element

Using SSL with the JBoss/Tomcat Bundle

Setting the Context Root of a Web Application

Setting Up Virtual Hosts

Serving Static Content

Using Apache with Tomcat

Using Clustering

Integrating Third-Party Servlet Containers

The AbstractWebContainer Class

10. MBean Services Miscellany.

System Properties Management

Property Editor Management

Services Binding Management

Scheduling Tasks

The org.jboss.varia.scheduler.Scheduler MBean

The Log4j Service MBean

RMI Dynamic Class Loading

11. The CMP Engine.

Example Code

Enabling CMP Debug Logging

Running the Examples

The jbosscmp-jdbc Structure

Entity Beans

Entity Mapping

CMP Fields

CMP Field Declaration

CMP Field Column Mapping

Read-only Fields

Auditing Entity Access

Dependent Value Classes

Container-Managed Relationships

CMR-field Abstract Accessors

Relationship Declaration

Relationship Mapping

Declaring Queries

Declaring Finders and Selects

Declaring EJB-QL Queries

Overriding the Mapping of EJB-QL to SQL

JBossQL

DynamicQL

DeclaredSQL

EJB-QL 2.1 and SQL92 Queries

BMP Custom Finders

Optimized Loading

A Loading Scenario

Load Groups

Read-ahead

The Loading Process

Commit Options

The Eager-Loading Process

The Lazy-Loading Process

Lazy-Loading Result Sets

Transactions

Optimistic Locking

Entity Commands and Primary Key Generation

Existing Entity Commands

JBoss Global Defaults

A Sample jbosscmp-jdbc.xml Defaults Declaration

Datasource Customization

Type Mapping

Function Mapping

Mapping

User Type Mappings

12. Web Services.

JAX-RPC Service Endpoints

Enterprise JavaBean Endpoints

Web Services Clients-A JAX-RPC Client

Service References

13. Hibernate.

The Hibernate MBean

Hibernate Archives

Using Hibernate Objects

Using a HAR File Inside an EAR File

The HAR Deployer

14. Aspect-Oriented Programming (AOP) Support.

JBoss AOP: EJB-Style Services for Plain Java Objects

Why AOP?

Basic Concepts of AOP

Joinpoints and Invocation

Advice and Aspects

Introducing Pointcuts

Introductions and Mixins

Building JBoss AOP Applications

Compiling to Bytecode

Compiling Annotations

AOP Instrumentation

The JBoss AOP Deployer

Installing the Latest jboss-aop.deployer Service

Configuring the AOP Service

The Prepackaged Aspects Library

Packaging and Deploying AOP Applications to JBoss

Using Prepackaged Aspects

Developing Your Own Aspects

Packaging and Deploying Custom Aspects

Appendix A. The GNU Lesser General Public License (LGPL).

GNU General Public License

Preamble

Terms and Conditions for Copying, Distribution, and Modification

How to Apply These Terms to Your New Programs

Appendix B. Example Installation.

Index.

Read More Show Less

Preface

Introduction

What This Book Covers

The primary focus of this book is the presentation of the standard JBoss 4.0 architecture components, from the perspectives of both their configuration and architecture. As a user of a standard JBoss distribution, you will gain an understanding of how to configure the standard components. Note that this book is not an introduction to J2EE or how to use J2EE in applications. It focuses on the internal details of the JBoss server architecture and how an implementation of a given J2EE container can be configured and extended.

As you read this book, you will gain a good understanding of the architecture and inte-gration of the standard components, which should enable you to extend or replace the standard components for your infrastructure needs. This book also shows you how to obtain the JBoss source code, along with how to build and debug the JBoss server.

About JBoss

JBoss Application Server was first released in 1999. JBoss Group was founded in 2001, in order to provide expert technical support services. JBoss Group was incorporated in 2004 as JBoss Inc.:

  • Ownership—JBoss Inc. is employee owned and is venture backed by Matrix Partners, Accel Partners, and Intel.
  • Coverage—JBoss Inc. covers North America and Europe on a direct basis. JBoss Inc. provides coverage worldwide via its extensive authorized partner network.
  • Mission statement—JBoss Inc. will provide middleware technology that offers the lowest cost of ownership via open-source software licenses that are backed up by expert technical support services delivered by both JBoss Inc. and our authorized service partners. Our goal is to be the safe choice for enterprises and software providers alike.
  • Company description—JBoss Inc. is in the business of providing superior technical support to its customers. By backing up its immensely popular open-source Java products with technical support from the source, JBoss has become the new safe choice for middleware. Customers such as Apple, Best Western, Borland, Computer Associates, HP, Iona, La Quinta, MCI, Mitre, Nielsen Media Research, Siemens, Sonic, SEMA, Unisys, WebMethods, and Wells Fargo have embraced the Professional Open Source model whereby no-cost, open-source products are supported by the core development team. By providing direct access to the core developers, JBoss Inc. eliminates the runaround common with most commercial software providers.

Professional Open Source from JBoss Inc. offers the following:

  • Standards-based and stable Java middleware technology
  • No-cost, open-source product licenses
  • Backing by a professional and expert support staff
  • Comprehensive services, including professional support, training, and consulting
  • A very large and active community of developers
  • An extensive worldwide network of authorized and certified partners

Benefits of Professional Open Source from JBoss Inc. include the following:

  • Lowest possible total cost of ownership
  • Reliable and safe technology
  • Support, accountability, and trust from a stable company
  • Expedited problem resolution compared to commercial software vendors

About Open Source

The basic idea behind open source is very simple: When programmers can read, re- distribute, and modify the source code for a piece of software, the software evolves: People improve it, people adapt it, people fix bugs. And this can happen at a speed that, if you are used to the slow pace of conventional software development, seems astonishing. Open source is an often-misunderstood term that relates to free software. The Open Source Initiative (OSI) website provides a number of resources that define the various aspects of open source, including a definition of open source at http://www.opensource.org/docs/definition.html. The following quote from the OSI home page nicely summarizes the key aspects as they relate to JBoss:

We in the open source community have learned that this rapid evolutionary process produces better software than the traditional closed model, in which only a very few programmers can see the source and everybody else must blindly use an opaque block of bits.

Open Source Initiative exists to make this case to the commercial world.

Open source software is an idea whose time has finally come. For twenty years it has been building momentum in the technical cultures that built the Internet and the World Wide Web. Now it's breaking out into the commercial world, and that's changing all the rules. Are you ready?

—The Open Source Initiative

About Professional Open Source

JBoss is the leader in the second generation of open source, which JBoss Inc. has termed Professional Open Source. The Professional Open Source methodology is based on the following:

  • It hires and pays experts in the open-source community to write exceptional and innovative software full time.
  • It uses only open-source licenses that are friendly to end-user IT shops, independent software vendors, and the community itself.
  • Directly and through its authorized partners, JBoss Inc. delivers the best support services available, and all of them are backed up by the real product experts.
  • Unlike first-generation open-source providers, JBoss Inc. controls the direction and source code for its projects. It can ensure that all bug fixes and patches are rolled into future versions of its products.
  • By combining enterprise-proven technology, business-friendly open-source licenses, and world-class support services, JBoss Inc. has made Professional Open Source the safe choice for end-user enterprises and independent software vendors alike.

What's New in JBoss 4.0

The JBoss Application Server (JBoss AS) 4.0 is a production-ready Java 2 Enterprise Edition (J2EE) application server. It builds on the highly successful JBoss 3.2 line of open-source Java application servers with improved standards compliance and major feature enhancements. JBoss AS 4.0 offers the same level of quality and stability customers have grown to expect from JBoss 3.2. Key features of JBoss AS 4.0 include the following:

  • It is officially certified to be fully compliant to the J2EE 1.4 specification. JBoss AS 4.0 is the first production-ready J2EE 1.4 application server in the industry.
  • It provides full support for J2EE Web Services and the Service-Oriented Architecture (SOA).
  • It supports the aspect-oriented programming (AOP) model for developing middleware solutions. JBoss AOP greatly improves developer productivity.
  • It tightly integrates with Hibernate, the world's most popular object persistence framework, developed by JBoss, inside the application server container.
  • It improves clustering and distributed caching support, with a new internal caching architecture.

J2EE Certification and Standards Compliance

JBoss AS 4.0 is the industry's first officially certified J2EE 1.4 application server. The certification guarantees that JBoss AS 4.0 conforms to the formal J2EE specification. This allows developers to safely reuse J2EE components (for example, Enterprise JavaBeans EJBs) across different application servers. For example, a developer could easily migrate an EJB developed for WebLogic or WebSphere to JBoss. The certification makes JBoss 4.0 a safe upgrading choice for both existing JBoss users and users of other J2EE application servers.

Compared with JBoss AS 3.2, JBoss AS 4.0 implements the following new J2EE specifications in order to be J2EE 1.4 compliant:

  • JBoss AS 4.0 supports J2EE Web Services, including JAX-RPC (Java API for XML for Remote Procedure Call) and Web Services for J2EE Architecture, which leverages standard J2EE components (for example, EJBs) to provide a scalable and secure Web Services environment. It is the basis for implementing SOA in J2EE. The older JBoss.NET Web Services API in JBoss AS 3.2 is no longer supported. The new Web Services implementation is WS BasicProfile 1.0 compliant.
  • JBoss AS 4.0 implements the JMS (Java Messaging Service) 1.1 specification instead of JMS 1.0 in JBoss AS 3.2. In JMS 1.0, client programming for the Point-to-Point and Pub/Sub domains was done using similar but separate class hierarchies. In JMS 1.1, there is now a domain-independent approach to programming the client application.
  • JBoss AS 4.0 implements the JCA (Java Connector Architecture) 1.5 specification instead of the JCA 1.0 in JBoss AS 3.2. The JCA 1.5 specification adds support for the life cycle management of resource adapters, worker thread management, and transaction and message inflow from the resource adapter to the application server.
  • JBoss AS 4.0 implements the new Java Authorization Contract for Containers (JACC) specification. JACC is a Java 2 permission-based mechanism for externalizing the authorization decision for accessing EJB methods and web resources. The new implementation is based on the JBoss AS 3.2 semantic of associating the J2EE declarative roles with the authenticated subject as a by-product of the JAAS authentication phase. JBoss AS 4.0 maintains compatibility with the JBoss AS 3.2 security configuration.
  • JBoss AS 4.0 implements the EJB 2.1 specification instead of EJB 2.0 in JBoss AS 3.2. The EJB 2.1 specification extends the message-driven bean contracts to support other messaging types in addition to JMS. It supports stateless session beans as web service endpoints. It also includes a new container-managed service called the EJB timer service.

Server Configuration and Services

A big change from JBoss AS 3.2.6 to 4.0.0 is the default server configurations. On JBoss AS 4.0.0, there are four server configurations:

  • minimal—The minimal configuration in JBoss AS 4.0.0 has the same meaning as the minimal configuration in JBoss AS 3.2.6. It starts the JBoss microkernel, JMX MBean server, and JNDI naming service.
  • standard—The standard configuration in JBoss AS 4.0.0 has the same meaning as the default configuration in JBoss AS 3.2.6. It starts all J2EE services in JBoss's optimized class loader. The JBoss AS 4.0.0 standard configuration yields better performance than other configurations when the components are deployed in the same JVM. But the deployed applications are less compartmentalized in this configuration.
  • default—The default configuration in JBoss AS 4.0.0 is new. It is the J2EE-certified configuration of the server. All J2EE services are deployed, and all components are compartmentalized. But the application performance in the JBoss AS 4.0.0 default configuration is not as optimized as that in the standard configuration.
  • all—The all configuration in JBoss AS 4.0.0 has the same meaning as the all configuration in JBoss AS 3.2.6. It starts all services, including clustering.

From JBoss AS 4.0.1, the server configuration names switch back to the JBoss 3.2 convention. The default configuration uses the JBoss optimized class loader, and the standard configuration goes away. The J2EE 1.4 certified configuration of JBoss (that is, the default configuration in JBoss AS 4.0.0) is distributed in a separate package from JBoss AS 4.0.1.

In addition to server configuration name changes, JBoss AS 4.0 also adds support for new types of server services. SARDeployer now recognizes the *.deployer archives (both in expanded directories and in zip files) and the *-deployer.xml files as valid deployment options. The .deployer suffix is equivalent to the .sar suffix, and the -deployer.xml filename suffix is equivalent to the -service.xml descriptor filename suffix. These suffixes are sorted ahead of any other service types so that these .deployer services are started before other services. For example, the JBoss AOP services are deployed as a .deployer service archive (that is, the jboss-aop.deployer archive in the deploy directory). This makes sure that the JBoss AOP services are started early in the server startup process.

JBoss AOP Support

Aspect-oriented middleware is a key innovation in JBoss AS 4.0. It drastically simplifies middleware application development and allows developers to extend the container services. In JBoss AS 4.0, you can deploy AOP-based services and applications directly into the application server. You can find a detailed introduction to aspect-oriented programming and the JBoss AOP framework on the JBoss website, at http://www.jboss.org/products/aop.

In JBoss AS 4.0.0's standard and all configurations (the default and all configurations in JBoss AS 4.0.1), AOP support is provided by the jboss-aop.deployer service. It is a new .deployer-type service similar to the .sar service. The following key features are supported by the jboss-aop.deployer service:

  • By default, you have to instrument the bytecode of your AOP applications offline, using the aopc utility, before you can deploy them into the application server. But you can enable load-time bytecode instrumentation via a configuration attribute in the jboss-aop.deployer/META-INF/jboss-service.xml file.
  • JBoss AS 4.0 ships with several prepackaged aspects to support security transaction asynchronous threads on plain old Java objects (POJOs). There are a number of predefined annotation tags in the baseaop.xml file. You can use those annotations in your POJOs to take advantage of the prepackaged aspect services.
  • JBoss AS 4.0 defines a new XML deployment file type with the filename *-aop.xml. The *-aop.xml file specifies the binding for user-defined aspect classes. The aspect and binding become available to applications on the server.
  • JBoss AS 4.0 defines a new JAR archive file type with the .aop filename extension. The .aop file can be used to package user-defined aspects and their bindings. The jboss-aop.xml file must reside in the META-INF directory in the .aop archive. The .aop archive can be bundled inside other deployment archive files to provide aspect services to a specific application.

Hibernate Integration

Hibernate is a very popular object persistence framework developed by JBoss. It maps Java objects to tables in relational databases and vice versa. The object-relational mapping rules and datasources are specified in special Hibernate configuration files. In JBoss AS 4.0, Hibernate integration support is provided by the jboss-hibernate.deployer service, which is available in the default, standard, and all configurations. The jboss-hibernate.deployer service provides Hibernate framework libraries to all applications on the server.

For Hibernate applications, JBoss defines a new .har service archive type. You can package your Hibernate-mapped Java objects and mapping configuration files in the .har archive. You can also specify a datasource name and a JNDI name for this particular Hibernate configuration in the hibernate-service.xml file in the .har archive. The benefit is that, in your applications, you only need to do a JNDI lookup to retrieve the correctly configured Hibernate SessionFactory object. There is no need to load the mapping and datasource configuration files manually in the application via API calls. In addition, the configuration settings in the hibernate-service.xml file are manageable via the JBoss JMX Management Console.

The .har file can be bundled inside an .ear file or deployed on a standalone basis.

Clustering and Caching

Many of the JBoss AS 4.0 clustering and caching improvements have been backported and made available in JBoss 3.2.3 to 3.2.7. Here's an overview of those improvements:

  • TreeCache, which is based on the JGroups technology, is officially adopted as the underlying distributed cache architecture for the clustering environment.
  • CacheLoader support (store/read from secondary storage) for both shared and unshared back-end stores is added. Currently, there are CacheLoader implementations for the Sleepycat Berkeley DB (BdbjeCacheLoader), for generic JDBC datasources, and for the file system (FileCacheLoader).
  • The HttpSession object is replicated across clustered servers. So if one server fails, the users are moved to a failover server without losing their sessions.
  • The Single Sign-On (SSO) security context is replicated across clustered servers. This way, the user is not required to log in again when a server fails.
  • The new loadbalancer service provides reverse-proxy support with silent failover.

© Copyright Pearson Education. All rights reserved.

Read More Show Less

Customer Reviews

Be the first to write a review
( 0 )
Rating Distribution

5 Star

(0)

4 Star

(0)

3 Star

(0)

2 Star

(0)

1 Star

(0)

Your Rating:

Your Name: Create a Pen Name or

Barnes & Noble.com Review Rules

Our reader reviews allow you to share your comments on titles you liked, or didn't, with others. By submitting an online review, you are representing to Barnes & Noble.com that all information contained in your review is original and accurate in all respects, and that the submission of such content by you and the posting of such content by Barnes & Noble.com does not and will not violate the rights of any third party. Please follow the rules below to help ensure that your review can be posted.

Reviews by Our Customers Under the Age of 13

We highly value and respect everyone's opinion concerning the titles we offer. However, we cannot allow persons under the age of 13 to have accounts at BN.com or to post customer reviews. Please see our Terms of Use for more details.

What to exclude from your review:

Please do not write about reviews, commentary, or information posted on the product page. If you see any errors in the information on the product page, please send us an email.

Reviews should not contain any of the following:

  • - HTML tags, profanity, obscenities, vulgarities, or comments that defame anyone
  • - Time-sensitive information such as tour dates, signings, lectures, etc.
  • - Single-word reviews. Other people will read your review to discover why you liked or didn't like the title. Be descriptive.
  • - Comments focusing on the author or that may ruin the ending for others
  • - Phone numbers, addresses, URLs
  • - Pricing and availability information or alternative ordering information
  • - Advertisements or commercial solicitation

Reminder:

  • - By submitting a review, you grant to Barnes & Noble.com and its sublicensees the royalty-free, perpetual, irrevocable right and license to use the review in accordance with the Barnes & Noble.com Terms of Use.
  • - Barnes & Noble.com reserves the right not to post any review -- particularly those that do not follow the terms and conditions of these Rules. Barnes & Noble.com also reserves the right to remove any review at any time without notice.
  • - See Terms of Use for other conditions and disclaimers.
Search for Products You'd Like to Recommend

Recommend other products that relate to your review. Just search for them below and share!

Create a Pen Name

Your Pen Name is your unique identity on BN.com. It will appear on the reviews you write and other website activities. Your Pen Name cannot be edited, changed or deleted once submitted.

 
Your Pen Name can be any combination of alphanumeric characters (plus - and _), and must be at least two characters long.

Continue Anonymously
Sort by: Showing 1 Customer Reviews
  • Anonymous

    Posted June 11, 2005

    massive buildout

    In early 2000, I met Marc Fleury, the founder of JBoss, at an O'Reilly developers conference in San Jose. He spoke well about the prospects for an independent company to supply expertise in an open source middleware container. In the intervening years, the company and its eponymous product struggled for a while, but now seem to be doing well. This book shows the massive buildout in JBoss functionality during that time. It is compatible with J2EE, which has adopted new ideas like JMS and Message Driven Beans. JBoss is shown in the book to provide full support for these. Most importantly, if you are already developing Enterprise Java Beans under another container (like the one supplied by Sun, perhaps), then there is a crucial chapter. It explains how JBoss can be a plausible alternative container for your EJBs. Hence you can decouple your bean development from its container, if it proves advantageous. It has been some tough years for JBoss. But hopefully the book is a harbinger of better times ahead.

    Was this review helpful? Yes  No   Report this review
Sort by: Showing 1 Customer Reviews

If you find inappropriate content, please report it to Barnes & Noble
Why is this product inappropriate?
Comments (optional)