Spring.NET 1.2.0 RC1 发布

发布 | Mark Pollack | October 16, 2008 | ...

我们很高兴宣布 Spring .NET 1.2.0 RC1 已发布。
下载 | 支持 | 文档 | 更新日志
此版本包含以下特性

  • WCF 集成 - 使用依赖注入配置 WCF 服务。将 AOP 通知应用于 WCF 服务。
  • MSMQ 集成 - MSMQ 助手类可提高您开发消息应用程序的生产力。提供与 Spring 事务管理特性的集成。
  • Apache ActiveMQ 集成 - 使用 ActiveMQ 开发消息应用程序的助手类,可提高您的生产力
  • Quartz 集成 - 使用依赖注入配置 Quartz 作业、调度器、触发器。用于实现 Quartz 作业的便利类,并提供与 Spring 事务管理特性的集成。
  • AOP 新的基于继承的 AOP 代理生成。
  • WebForm 依赖注入的性能改进。
  • 支持 NHibernate 2.0.1。

1.2.0 RC1 中的其他值得注意的新特性

对 TIBCO EMS、Websphere MQ 和 Progress SonicMQ 的支持将以商业形式提供。 请联系 销售部门 获取更多信息。

请参阅更新日志获取更多详细信息。

尽情享受!

Spring Batch 2.0.0.M2 发布

发布 | Dave Syer | October 15, 2008 | ...

Spring Batch 2.0.0.M2 现已可用。请查看 Spring Batch 下载页面 获取更多信息 - 提供常规的 .zip 下载以及 S3 中的 Maven Artifacts。

