Debunking myths: proxies impact performance

Engineering | Alef Arendsen | July 19, 2007 | ...

In a recent blog entry Marc Logemann touches on the subject of proxy performance. In his entry he asks for a white paper by 'the Spring guys'. I don't want to spend (p)ages and (p)ages on discussing the differences up to the nanosecond between proxies and byte code weaving mechanisms, but I do think it's valuable to re-iterate once again what the differences are and whether or not this discussion matters at all.

What are proxies and why do we use them?

Let's first shortly revisit what proxies are used for (in general, and in Spring). According the Gang of Four (GoF) book on Design Patterns a proxy is a surrogate object or placeholder for another object to control access to it. Because the proxy sits in between the caller of an object and the real object itself, it can decide to prevent the real (or target) object from being invoked, or do something before the target object is invoked. prox.jpg

In other words, proxies can be used as stand-ins for real objects to apply extra behavior to those objects--be it security-related behavior, caching or maybe performance measurements…

Grails and Maven: a Marriage of Inconvenience

Engineering | Dave Syer | July 14, 2007 | ...

Introduction

Grails seems to be going from strength to strength, and it looks like it definitely "has legs", as they say. I am quite interested in stretching those legs a little outside the web application arena. If you are aware of my work on Spring Batch, you will probably be able to guess where that might take me. But for this article I wanted to just share some experiences I've had with the basic, low-level deployment and build of a Grails application.

I have a love/hate relationship with Maven 2, and I am learning to love Grails, but sadly the two do not play particularly well together. It would…

Setter injection versus constructor injection and the use of @Required

Engineering | Alef Arendsen | July 11, 2007 | ...

A couple of month ago, we start publishing polls on www.springframework.org asking people to provide their feedback about Spring, some of its features and how they are using those features. The first question I posted was whether or not people were checking required dependencies and if so, what mechanisms they used. I quickly followed up on this question asking the community what transaction management strategy it used.

To my delight when I first checked the results, back in March, a lot of people told us by voting in the first poll that they were using the @Required annotation. The second…

Java EE 6 Gets it Right

Engineering | Rod Johnson | July 03, 2007 | ...

The Java EE 6 proposal (JSR 316) was published today. I believe that this will be the most important revision of the platform since it was released nearly 10 years ago, and that it should be welcomed by users of the technology. Interface21 is happy to be a supporter of this JSR, and I am looking forward to contributing to it.

Java EE (known as J2EE for most of its history) has played a valuable role in creating a market for Java middleware. However, over those 10 years, important issues have emerged with the platform, such as:

  • The need for a Java EE compliant server to be bloated with a range of functionality that is of little interest to the vast majority of users
  • The fact that enterprise requirements have changed since J2EE was envisaged and that a "one size fits all model" is less and less appropriate
  • The fact that enterprise Java has been greatly strengthened by the emergence of frameworks (especially in open source) that make developers more productive and their production applications more efficient and maintainable
  • New challenges such as Ruby on Rails, and even .NET, showing that, in a time of rapid change and innovation, a cosy 2-3 year release cycle imperils the entire platform

Java EE 6 is an important revision of the platform that has the…

Is Open Source Dying? Case Not Proven

Engineering | Rod Johnson | June 29, 2007 | ...

Michael Hickins recently published a piece on eWeek entitled Is Open Source Dying? The title drew me in, and no doubt plenty of other folk too. But the article doesn't prove the case, although it contains some interesting points that merit discussion.

Most of the article concerns speculation about the experience of government with open source, and the motives of vendors such as IBM. I prefer to judge companies and individuals by their actions, rather than speculation about their motives, and there is plenty of evidence that IBM, for example, takes open source very seriously. There's plenty of…

Spring IDE 2.0 is Final

Releases | Christian Dupuis | June 27, 2007 | ...

