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標準特性方面,主要的改進包括:
• JBoss 4.0是業界第一家取得正式J2EE 1.4認證的應用服務器,完全符合規范的J2EE標準
• 完全支持J2EE web services(JAX-RPC方式和WS4EE架構方式)和SOA
• 支持AOP模型,JBoss Aop極大的提高了生產力
• 與Hibernate緊密集成
• 通過一個內建的Caching構架提升集群功能和分布式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標準,所以允許開發者在不同的應用服務器上重用J2EE組件(如EJB等),比如可以輕易的將部署在Weblogic或Websphere上的EJB遷移到JBoss上賴,JBoss4比JBoss3.2實現了下面幾個新的J2EE標準:
• JBoss4支持J2EE Web Services,包括JAX-RPC和J2EE架構的Web Services,使用EJB提供安全的Web Service環境,它是基于J2EE的SOA實現。JBoss3.2中舊的JBoss.NET Web Services API不再支持,新的Web Service實現是WS BasicProfile-1.0 compliant.
• JBoss4實現JMS1.1替代了JBoss3.2中的JMS1.0
• JBoss4實現了JCA (Java Connector Architecture) 1.5替代了JBoss3.2中的JCA1.0
• JBoss4實現了新的Java Authorization Contract for Containers (JACC),JACC是JAVA2一個基本的權限機制,為訪問EJB方法和web資源賦予授權描述,即J2EE應用服務器和特定的授權認證服務器之間定義了一個連接的協約,新的實現在語法上基于JBoss3.2,使用認證過的Subject聲明Roles,認證與JAAS的authentication保持一致。并且security配置,JBoss4和JBoss3.2兼容。
• JBoss4實現了EJB2.1規范.替代了JBoss3.2中的EJB2.0規范。
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
關于2、3、4、5點具體的內容在以后詳細分析.
參考文檔:
http://docs.jboss.org/jbossas/jboss4guide/r5/adminguide.pdf