JBoss Enterprise Application Platform

JBoss Enterprise Application Platform

Configuration Guide

Legal Notice

Nov, 2007

Abstract

This book is a guide to the configuration of the Jboss Application Server.


What this Book Covers
About JBoss
About Open Source
About Professional Open Source
I. Java EE 5 Application Configuration
1. Enterprise Applications with EJB3 Services
1.1. Session Beans
1.2. Entity Beans (a.k.a. Java Persistence API)
1.2.1. The persistence.xml file
1.2.2. Use Alternative Databases
1.2.3. Default Hibernate options
1.3. Message Driven Beans
1.4. Package and Deploy EJB3 Services
1.4.1. Deploy the EJB3 JAR
1.4.2. Deploy EAR with EJB3 JAR
2. Deployment
2.1. Deployable Application Types
2.2. Standard Server Configurations
2.2.1. The production Configuration
2.2.2. Further Tuning from the production Configuration
II. JBoss AS Infrastructure
3. The JBoss JMX Microkernel
3.1. An Introduction to JMX
3.1.1. Instrumentation Level
3.1.2. Agent Level
3.1.3. Distributed Services Level
3.1.4. JMX Component Overview
3.2. JBoss JMX Implementation Architecture
3.2.1. The JBoss ClassLoader Architecture
3.2.2. Class Loading and Types in Java
3.2.3. JBoss XMBeans
3.3. Connecting to the JMX Server
3.3.1. Inspecting the Server - the JMX Console Web Application
3.3.2. Connecting to JMX Using RMI
3.3.3. Command Line Access to JMX
3.3.4. Connecting to JMX Using Any Protocol
3.4. Using JMX as a Microkernel
3.4.1. The Startup Process
3.4.2. JBoss MBean Services
3.4.3. Writing JBoss MBean Services
3.4.4. Deployment Ordering and Dependencies
3.5. JBoss Deployer Architecture
3.5.1. Deployers and ClassLoaders
3.6. Remote Access to Services, Detached Invokers
3.6.1. A Detached Invoker Example, the MBeanServer Invoker Adaptor Service
3.6.2. Detached Invoker Reference
4. Naming on JBoss
4.1. An Overview of JNDI
4.1.1. Names
4.1.2. Contexts
4.2. The JBossNS Architecture
4.3. The Naming InitialContext Factories
4.3.1. The standard naming context factory
4.3.2. The org.jboss.naming.NamingContextFactory
4.3.3. Naming Discovery in Clustered Environments
4.3.4. The HTTP InitialContext Factory Implementation
4.3.5. The Login InitialContext Factory Implementation
4.3.6. The ORBInitialContextFactory
4.4. JNDI over HTTP
4.4.1. Accessing JNDI over HTTP
4.4.2. Accessing JNDI over HTTPS
4.4.3. Securing Access to JNDI over HTTP
4.4.4. Securing Access to JNDI with a Read-Only Unsecured Context
4.5. Additional Naming MBeans
4.5.1. JNDI Binding Manager
4.5.2. The org.jboss.naming.NamingAlias MBean
4.5.3. org.jboss.naming.ExternalContext MBean
4.5.4. The org.jboss.naming.JNDIView MBean
4.6. J2EE and JNDI - The Application Component Environment
4.6.1. ENC Usage Conventions
5. Connectors on JBoss
5.1. JCA Overview
5.2. An Overview of the JBossCX Architecture
5.2.1. BaseConnectionManager2 MBean
5.2.2. RARDeployment MBean
5.2.3. JBossManagedConnectionPool MBean
5.2.4. CachedConnectionManager MBean
5.2.5. A Sample Skeleton JCA Resource Adaptor
5.3. Configuring JDBC DataSources
5.4. Configuring Generic JCA Adaptors
6. Transactions on JBoss
6.1. Transaction/JTA Overview
6.1.1. Pessimistic and optimistic locking
6.1.2. The components of a distributed transaction
6.1.3. The two-phase XA protocol
6.1.4. Heuristic exceptions
6.1.5. Transaction IDs and branches
6.2. JTS support
6.3. Web Services Transactions
6.4. Configuring JBoss Transactions
6.5. Local versus distributed transactions
7. Messaging on JBoss
7.1. JMS Examples
7.1.1. A Point-To-Point Example
7.1.2. A Pub-Sub Example
7.1.3. A Pub-Sub With Durable Topic Example
7.1.4. A Point-To-Point With MDB Example
7.2. JBoss Messaging Overview
8. Security on JBoss
8.1. J2EE Declarative Security Overview
8.1.1. Security References
8.1.2. Security Identity
8.1.3. Security roles
8.1.4. EJB method permissions
8.1.5. Web Content Security Constraints
8.1.6. Enabling Declarative Security in JBoss
8.2. An Introduction to JAAS
8.2.1. What is JAAS?
8.3. The JBoss Security Model
8.3.1. Enabling Declarative Security in JBoss Revisited
8.4. The JBoss Security Extension Architecture
8.4.1. How the JaasSecurityManager Uses JAAS
8.4.2. The JaasSecurityManagerService MBean
8.4.3. The JaasSecurityDomain MBean
8.5. Defining Security Domains
8.5.1. Loading Security Domains
8.5.2. The DynamicLoginConfig service
8.5.3. Using JBoss Login Modules
8.5.4. Writing Custom Login Modules
8.6. The Secure Remote Password (SRP) Protocol
8.6.1. Providing Password Information for SRP
8.6.2. Inside of the SRP algorithm
8.7. Running JBoss with a Java 2 security manager
8.8. Using SSL with JBoss
8.8.1. Adding SSL to EJB3
8.8.2. Adding SSL to EJB 2.1 calls
8.9. Configuring JBoss for use Behind a Firewall
8.10. How to Secure the JBoss Server
8.10.1. The JMX Console
8.10.2. The Web Console
8.10.3. The HTTP Invokers
8.10.4. The JMX Invoker
9. Web Services
9.1. Document/Literal
9.2. Document/Literal (Bare)
9.3. Document/Literal (Wrapped)
9.4. RPC/Literal
9.5. RPC/Encoded
9.6. Web Service Endpoints
9.7. Plain old Java Object (POJO)
9.8. The endpoint as a web application
9.9. Packaging the endpoint
9.10. Accessing the generated WSDL
9.11. EJB3 Stateless Session Bean (SLSB)
9.12. Endpoint Provider
9.13. WebServiceContext
9.14. Web Service Clients
9.14.1. Service
9.14.2. Dynamic Proxy
9.14.3. WebServiceRef
9.14.4. Dispatch
9.14.5. Asynchronous Invocations
9.14.6. Oneway Invocations
9.15. Common API
9.15.1. Handler Framework
9.15.2. Message Context
9.15.3. Fault Handling
9.16. DataBinding
9.16.1. Using JAXB with non annotated classes
9.17. Attachments
9.17.1. MTOM/XOP
9.17.2. SwaRef
9.18. Tools
9.18.1. Bottom-Up (Using wsprovide)
9.18.2. Top-Down (Using wsconsume)
9.18.3. Client Side
9.18.4. Command-line & Ant Task Reference
9.18.5. JAX-WS binding customization
9.19. Web Service Extensions
9.19.1. WS-Addressing
9.19.2. WS-BPEL
9.19.3. WS-Eventing
9.19.4. WS-Security
9.19.5. WS-Transaction
9.19.6. XML Registries
9.19.7. WS-Policy
9.20. JBossWS Extensions
9.20.1. Proprietary Annotations
10. Additional Services
10.1. Memory and Thread Monitoring
10.2. The Log4j Service
10.3. System Properties Management
10.4. Property Editor Management
10.5. Services Binding Management
10.5.1. AttributeMappingDelegate
10.5.2. XSLTConfigDelegate
10.5.3. XSLTFileDelegate
10.5.4. The Sample Bindings File
10.6. RMI Dynamic Class Loading
10.7. Scheduling Tasks
10.7.1. org.jboss.varia.scheduler.Scheduler
10.8. The Timer Service
10.9. The BarrierController Service
10.10. Exposing MBean Events via SNMP
III. Clustering Configuration
11. Quick Tutorial to Setup a Clustered Web Application
11.1. Setup the simple web cluster
11.1.1. Setup the load balancer
11.1.2. Configure JBoss AS nodes
11.1.3. Shared Database
11.2. Optional improvements to the simple cluster
11.2.1. Failover support
11.2.2. Database cache
11.3. Basic optimization
12. JBossCache and JGroups Services
12.1. JGroups Configuration
12.1.1. Transport Protocols
12.1.2. Discovery Protocols
12.1.3. Failure Detection Protocols
12.1.4. Reliable Delivery Protocols
12.1.5. Other Configuration Options
12.2. JBossCache Configuration
13. Clustering
13.1. Introduction
13.1.1. Cluster Definition
13.1.2. Service Architectures
13.1.3. Load-Balancing Policies
13.1.4. Farming Deployment
13.1.5. Distributed state replication services
13.2. Clustered JNDI Services
13.2.1. How it works
13.2.2. Client configuration
13.2.3. JBoss configuration
13.3. Clustered Session EJBs
13.3.1. Stateless Session Bean in EJB 2.x
13.3.2. Stateful Session Bean in EJB 2.x
13.3.3. Stateless Session Bean in EJB 3.0
13.3.4. Stateful Session Bean in EJB 3.0
13.4. Clustered Entity EJBs
13.4.1. Entity Bean in EJB 2.x
13.4.2. Entity Bean in EJB 3.0
13.5. HTTP Services
13.5.1. Download the software
13.5.2. Configure Apache to load mod_jk
13.5.3. Configure worker nodes in mod_jk
13.5.4. Configure JBoss
13.5.5. Configure HTTP session state replication
13.5.6. Enabling session replication in your application
13.5.7. Use FIELD level replication
13.5.8. Monitoring session replication
13.5.9. Using Single Sign On
13.6. Clustered JMS Services
IV. Legacy EJB Support
14. EJBs on JBoss
14.1. The EJB Client Side View
14.1.1. Specifying the EJB Proxy Configuration
14.2. The EJB Server Side View
14.2.1. Detached Invokers - The Transport Middlemen
14.2.2. The HA JRMPInvoker - Clustered RMI/JRMP Transport
14.2.3. The HA HttpInvoker - Clustered RMI/HTTP Transport
14.3. The EJB Container
14.3.1. EJBDeployer MBean
14.3.2. Container Plug-in Framework
14.4. Entity Bean Locking and Deadlock Detection
14.4.1. Why JBoss Needs Locking
14.4.2. Entity Bean Lifecycle
14.4.3. Default Locking Behavior
14.4.4. Pluggable Interceptors and Locking Policy
14.4.5. Deadlock
14.4.6. Advanced Configurations and Optimizations
14.4.7. Running Within a Cluster
14.4.8. Troubleshooting
14.5. EJB Timer Configuration
15. The CMP Engine
15.1. Example Code
15.1.1. Enabling CMP Debug Logging
15.1.2. Running the examples
15.2. The jbosscmp-jdbc Structure
15.3. Entity Beans
15.3.1. Entity Mapping
15.4. CMP Fields
15.4.1. CMP Field Declaration
15.4.2. CMP Field Column Mapping
15.4.3. Read-only Fields
15.4.4. Auditing Entity Access
15.4.5. Dependent Value Classes (DVCs)
15.5. Container Managed Relationships
15.5.1. CMR-Field Abstract Accessors
15.5.2. Relationship Declaration
15.5.3. Relationship Mapping
15.6. Queries
15.6.1. Finder and select Declaration
15.6.2. EJB-QL Declaration
15.6.3. Overriding the EJB-QL to SQL Mapping
15.6.4. JBossQL
15.6.5. DynamicQL
15.6.6. DeclaredSQL
15.6.7. EJBQL 2.1 and SQL92 queries
15.6.8. BMP Custom Finders
15.7. Optimized Loading
15.7.1. Loading Scenario
15.7.2. Load Groups
15.7.3. Read-ahead
15.8. Loading Process
15.8.1. Commit Options
15.8.2. Eager-loading Process
15.8.3. Lazy loading Process
15.8.4. Lazy loading result sets
15.9. Transactions
15.10. Optimistic Locking
15.11. Entity Commands and Primary Key Generation
15.11.1. Existing Entity Commands
15.12. Defaults
15.12.1. A sample jbosscmp-jdbc.xml defaults declaration
15.13. Datasource Customization
15.13.1. Type Mapping
15.13.2. Function Mapping
15.13.3. Mapping
15.13.4. User Type Mappings
A. Book Example Installation
B. Use Alternative Databases with JBoss AS
B.1. How to Use Alternative Databases
B.2. Install JDBC Drivers
B.2.1. Special notes on Sybase
B.3. Creating a DataSource for the External Database
B.4. Change Database for the JMS Services
B.5. Support Foreign Keys in CMP Services
B.6. Specify Database Dialect for Java Persistence API
B.7. Change Other JBoss AS Services to Use the External Database
B.7.1. The Easy Way
B.7.2. The More Flexible Way
B.8. A Special Note About Oracle DataBases