此版本的大部分工作集中在面向分块的处理方法,这意味着对 ItemReader 和 ItemWriter 接口进行了更改,并引入了 ItemProcessor 作为在输入项和输出项之间转换的顶级关注点。面向分块的处理是实现性能和可扩展性的关键推动因素,并且在扩展点和接口方面对用户来说更加清晰(不再是框架……

优化和调优 Apache Tomcat - 第二部分

工程 | Mark Thomas | October 14, 2008 | ...

几周前,Filip Hanik 和我举办了关于优化和调优 Apache Tomcat 的系列网络研讨会中的第二场。可以从 SpringSource 网站的网络研讨会部分获取网络研讨会录音和幻灯片副本。同一页面提供了之前所有 SpringSource 网络研讨会的链接,以及 Covalent 网络研讨会存档的链接。

在问答环节中,我们未能回答所有问题,因此,正如承诺的那样,以下是剩余问题和我们的答案。

  • 如何识别 Tomcat 应用程序中的内存泄漏?

    您几乎肯定需要使用分析器来识别内存泄漏的根本原因。最新的 Sun JDK 包含jhat 和 jmap 等工具。还有许多其他分析器可用,包括免费的和商业的。Filip 和我在调查 Tomcat 内存泄漏时使用 YourKit,因为 YourKit 为开源开发者提供免费许可证。

  • 重新部署如何会导致内存泄漏?

    这种情况通常发生在 Tomcat 加载的类保留了对 Web 应用程序加载的类的引用时。当 Web 应用程序停止时,Tomcat 类加载器仍然保留了对 Web 应用程序加载的类的引用。这个类又保留了对 Web 应用程序类加载器的引用,而该类加载器反过来又保留了对其加载的所有类的引用。因此,Web 应用程序类加载器及其加载的所有类都不符合垃圾回收的条件。这导致了内存泄漏。这种情况的典型根本原因是 JDBC 驱动程序和日志框架。

  • 更改 Tomcat 使用的 JVM 的最佳方法是什么?

    要使用的 JVM 是通过 JAVA_HOME(完整 JDK)或 JRE_HOME(仅 JRE)环境变量设置的。设置此变量的正确位置取决于您的环境,特别是如果 Tomcat 配置为在系统启动时自动启动。如果您可以自由选择设置位置,则根据您的操作系统使用 setenv.bat 或 setenv.sh。

  • 您推荐特定的 JVM 吗?

    不,我们不推荐。您选择的 JVM 供应商取决于您的操作系统。

  • 连接 Apache httpd 和 Tomcat 应该使用哪种连接器?

    我们推荐 mod_proxy_http,mod_jk 次之。通常,mod_proxy_ajp 不如 mod_proxy_http 或 mod_jk 稳定。请注意,mod_jk2 已被弃用,不应再使用。

  • 使用 SSL 时,maxKeepAliveRequests 的正确设置是什么?

    使用 SSL 时,应启用 HTTP keep alive,因为 SSL 握手对于每个请求来说都是相对昂贵的操作。

  • 如果在 Solaris 上运行 Tomcat,您建议不要使用原生的 APR 连接器吗?

    是的,我们不推荐。我们从客户那里收到的反馈是 APR 连接器在 Solaris 上不稳定。

  • 我们之前尝试在 Solaris 上切换到 mod_proxy_http,但遇到了一些错误。这些错误已经解决了吗?

    不知道您遇到的具体错误或使用的版本,很难评论。所有已知的 Apache httpd 问题和当前状态可以在 ASF Bugzilla 数据库中找到。Tomcat 问题也可以在 Bugzilla 中找到。

  • 配合默认的阻塞 IO HTTP 连接器,maxKeepAliveRequests 应该使用什么值?

    对于高并发环境,将其设置为 1。否则,将其设置为页面上的平均对象数量,通常在 10 到 100 之间。

  • 如何配置 JkOptions +DisableReuse?

    JkOptions +DisableReuse 应放置在您的 httpd.conf 文件中,与您的其他 mod_jk 设置一起。

  • 何时最适合使用非阻塞 IO HTTP 连接器?

    当您需要支持高并发并启用 keep alive,且 APR 不是一个选项时,例如因为它在您的平台上不稳定。

  • 如果在 Apache Tomcat 前面使用 Apache httpd,性能会更好吗?

    这取决于具体情况。如果您将所有请求代理到 Tomcat,那么性能会略微下降。如果 httpd 处理部分请求(例如所有静态内容),那么您可能会看到一些好处。有许多基准测试试图证明某个连接器比另一个更好。然而,这些基准测试很可能无法代表您的应用程序。唯一确定的方法是在您的环境中,使用真实的负载和使用模式进行测试。

  • Tomcat 可以在前面没有 Web 服务器的情况下在生产环境中使用吗?

    是的。这是否为您的环境提供了最佳性能将取决于该环境和您的应用程序。正如前一个问题一样,唯一确定的方法是在您的环境中,使用真实的负载和使用模式进行测试。

  • 在 Tomcat 前面使用 Apache httpd 会增加安全性吗?

    您安装的安全性取决于许多因素。使用或不使用 Apache httpd 不太可能显著改变您安装的安全性。其他因素,例如及时更新补丁和使用防火墙,通常对您的整体安全水平有更大的影响。

  • 哪种 Apache httpd MPM 提供最佳性能?

    一如既往,这取决于您的环境,但 httpd 性能调优文档提供了一些有用的通用指导。

  • SpringSource ERS 和 Apache Tomcat 之间的性能差异是什么?

    SpringSource ERS 不仅仅是 Apache Tomcat。从纯 Tomcat 的角度来看,性能并不是区分因素。ERS 的优势在于安装简单、易于管理的升级和补丁、支持多个实例以及所有组件的集成。

  • 我的公司使用 Tomcat 和 XYZ 应用服务器。Tomcat 与 XYZ 应用服务器相比如何,以及整合是否有好处?

    会有许多差异,而重要的差异会因组织而异。首先确定您对应用服务器的需求,然后将其与市场上的产品进行比较。整合是有好处的。更高的一致性意味着更简单的维护、更少的培训等等。然而,也有成本。您需要审视您的组织以及它计划如何进行整合(仅新项目、下一次主要发布的所有项目、现在全部整合等),以便将成本与相关好处进行比较。

  • 是否有针对 Tomcat 和 XYZ 应用服务器的性能比较?

    在此领域已发布了各种报告。结果的有用性取决于测试与您的负载匹配程度。一如既往,唯一确定的方法是在您的环境中,使用真实的负载和使用模式进行测试。

  • 对 Tomcat 服务器进行负载测试的好方法是什么?

    有一些可用的选项,包括免费和商业的负载生成工具。免费工具包括 abJMeter

  • 为了高可用性和性能,可以将 Tomcat 配置为针对同一个 Web 应用程序启动多个 JVM 吗?

    Tomcat 不提供此配置选项。当然,您可以创建多个 Tomcat 实例,在每个实例上安装您的应用程序,然后在这些实例之间进行负载均衡。

  • 是否有针对 Tomcat 的通用健康检查脚本?

    Manager 状态页面可能是一个不错的起点。如果需要,您可以使用该 Servlet 的代码作为基础,进行更具体/更全面的检查。如果您进行了改进,请考虑将您的改进贡献回 Apache Tomcat 社区。

  • logging.properties 文件位于何处?

    默认位置是 $CATALINA_BASE/conf。

平衡的问题:调整维护策略

工程 | Rod Johnson | October 07, 2008 | ...

经营一家企业至少在一点上就像写代码:你不会总是一次就做对,即使你知道自己想要实现什么——但如果你愿意在必要时重做,最终会得到更好的结果。在 SpringSource,我们对最近宣布的维护策略有一个清晰的愿景:平衡开源社区、企业用户以及 Spring 创建者的需求,从而使所有人受益。然而,我们第一次没有完全达到平衡,现在是进行一些重构的时候了。

在过去的几周里,我……

Common Service Locator 库

工程 | Mark Pollack | October 03, 2008 | ...

CommonServiceLocator 项目本周在 CodePlex 上发布了,其主要思想是提供一个独立于 IoC 容器的 API,用于使用 Service Location 解析依赖项。来自 SpringSource 的 Erich Eichinger 贡献了 Spring.NET 的实现,谢谢 Erich!

API 如下,以便您了解基本思想 public interface IServiceLocator : System.IServiceProvider {

object GetInstance(Type serviceType); object GetInstance(Type serviceType, string key); IEnumerable GetAllInstances(Type serviceType); TService GetInstance(); TService GetInstance(string key); IEnumerable GetAllInstances(); } …

Spring Security 2.0.4 Released

Releases | Luke Taylor | October 02, 2008 | ...

We're pleased to an announce the release of Spring Security 2.0.4.

This release contains minor bugfixes and improvements. There are also some changes to the security namespace so you should update to the new 2.0.4 schema file if necessary. There are also some documentation updates, including two new reference appendices in the manual - one describing the database schema used within Spring Security and one describing the elements and attributes in the namespace and how they map to underlying implementation classes.

Download | Changelog | Reference Manual | Web Site

SpringSource dm Server 1.0.0 reaches GA

Engineering | Peter Cooper-Ellis | September 30, 2008 | ...

You may have noticed that SpringSource announced the general availability of the SpringSource dm Server™ today. The dm Server is part of the SpringSource Application Platform. Since this is the first time out for the dm Server, I want to make a couple of short comments about the product.

We believe that the dm Server overall will change the way enterprise Java software is developed and deployed. In particular, the dm Server is designed from the ground up, to be lightweight (the dm Kernel has a footprint of about 3 megabytes), flexible, and fast. It is also designed to facilitate modular…

SpringSource Seminar Day Linz in Review

Engineering | Juergen Hoeller | September 23, 2008 | ...

A brief pictorial review of the SpringSource Seminar Day in Linz, having happened on September 8th, 2008, at the Bergschloessl Linz... More than 150 people were listening to a six-pack of presentations about what's new and upcoming at SpringSource. The "Story of Spring" keynote by Rod Johnson and Adrian Colyer was a great start into a day full of information: about the SpringSource Application Platform, the SpringSource Tool Suite, Spring 3.0, etc. (See the original blog announcement for details on the agenda.)

It was a pleasure to see so many people attending: from Austria as well as from Germany and Eastern Europe - and even from Norway! I hope you enjoyed the seminar and your stay in Upper Austria. Looking forward to seeing you again at the SpringOne Europe 2009 conference in Amsterdam, April 27-29... as well as at upcoming EJUG Austria

SpringSource (and other top vendors) leading the OSGi charge

Engineering | Adrian Colyer | September 17, 2008 | ...

In a press release made available by the OSGi Alliance yesterday, several leading vendors including SpringSource, IBM, Oracle, RedHat, Sun, SAP, ProSyst, and Paremus joined forces in their support of OSGi as the foundation for next generation server platforms.

To highlight some of the key points:

Craig Hayman, VP IBM WebSphere said

[IBM] has been shipping WebSphere Application Server built on OSGi since 2006. As a result, IBM clients benefit from a modular platform built with proven components and the ability to automatically use only the components required by their application.
Steven G. Harris, SVP of Development at Oracle said
Oracle WebLogic Server is a great example of the customer benefits of modularization, with its reduced footprint, improved startup time, and flexible configuration options. OSGi technology provides the standards based foundation...
Sacha Labourey, VP of Engineering for RedHat's middleware business said
Running OSGi technology in JBoss Enterprise Middleware Solutions enables our customers to deliver safer services and applications in a more dynamic runtime environment.
Tom Kincaid, Executive Director of Application Platforms at Sun Microsystems said
Sun has seen strong demand for OSGi technology within the GlassFish community. The GlassFish community will be able to take advantage of the modularity and dynamic extensibility implemented via an OSGi-technology based microkernel in the upcoming GlassFish v3 Prelude Release.
What all of the vendors quoted in the release have in common, including SpringSource, is that they build their server platforms on top of OSGi. This has the potential to deliver a set of benefits to users of those platforms including more modular server structures with the ability to run in a smaller footprint and to dynamically alter server characteristics and capabilities.

You need to look a bit harder at the various vendor offerings to determine to what extent they have been able to realize those benefits for you as a user. At SpringSource you could say we were "lucky" in this respect. We had the good fortune to be able to design…

SpringSource dm Server 1.0 RC2 Released

Engineering | Rob Harrop | September 11, 2008 | ...

I'm happy to announce the availability of RC2 of the SpringSource dm Server, previously known as the SpringSource Application Platform. This release is feature complete and barring any serious issues will become 1.0 GA in two weeks time.

This release fixes a few critical bugs, upgrades to Tomcat 6.0.18 and updates all code, documentation and supporting materials to reflect the new name.

Due to the renaming of the product, PlatformOsgiBundleXmlWebApplicationContext has been renamed to ServerOsgiBundleXmlWebApplicationContext and moved from the com.springsource.platform.web.dm package to the com.springsource.server.web.dm package. Thus, if you are setting the contextClass for Spring MVC's ContextLoaderListener or DispatcherServlet in web.xml in a Shared Services WAR, be sure to change the fully qualified path to com.springsource.server.web.dm.ServerOsgiBundleXmlWebApplicationContext

Get the Spring newsletter

Stay connected with the Spring newsletter

Subscribe

Get ahead

VMware offers training and certification to turbo-charge your progress.

Learn more

Get support

Tanzu Spring offers support and binaries for OpenJDK™, Spring, and Apache Tomcat® in one simple subscription.

Learn more

Upcoming events

Check out all the upcoming events in the Spring community.

View all