Colin Sampaleanu's complete blog can be found at:

Items:   1 to 5 of 19   Next »

Sunday, September 17, 2006

Colin Sampaleanu

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):

<?xml version="1.0" encoding="UTF-8"?>
<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):

<?xml version="1.0" encoding="ISO-8859-1"?>
<!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

singleton

attribute to define bean scopes, to using the new

scope

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.


Tuesday, May 9, 2006

Basing your business around open-source is pretty tough sometimes, but it all becomes worth it when you get a private forum message like this:
“You guys are clowns for making me register to be able to browse your archives.
CLOWNS.” –AnnoyedInSF
Of course, this genius couldn’t figure out that in fact you don’t have to [...]

Monday, March 20, 2006

EclipseCon have graciously offered Spring Framework one of the 10 ‘pods’ in the open-source pavilion at EclipseCon 2006. The closest tie right now between Spring and Eclipse is probably the Spring-IDE plugin for Eclipse (also used as the basis for Spring support in MyEclipse IDE), but you can also expect to see some Spring integration [...]

Friday, February 17, 2006

I find it a little bit distressing how few Java developers understand that using JTA does not automatically get you XA/Two-Phase-Commit capabilities.
Here we’ve got Matt Raible, who really should know better, or at least should not be blogging about it, posting on Two Phase Commit in Tomcat with JOTM and Spring. Somebody flew out to [...]

Monday, January 16, 2006

I was reading Diego Parilla’s Spring is not designed for scalability, and simply had to respond. I actually first wrote a comment directly on his blog, but I guess he’s not going to allow the comment to be posted, as some other stuff has appeared but not mine, after a number of hours…
(Edited [...]

Items:   1 to 5 of 19   Next »