More Books
JBoss 4.0 The Official Guide
JBoss® 4.0 The Official Guide
Table of Contents
Copyright
About the Authors
We Want to Hear from You!
Introduction
What This Book Covers
About JBoss
About Open Source
About Professional Open Source
What's New in JBoss 4.0
Chapter 1.  Installing and Building the JBoss Server
Getting the Binary Files
Installing the Binary Package
Basic Installation Testing
Booting from a Network Server
Building the Server from Source Code
Chapter 2.  The JBoss JMX Microkernel
JMX
The JBoss JMX Implementation Architecture
Connecting to the JMX Server
Using JMX as a Microkernel
The JBoss Deployer Architecture
Exposing MBean Events via SNMP
Remote Access to Services, Detached Invokers
Chapter 3.  Naming on JBoss
An Overview of JNDI
The JBossNS Architecture
Chapter 4.  Transactions on JBoss
Transaction and JTA Overview
JBoss Transaction Internals
Chapter 5.  EJBs on JBoss
The EJB Client-Side View
The EJB Server-Side View
The EJB Container
Entity Bean Locking and Deadlock Detection
Chapter 6.  Messaging on JBoss
JMS Examples
JBossMQ Overview
JBossMQ Configuration and MBeans
Specifying the MDB JMS Provider
Chapter 7.  Connectors on JBoss
JCA Overview
An Overview of the JBossCX Architecture
Configuring JDBC Datasources
Configuring Generic JCA Adaptors
Chapter 8.  Security on JBoss
J2EE Declarative Security Overview
An Introduction to JAAS
The JBoss Security Model
The JBossSX Architecture
The Secure Remote Password (SRP) Protocol
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
Chapter 9.  Web Applications
The Tomcat Service
The Tomcat server.xml File
The Engine Element
The Host 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
Chapter 10.  MBean Services Miscellany
System Properties Management
Property Editor Management
Services Binding Management
Scheduling Tasks
The Log4j Service MBean
RMI Dynamic Class Loading
Chapter 11.  The CMP Engine
Example Code
The jbosscmp-jdbc Structure
Entity Beans
CMP Fields
Container-Managed Relationships
Declaring Queries
Optimized Loading
The Loading Process
Transactions
Optimistic Locking
Entity Commands and Primary Key Generation
JBoss Global Defaults
Datasource Customization
Chapter 12.  Web Services
JAX-RPC Service Endpoints
Enterprise JavaBean Endpoints
Web Services ClientsA JAX-RPC Client
Service References
Chapter 13.  Hibernate
The Hibernate MBean
Hibernate Archives
Using Hibernate Objects
Using a HAR File Inside an EAR File
The HAR Deployer
Chapter 14.  Aspect-Oriented Programming (AOP) Support
JBoss AOP: EJB-Style Services for Plain Java Objects
Why AOP?
Basic Concepts of AOP
Building JBoss AOP Applications
The JBoss AOP Deployer
Packaging and Deploying AOP Applications to JBoss
Appendix A.  The GNU Lesser General Public License (LGPL)
GNU General Public License
Appendix B.  Example Installation
Index
SYMBOL
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X

Configuring Generic JCA Adaptors

XSLSubDeployer also supports the deployment of arbitrary non-JDBC JCA resource adaptors. Figure 7.10 shows the schema for the top-level connection factory elements of the *-ds.xml configuration deployment file.

Figure 7.10. The simplified JCA adaptor connection factory configuration descriptor top-level schema elements.


You can specify multiple connection factory configurations in a configuration deployment file. These are the child elements of the connection-factories root element:

  • mbean You can specify any number of mbean elements to define MBean services that should be included in the jboss-service.xml descriptor that results from the transformation. You can use this element to configure additional services used by the adaptor.

  • no-tx-connection-factory You use this element to specify the (org.jboss.resource.connectionmanager)NoTxConnectionManager service configuration. NoTxConnectionManager is a JCA connection manager with no transaction support. The no-tx-connection-factory child element schema is shown in Figure 7.11.

    Figure 7.11. The no-tx-connection-factory element schema.


  • tx-connection-factory You use this element to specify the (org.jboss.resource.connectionmanager)TxConnectionManager service configuration. The tx-connection-factory child element schema is shown in Figure 7.12.

    Figure 7.12. The tx-connection-factory element schema.


The majority of the elements here are the same as those of the datasource configuration. The elements that are unique to the connection factory configuration include the following:

  • adaptor-display-name This is a human-readable display name to assign to the connection manager MBean.

  • local-transaction This element specifies that the tx-connection-factory supports local transactions.

  • xa-transaction This element specifies that the tx-connection-factory supports XA transactions.

  • track-connection-by-tx This element specifies that a connection should be used only on a single transaction and that a transaction should be associated with only one connection.

  • rar-name This is the name of the RAR file that contains the definition for the resource you want to provide. For nested RAR files, the name would look like myapplication.ear#my.rar.

  • connection-definition This is the connection factory interface class. It should match the connectionfactory-interface in the ra.xml file.

  • config-property You can specify any number of properties to supply to the ManagedConnectionFactory MBean service configuration. Each config-property element specifies the value of a ManagedConnectionFactory property. The config-property element has two required attributes:

    • name The name of the property.

    • type The fully qualified type of the property.

The content of the config-property element provides the string representation of the property value. This is converted to the true property type by using the associated type PropertyEditor.