Spring 2.0's JMS Improvements

Engineering | Ben Hale | April 09, 2006 | ...

With the release of Spring 1.1 the Spring community was given it’s first taste of JMS support. This support included exception translation, message conversion, and a template class much like JdbcTemplate. This support also took care of domain unification between the JMS 1.0.2 and 1.1 specs. The centerpieces of this support are the JmsTemplate class and it’s JMS 1.0.2 counterpart JmsTemplate102.

This support was a great improvement over using the raw JMS APIs to do enterprise messaging. However it did have a shortcoming; the JmsTemplate only supported synchronous reception of messages using the JmsTemplate.receive() methods. This behavior worked well for many people but the vast majority of users of ended up rolling their own implementations of an asynchronous consumer. In short, they wanted what EJB 2 called Message Driven Beans

Another Reason to Love Spring 2.0: Interceptor Combining

Engineering | Ben Hale | April 09, 2006 | ...

Recently I was working on a project that had a Swing client communicating via RMI to a service layer. The service layer was marked with transactions and everything seemed to work fine. However everytime we'd get an exception at the Hibernate DAO layer, Spring would turn the exception into a runtime exception and it would get propagated all the way up the stack and across the RMI connection as a RemoteException. Whenever the exception was deserialized there would be an exception on the client (separate from the RemoteException.The decision was taken to simply introduce an aspect. Any exception…

POJO Aspects in Spring 2.0: A Simple Example

Engineering | Mark Fisher | March 22, 2006 | ...

While the material in this post is quite simple, it will actually offer a glimpse of some rather significant new features in Spring 2.0. I hope that with a little imagination, you will be able to apply what you see here to far less trivial use cases of your own.

I am going to show 2 examples actually. The first will use a rather simple logger:


package example;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

public class SimpleLogger {

  private static Log log = LogFactory.getLog(SimpleLogger.class);

  public void logOneString(String s) {
    log.info…

Inaugural Sydney Spring User Group Meeting

Engineering | Ben Alex | February 24, 2006 | ...

Over 200 people registered to attend the inaugural Sydney Spring User Group meeting, which was held on 22 February 2006. As shown by the photos (below), there was standing room only, and several attendees flew in from interstate for the evening.

With one-third of those attending indicating they do not presently use Spring, Rod Johnson's “Introduction to Spring” presentation was well-received and motivated many questions. The planned “Spring 2.0 and Beyond” talk – which undoubtedly will be of keen interest to those who are currently using Spring – was rescheduled until the next meeting.

Two…

Method Injection

Engineering | Rod Johnson | August 06, 2004 | ...

A couple of months ago, in the days before I had a blog, there was a discussion by Cedric and Bob about "Getter Injection."

The basic concept is that the IoC container can override abstract or concrete methods on managed objects on deployment. The container is injecting a method, such as a getter method, rather than a reference or primitive as in Setter Injection. As it happened, I was already working on a container method override mechanism for Spring 1.1, which has since been released in Spring 1.1 RC1. It's an interesting concept, and definitely part of a complete IoC container. However, I…

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