After fixing approximately 250 bugs and working uncountable hours on adding support for Spring 2.0, Spring Web Flow, Spring AOP and Spring JavaConfig, we are proud to announce the immediate availability of Spring IDE 2.0.

Spring IDE 2.0 Logo

Download | Documentation | Changelog

The release is available from our release update site. Spring IDE 2.0 is licensed under the terms of the Eclipse Public License - v1.0.

New Features

Spring IDE 2.0 contains lots of new features and a bunch of bug fixes. A list of all closed tickets is available in our ticketing system. For those of you that are not familiar with recent development of Spring IDE here is a short list of features included:

  • Support for Spring 2.0 namespace-based configurations. We have put lots of work into that to make the support as extensible as possible. You can read more about that in another post.
  • Support for Spring Web Flow, including an extension to WTP’s XML editor for content assist and hyperlinking as well as validation and graphical editing. More information is available here.
  • Tools for Spring AOP based development. This includes support for validating configurations (parsing of pointcut expressions) and visualization of cross cutting references based on <aop:config> and @AspectJ-style aspects.
  • Support for Spring JavaConfig M2. This serves as sandbox for testing the extension points of Spring IDE’s core. Read more about that here and here.
  • Usability and UI improvements: A new Spring Explorer that replaces the Beans View, Content contribution to the Eclipse’s Project Explorer, a Spring Working Set type to reduce cluttering in the Project and Spring Explorer, Refactoring participants for rename and move refactorings of Java Packages and Classes as well as Bean names, New Project and Spring Bean configuration file wizard.

Spring IDE 2.0 is compatible with upcoming Eclipse 3.3 (aka Eclipse Europa).

Read more at the Spring IDE Blog.

So should you still use Spring's HibernateTemplate and/or JpaTemplate??

Engineering | Alef Arendsen | June 26, 2007 | ...

I was reading an article by Vigil Bose on TSS the other day and saw the usage of the HibernateDaoSupport class. Since this is no longer a recommended way of using Hibernate from Spring, I thought I might as well just blog about it another time.

With the advent of Spring 2.0, it has become possible to start using the Hibernate Session API directly again. The question is whether or not it is wise to abandon the use of the HibernateTemplate when working with Hibernate, or any other template-based approaches Spring features.

Using Spring XxxTemplates

In Spring 1.0, we introduced a revolutionary way of working with data access APIs that threw checked exceptions. The template approach Spring features along with its transaction synchronization manager and the extensive use of runtime exceptions makes any TCFTC (short for try/catch-finally-try/catch as we coined it back in 2005) often found in data access code entirely obsolete. Below you can see (a simplified version and not entirely precise version of) what Spring's template approach does for you (with specific code snippets that you would otherwise have to write). template.png

Acquisition of connection: If transaction synchronization is active…

Code samples from SpringOne 'Beyond the obvious' talk

Engineering | Joris Kuipers | June 25, 2007 | ...

Last week at SpringOne, Alef and I gave a talk on dealing with complex applications using Spring. Complexity in this case was considered both at the structural and dynamic level. As for the structural part of the talk, I covered that one in my previous blog posting. The dynamic part explained some possible solutions to deal with differences between your deployment environments. (testing, acceptance, production, etc.) A lot of people asked me if I could provide them with the source of the demonstrations I gave during the talk. I've attached the sources to this blog entry and will explain…

The Power of Batch

Engineering | Rob Harrop | June 23, 2007 | ...

In the last session of SpringOne yesterday, Dave Syer, Scott Wintermute, Lucas Ward and Wayne Lund all presented on Spring Batch. I didn't actually attend (since I had an early cab ride), but I stuck my head in and was yet again astounded by the amount of interest.

Back at JavaOne we had an immense amount of interest in this solution as well, with plenty of visitors calling by the booth to quiz us about batch.

It's all too easy in this world of Ajax and Rich Internet Applications to forget that a large number (a majority maybe?) of large scale enterprise applications are batch-oriented. Batch…

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