JavaPolis: Spring Business Tier

Today there are a lot of interesting sessions here at Javapolis. I decided to go to the Spring Business Tier presentation. I haven’t used Spring in a project yet, so this seemed like a good presentation to see what Spring has to offer. In combination with the other Spring presentation this afternoon on the web tier i should get a good overview of the Spring framework. This was not the right presentation for this though, as Juergen Hoeller and Rob Harrop mostly explained the new features of Spring 2.0.

First the new configuration of Spring 2.0 was explained. Spring now uses xml schemas for configuration, which means that it will be a lot easier to write configuration files, as most IDEs will provide you with code completion and list of values. The main four schema’s available are for jndi, utilities, aspects and transactions. It’s definitely a lot easier than just using bean and property elements in your xml configuration file.

Aspects were discussed next. The biggest improvement is that you can now use AspectJ compatible aspect annotations. You can actually decide that at run time some aspects need to be handled by Spring and some others need to be handled by AspectJ. Next up, the configuration for transaction management. Also a lot easier because of the xml schema.

Next scheduling was presented. Scheduling has been a part of Spring since version 1.0. You can either use JDK Timers or Quartz for scheduling, quartz being the more powerfull, as it has cron like capabilities. In version 2.0 the TaskExecutor abstration has been introducted, and you have even more choice about the actual implementation. The combination with CommonJ is nice. Spring allows you to use Quartz combined with CommonJs WorkManager, which means that you won’t be creating threads in the application server. You will be using application server managed threads, as actually required by the j2ee spec.

The next topic was JMS, but i didn’t sit this one out. I’m a bit disappointed that they didn’t discuss JMX and ORM in Spring, as this was announced in the Javapolis Agenda. I left to go see the Dali presentation. More on that later.