Spring 2.0 RC4 Released: Heads-up on DTD/Schema Renaming, Scope Attribute

Spring Framework 2.0 RC4 has been released. This is the last release candidate before Spring 2.0 final, and you may find out more about it from the release announcement itself as well as the JIRA issue list for a complete list of changes in this release.
Possibly the most important thing to watch out for is that this release introduces versioned file/location names for the 2.0 DTD and Schemas (XSDs). This was necessary since the XML bean definition format was significantly enahnced for 2.0, but 1.2.x users still need to be able to refer to the 1.2.8 DTD. Here is an example of using the 2.0 "beans" schema (2.0 ships with a number of other new schemas as well, representing various special namespaces):
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
<!– Define your beans here –>
</beans>
Here is an example of using the 2.0 DTD (there is only one DTD, you must switch to schema to get the various new namespaces):
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN 2.0//EN"
"http://www.springframework.org/dtd/spring-beans-2.0.dtd">
<beans>
<!– Define your beans here –>
</beans>
One important thing to watch out for: any existing 1.2.x bean definition file should continue to work as is, since it is pointing to the 1.2 DTD, and all functionality is still supported. To get new 2.0 functionality supported by the new 2.0 DTD or schemas, you need to update your definition files as per the above examples. You also must switch from using the
attribute to define bean scopes, to using the new
attribute instead. The old singleton and scope attributes overlap, and it was considered acceptable to remove the singleton attribute completely in the new DTD/schema definiitons, since the only people affected are people already changing their bean definition files to point to the new DTDs and schemas anyway. So if all you do is modify your existing bean definition files to point to the new DTD or schemas, without fixing up any use of singleton, you will get validation errors!
The new versioned DTD and schemas have been uploaded and are available online. While Spring itself finds the definitions within its own jar file (from the classpath) using an entity resolver, these definitions are needed online for XML Editors and other external users.
About Colin Sampaleanu
Colin is Director of R&D at SpringSource (now a division of VMware), which he co-founded in 2004. He is one of the original core committers on the Spring Framework, a published author, and public speaker. Since starting SpringSource he has served in a number of roles throughout various parts of the organization, including Engineering, Service Delivery, Support, and Sales. Colin is at his best when combining both technical as well as business and customer facing aspects.
Colin has had a long and varied career spanning 23 years in both the enterprise and shrinkwrap software space, including previous experience developing for and building out a retail software company.
Immediately prior to SpringSource, Colin spent 5 years as architect/chief architect at a leading software incubator and VC firm. Colin's role was split between one part hands on architecture, design, and coding, another part mentoring and teaching best practices at the code and process level, and a final part performing technical due diligence and consulting for the VC arm.
Throughout his career, Colin's experience, wide ranging interests and general knowledge in the technology space have led him to be a resource that others have been able to draw on for advice. In general, Colin's background has left him with a deep knowledge of all it takes to successfully release good software, at the code, process, and business level.
More About Colin »NFJS, the Magazine
December Issue Now AvailableBDD and REST
by Brian SlettenMocks and Stubs in Groovy Tests
by Kenneth KousenAlgorithms for Better Text Search Results
by John GriffinKnowns and Unknowns of Scrum and Agile
by Brian Tarbox