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