13.12.05

[JP] Day 2 - Spring Middle Tier and Spring 2.0

Jürgen Höller and Rob Harrop did the best presentation so far about hot topics in Spring's Middle Tier Services and the upcoming Spring 2.0 release.
XML-Configuration
Introduces XML-Schema and new Custom tags, with the following advantages:
- Easier to write
- Easier to read
- Better tool support (Schema-validation is far more powerful than a DTD)
Here came a quick demo showing the validation/code-assist possible with Schema, so one easily knows which fields are required and where only certain enumeration values or boolean values can be filled in. With the simple DTD-Validation there is no tool support for this.

The new techniques are fully backward compatible, you can even mix both styles in one configuration file and this will be how most apps will look like.
The old style is the generic configuration and the new custom tags are for rather specific problems.
So the custom tags aims not at simplifying your application configuration regaring your beands/application dependencies, but rather at infrastructure tasks (JNDI, AOP, Transactions, ...) and 3rd party packages (like Acegi Security).

The custom tags shiped in Spring 2.0 M1 will be:
- jndi:lookup
- util:properties
- aop:*
- tx:*

For the final Spring 2.0 Release which is planned for March 2006 the team plans to add more:
- Maps, List, Sets
- JMX
- Remoting
- Scheduling
- MVC

If you plan to extend the custom tags you must implement the NamespaceHandler Interface and provide this implementation within a jar, describing in META-INF/spring.handlers your implementation.
Spring takes care of the rest.

That was the news about the upcoming simplifications in Spring 2.0.

Next topic was Spring AOP and the fruits of having the AspectJ-lead Adrian Coyler now working for Interface21 (the company behind Spring).
AspectJ will be closer integrated into Spring's AOP framework, not only making Spring AOP more powerful but also easing transition between the two.
So the AspectJ expression language is now available in Spring.
Via a @SpringConfigured annotation it should be possible to Dependency Inject any object via AspectJ

In the next section about transactions Jürgen and Rob gave us plenty of demos and examples. It really looks great how the namespaces simplifiy the configuration.

Scheduling Support in Spring 2.0 was one of the things I was personally interessted since we use this feature of Spring already a lot. So here are the news:
- Support for new JDK 5.0 Scheduling Services
- Support for CommonJ TimerManager
- New Interface TaskExecutor with void execute(Runnable task)

Ok, so you might wonder what CommonJ is, just like I did, so here is the explanation:
CommonJ is spezification by BEA and IBM, currently supported by WebLogic Server 9 and WebSphere 6. This way allows a partly vendor indiependent way of solving something.
CommonJ provides a WorkManager which is configured via an administration console and made available to applications as a JNDI-Ressource.
It solves the problem in Application Servers where direct thread-creation is not allowed due to the spec, but nowhere the spec provides access to the functionality of Tasks/Threads and scheduling.

Spring provides default implementations of this interface and the TaskExecutor is also used within Spring:
- for execution of apßplication event listener
- for asynchronous JMS-Message processing

Spring is able to delegate the ThreadManagement of a QuartzScheduler to a CommonJ WorkManager, which enables App.Server compliance scheduling with quartz.

The last section was JMS where they went it a lot great of detail which was far to much to cover here.

Summary
Spring 2.0 looks realy, realy great only from the middle tier side and I guess there will be plenty of other great things in the web tier as well.
The only drawback I see at Spring 2.0: Final Release is scheduled for March 2006. Soooo late! Hello Sun/IBM/"put big company here" you should have scheduled this for March 1996!!!!
The Spring team is clearly my winner of the award: "Best/Smartest Java-Team EVER"
(I just hope Erich Gamma and Kent Beck do not read this, since they are right behind on second place :))

Posted by Karsten at 13.12.05 19:45 | TrackBack
Comments
Post a comment









Remember personal info?