JBoss 概述(JBoss4)

前言:這一系列文章主要是基于JBoss4,參考文檔主要是官方文檔為主

What's new in JBoss 4

The JBoss Application Server (JBoss AS) 4.0 is a production-ready Java 2 Enterprise Edition (J2EE)
application server. It builds on top of 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:
• Officially certified to be fully compliant to the J2EE 1.4 specification. JBoss AS 4.0 is the first
productionready J2EE 1.4 application server in the industry.
• Full support for J2EE Web Services and the Service Oriented Architecture (SOA).
• Supports the Aspect-Oriented Programming (AOP) model for developing middleware solutions. JBoss AOP
greatly improves developer productivity.
• Tightly integrates with Hibernate, world's most popular object persistence framework developed by JBoss,
 inside the application server container.
• Improves clustering and distributed caching support with on a new internal caching architecture.

Jboss4基于Jboss3.2,在J2EE標(biāo)準(zhǔn)特性方面,主要的改進(jìn)包括:

• JBoss 4.0是業(yè)界第一家取得正式J2EE 1.4認(rèn)證的應(yīng)用服務(wù)器,完全符合規(guī)范的J2EE標(biāo)準(zhǔn)
• 完全支持J2EE web services(JAX-RPC方式和WS4EE架構(gòu)方式)和SOA
• 支持AOP模型,JBoss Aop極大的提高了生產(chǎn)力
• 與Hibernate緊密集成
• 通過(guò)一個(gè)內(nèi)建的Caching構(gòu)架提升集群功能和分布式Caching(TreeCache)

1. 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. That allows developers to safely
reuse J2EE components (e.g., Enterprise JavaBeans or 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
 the Web Services for J2EE Architecture, which leverages standard J2EE components (e.g., EJBs) to provide a
scalable and secure Web Service 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 the 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 as well as transaction and message inflow from the resource adapter to the
application server. JBoss Release 5 xvi
• 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 the 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.


JBoss4完全遵循J2EE1.4標(biāo)準(zhǔn),所以允許開(kāi)發(fā)者在不同的應(yīng)用服務(wù)器上重用J2EE組件(如EJB等),比如可以輕易的將部署在Weblogic或Websphere上的EJB遷移到JBoss上賴(lài),JBoss4比JBoss3.2實(shí)現(xiàn)了下面幾個(gè)新的J2EE標(biāo)準(zhǔn):

• JBoss4支持J2EE Web Services,包括JAX-RPC和J2EE架構(gòu)的Web Services,使用EJB提供安全的Web Service環(huán)境,它是基于J2EE的SOA實(shí)現(xiàn)。JBoss3.2中舊的JBoss.NET Web Services API不再支持,新的Web Service實(shí)現(xiàn)是WS BasicProfile-1.0 compliant.
• JBoss4實(shí)現(xiàn)JMS1.1替代了JBoss3.2中的JMS1.0
• JBoss4實(shí)現(xiàn)了JCA (Java Connector Architecture) 1.5替代了JBoss3.2中的JCA1.0
• JBoss4實(shí)現(xiàn)了新的Java Authorization Contract for Containers (JACC),JACC是JAVA2一個(gè)基本的權(quán)限機(jī)制,為訪(fǎng)問(wèn)EJB方法和web資源賦予授權(quán)描述,即J2EE應(yīng)用服務(wù)器和特定的授權(quán)認(rèn)證服務(wù)器之間定義了一個(gè)連接的協(xié)約,新的實(shí)現(xiàn)在語(yǔ)法上基于JBoss3.2,使用認(rèn)證過(guò)的Subject聲明Roles,認(rèn)證與JAAS的authentication保持一致。并且security配置,JBoss4和JBoss3.2兼容。
• JBoss4實(shí)現(xiàn)了EJB2.1規(guī)范.替代了JBoss3.2中的EJB2.0規(guī)范。

2. New Services Types
JBoss AS 4.0 adds support for new types of server services. The 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 file name suffix is
equivalent to the -service.xml descriptor file name 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 (i.e., the jboss-aop.deployer archive in the deploy
directory). That makes sure that the
JBoss AOP services are started early on in the server start-up process


3. JBoss AOP Support
4. Hibernate Integration
5. Clustering and Caching

關(guān)于2、3、4、5點(diǎn)具體的內(nèi)容在以后詳細(xì)分析.

參考文檔:
http://docs.jboss.org/jbossas/jboss4guide/r5/adminguide.pdf