Celtix: The Open Source Java Enterprise Service Bus (ESB)

(by Huihoo - 灰狐 - Enterprise Open Source)

一、Celtix 概述

Celtix: The Open Source Java Enterprise Service Bus (ESB)
http://celtix.objectweb.org/
ESB 是 SOA 的核心

Celtix由IONA发起,并hosted objectweb.org
http://www.iona.com/celtix/
http://forge.objectweb.org/projects/celtix/

Celtix 实际上是可看做是 IONA Aritx 商业产品的一个免费、开源的评估版本。





Celtix采用双许可协议:LGPL,EPL
因为Celtex 的分发版中会包含Eclipse SOA Tools Platform project,所以也包含了 EPL(Eclipse Public License)

更多许可信息可访问
http://celtix.objectweb.org/docs/faq/license.html

Celtix 当前版本的功能包括:
* Complete support for Webservices Reliability based on WS-RM Specification.
* Enhanced WS-Addressing capabilities.
* Configuration based support for JMS Transport.
* Support for JMX based Management capabilities.
* Support for XML Binding.
* Enhanced support for wsdl2java and java2wsdl tools.
* Support for new commandline tools like, xsd2wsdl, wsdl2xml, wsdl2soap, wsdl2service.
* Preliminary implementation of Routing capabilities limited to SOAP.
* Enhanced support JAX-WS 2.0 API's.
* Native integration of Celtix into Apache Geronimo J2EE appserver.
* Support for validating application data against XMLSchema in runtime.
* Enhanced support for deploying celtix services into a servlet container based on feedback from Jonas J2EE appserver project.
* Celtix now supports Maven 2.0.3.

二、Celtix 架构

(一)、高层视图


我们再来看看 Artix’s High-Level Architecture

从Artix的高层视图,我们也不难看出 Celtix 所拥有的相似性。

(二)、Celtix的组件

1、核心组件
--Configuration Service
为组件访问配置信息提供了一个统一的抽象层

--Plug-In Manager
为功能的动态插入/装载提供一个简单、方便的方法

--Binding Manager
为客户、服务端的消息传递创建一个Binding

--WSDL Model
WSDL model 提供了一个高效访问 WSDL data的方式, 且允许 WSDL 的属性在运行时能动态改变。

--Dispatcher/Workqueue
此结构能高效的处理消息的请求与派发,并且能通过 Workqueue 和 thread pool 并发的处理消息。

2、客户端组件
包含:Client Proxy, Generic Client Plug-In
A client proxy is a Java object that exposes the same operations as those defined in a WSDL port type.

3、服务端组件
包含 Servant
一个 Celtix servant 就是一个实现了 WSDL service的对象.



(三)、请求处理

分别描述了Requests on the Client Side 和 Requests on the Server Side
具体细节请访问:
https://wiki.objectweb.org/celtix/Wiki.jsp?page=RequestHandling

三、Celtix 安装

http://forge.objectweb.org/projects/celtix 获得Celtix分发版
Celtix 提供两种不同的分发版本:

Souce:
1. celtix-1.0-beta-1-src-epl.jar
2. celtix-1.0-beta-1-src-lgpl.jar

Binary:
1. celtix-1.0-beta-1-bin-epl.jar
2. celtix-1.0-beta-1-bin-lgpl.jar

为简单方便,我们直接安装 Binary & LGPL版
http://forge.objectweb.org/project/download.php?group_id=192&file_id=5727

celtix-1.0-beta-1-bin-lgpl.jar

创建一个安装目录:Celtix-install

java -jar

安装目录


注意:
请事先安装好 JDK 1.5和ANT 1.6.5
并设置好JAVA_HOME,ANT_HOME,PATH环境变量

四、Celtix 测试

Running a Sample Application

%CELTIX_HOME%\samples\hello_world
or
$CELTIX_HOME/samples/hello_world

1. ant build
2. 打开一个命令窗口:执行: ant server

系统信息:
server:
[java] Starting Server
[java] Server ready...
[java] Executing operation sayHi
[java] Executing operation greetMe
[java] Message received: huihoo
[java] Executing operation pingMe, throwing PingMeFault exception
[java] Executing operation greetMeOneWay
[java] Hello there huihoo

3. ant client
系统信息
client:
[java] file:/home/huihoo/java/soa/Celtix-install/celtix/samples/hello_world/wsdl/hello_world.wsdl
[java] Invoking sayHi...
[java] Server responded with: Bonjour
[java] Invoking greetMe...
[java] Server responded with: Hello huihoo
[java] Invoking greetMeOneWay...
[java] No response from server as method is OneWay
[java] Invoking pingMe, expecting exception...
[java] Expected exception: PingMeFault has occurred.
[java] org.objectweb.hello_world_soap_http.PingMeFault: org.objectweb.hello_world_soap_http.PingMeFault: PingMeFault raised by server

BUILD SUCCESSFUL

Total time: 8 seconds

这是一个SOAP/HTTP Client and Server with Celtix的例子



五、Celtix 配置

稍后推出,请关注

六、Celtix 应用开发

稍后推出,请关注

参考资料

http://celtix.objectweb.org/
https://wiki.objectweb.org/celtix/