体验 SpringSource DM Server

前言

SpringSource dm Server™  is a completely modular, OSGi-based Java server designed to run enterprise Java applications and Spring-powered applications with a new degree of flexibility and reliability. The SpringSource dm Server is based on the new SpringSource Dynamic Module Kernel™ (dm Kernel). The dm Kernel provides a module-based backbone for the server, which also harnesses the power of Spring, Apache Tomcat and OSGi-based technologies.

 

dmServer_graphic_small.jpg

 

SpringSource宣布dm Server发布,版本为1.0.0GA。这是一个完全模块化部署的,基于OSGi的Java服务器,为运行企业Java应用和Spring应用提供更加 强大的灵活性和可靠性。SpringSource应用平台是构建在Spring、OSGi和Apache Tomcat之上的应用服务器,这个新的应用服务器摒弃了原有的Java EE服务器标准,自然而然地将Spring编程模型展现其中,随之而来的还有一套基于OSGi内核构建的全新部署和打包系统。

详情点击:http://www.springsource.com/node/597

 

 

正文

今天在javaeye看到了SpringSource dm Server GA版本正式发布 的消息,使得原本就对OSGi很好奇的我一下子又来了兴趣,立即去SpringSource下载SpringSource DM Server 来体验。

 

按导航一路点击,进入到下载页面,发现binary版本居然下载不了,汗~ 无奈只能下载source

然后开始build。按readme.txt上的说明cd to the build-dm-server directory,run 'ant' to build the dm Server binary ZIP file containing a runnable version of the server. 构建是使用ant来做的,首先ivy会下载了一大堆依赖的jar,这个过程可能会比较漫长(视网络连接速度而定),期间或许你可以去睡一觉

 

很快问题来了,说是一些java文件里有一些字符串没有正确使用“"”括起来。根据以往经验,我怀疑是javac使用平台默认的编码(我的是windows xp 中文版,那么应该就是GBK/GB18030),和java源代码中使用的编码(后经证实是UTF-8)不兼容造成的。于是修改了spring-build目录下相关build.xml里s:javac task的属性,增加了encoding="UTF-8"。重新build,问题解决。

 

接下来又是漫长的等待,整个编译过程接近半小时(没算下载依赖jar的时间)。漫长等待之后,终于完成了。

[...]
zip-server:
      [zip] Building zip: F:\springsource-dm-server-sources-1.0.0.RELEASE\build-dm-server\target\artifacts\springsource-dm-server-1.0.0.BUILD-20081111081700.zip

dist:

BUILD SUCCESSFUL
Total time: 23 minutes 20 seconds

 

OK, cd %SERVER_HOME%,run bin\startup.bat

很不幸,问题又来了

main                     <SPKB0002E> Start failed:
com.springsource.server.osgi.framework.OsgiFrameworkException: Failed to start bundle 'com.springsource.javax.servlet.jsp.jstl'
	at com.springsource.server.osgi.framework.equinox.EquinoxBundleInstaller.startBundle(EquinoxBundleInstaller.java:378)
	at com.springsource.server.osgi.framework.equinox.EquinoxBundleInstaller.doInstallBundle(EquinoxBundleInstaller.java:123)
	at com.springsource.server.osgi.framework.support.AbstractBundleInstaller.installBundleFromLocation(AbstractBundleInstaller.java:170)
	at com.springsource.server.osgi.framework.support.AbstractBundleInstaller.installBundleFromDefinition(AbstractBundleInstaller.java:242)
	at com.springsource.server.osgi.framework.support.AbstractBundleInstaller.installBundle(AbstractBundleInstaller.java:137)
	at com.springsource.server.osgi.framework.support.AbstractBundleInstaller.installBundle(AbstractBundleInstaller.java:109)
	at com.springsource.server.kernel.bootstrap.KernelBootstrap.start(KernelBootstrap.java:73)
	at com.springsource.server.kernel.bootstrap.Bootstrap.main(Bootstrap.java:73)
Caused by: org.osgi.framework.BundleException: The bundle could not be resolved. Reason: Missing Constraint: Import-Package: javax.servlet.jsp; version="[2.1.0,3.0.0)"
	at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:305)
	at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:265)
	at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:257)
	at com.springsource.server.osgi.framework.equinox.EquinoxBundleInstaller.startBundle(EquinoxBundleInstaller.java:376)
	... 7 more

 这次我束手无策了 ,毕竟对OSGi的了解太少了。

无奈之下,来到Spring Community Forums寻求帮助。无独有偶,居然让我看到另一个哥们遇到了和我同样的问题,并已经得到高人的解答~~ 哈哈,真是好消息!

http://forum.springframework.org/showthread.php?t=62844

 

按照上面所述解决方法,做了相应修改以后,开始rebuild。又是漫长的等待。。。

zip-server:
      [zip] Building zip: F:\springsource-dm-server-sources-1.0.0.RELEASE\build-dm-server\target\artifacts\springsource-dm-server-1.0.0.BUILD-20081111115944.zip

dist:

BUILD SUCCESSFUL
Total time: 13 minutes 40 seconds

 这次终于ok了~~

 

点击查看原图:springsource_dm_server-startup.jpg

 

springsource_dm_server-Admin%20Console.jpg

 

困了。。。 先写到这里吧。

 

To be continued...

 

binary下载

鉴于从源码build不是很顺利,故这里提供build好的binary版本下载

springsource-dm-server-1.0.0.BUILD-20081111115944.zip   14.6 MB

SHA1 Checksum: e24ded0ca5a20e3e8e91fd991d3a51d610ee0e73

 

 

 

参考资料/相关文档

Documentation

Additional Resources

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值