Home | Syndication | Delicious | Douban | Twitter | FriendFeed

Spring + OSGi + Container = ?

今年年初,SpringSource 收购了 Covalent,然后 Rod Johnson 又公开说 (from Javalobby)

we're basically seeing the decline of the traditional Java EE server.

而技术社区近来总有关于 OSGi 和 container 等方面的话题,加以关联,貌似 SpringSource 想借 Spring Framework 成功之东风进入 container 领域、而且打算利用 OSGi 来构建。

于是,在四月结束的时候,标题等式中的问号有了答案:SpringSource Application Platform,可以简写为 S2AP。从名字上看,很容易联想到 Eclipse RCP,不同的是,RCP 专注 client 端,而 S2AP 专注 server 端。接受访问时,Rod Johnson 在解释为什么使用 platform 这个词、而不是 server 这个看起来更常规的词来命名时,说:

We didn't want to call it a server because it will be able to be extended and accept different deployment modules, so it will be broader in scope than a typical server.

看来蛮有野心和决心的。

SpringSource Application Platform 

刚刚发布是的是 1.0.0 beta,基于 GPL v3。

简单地试用了一下,S2AP 有三点让我印象深刻:

1,S2AP 支持三种应用部署方式:热部署(Hot Deploy)、控制台部署(Admin Console)、编程部署(Programmatic)。其中的热部署方式很好,直接将 WAR 包丢入 pickup 目录或者从 pickup 中删除就可以完成部署或移除应用。需要说明的是,S2AP 目前还不支持混合方式,即,部署和移除的方式要一致。

2,S2AP 不仅自身是构建在 OSGi 之上,而且它还允许开发者将自己开发的 OSGi bundle 部署到其中,这一点很难得,对于推动 OSGi 在 server 端应用很有好处。目前的主流应用服务器在向 OSGi 靠拢时还只是将自身构建于 OSGi 之上,尚不允许开发者部署自己的 OSGi bundle。

3,SpringSource 提供了一个在线的 bundle repository,这似乎是一个“技术含量”不那么高的举措,但是非常有意义。我在做 TPTP 开发时就发现,不同的 projects 经常对同一个第三方 library 进行封装,这完全没有必要嘛。目前 SpringSource Bundle Repository 包含的内容还少,以 Apache 旗下组件为主,相信会慢慢丰富起来的。

This entry was posted on Friday, May 2nd, 2008 at 18:25 and is filed under TechNotes. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

Leave a Reply