Archive for the IOC Container category

Alef Arendsen

ASM version incompatibilities, using Spring @Autowired with Hibernate

I was working on Spring 2.1 stuff this week with Joris. We were preparing a sample using all three ways of doing dependency injection. The sample does not only highlight dependency injection, but also features a back-end based on Hibernate. Several features in Spring 2.1 require the ASM byte code manipulation framework. Hibernate also uses Read more…

Costin Leau

More on Java Configuration

As most of you already know by now, Spring is not just about XML as lately, a number of 'official' extensions to the core offer alternatives way for configuring the container. Spring Java Configuration 1.0 M2 was among the products released around JavaOne and, while still marked as a milestone, had an important number of Read more…

Mark Fisher

Customizing Annotation Configuration and Component Detection in Spring 2.1

NOTE: This post has been updated as of May 31, 2007 to reflect the state of the 2.1-M2 official release Two weeks ago I blogged about the new annotation-driven dependency injection capabilities of Spring 2.1, and I mentioned that I would follow-up with more info "later in the week". It turns out that was a Read more…

Mark Fisher

Annotation-Driven Dependency Injection in Spring 2.1

Spring 2.0 introduced annotation support and annotation-aware configuration options that can be leveraged by Spring users who are developing with Java 5 (or later versions): @Transactional for demarcating and configuring transaction definitions @Aspect (AspectJ) for defining aspects along with @Pointcut definitions and advice (@Before, @After, @Around) @Repository for indicating a class that is operating as Read more…

Ben Hale

Spring Web Flow Bean Scopes and JSF

I've recently finished up an interesting issue in Spring Web Flow. This issue (SWF-163) dealt with adding Spring 2.0 bean scoping support for Spring Web Flow's internal scopes. The implementation isn't really that interesting (the Scope interface is pretty easy to implement after all), but I wanted to mention exactly how you would use something Read more…

Costin Leau

So what's the deal with Spring-OSGi?

Welcome to my blog! This is my first entry…ever. I manage to resist the urge of blogging but since so many people encouraged me to write about what I do at i21 I decided to give it a go. This and the fact that the Spring-OSGi had its first release yesterday evening (EET time zone). Read more…

Alef Arendsen

CarPlant not accepting null CarModels

Last Friday I finished a training session at a client of ours. Because I had some time to kill in the hotel I was staying in, I polished the sample application I coded up during the training to post it online for the guys of the training. Usually I try to find a little sample Read more…

Rod Johnson

A Java configuration option for Spring

Thanks to our philosophy of pluggability and a lot of hard work in the implementation, the Spring IoC container (like most of the rest of Spring) is extremely flexible. One point that is often missed is that Spring configuration need not be in XML, although the XML format is by far the most commonly used. Read more…

Rod Johnson

XML Syntax Sugar in Spring 2.0

If you've followed October's Spring 2.0 release, you will know that one of the big new features was XML extension name spaces: the ability to define new XML elements and attributes that generate Spring metadata, and can be used alongside regular bean definitions. This provides a valuable new extension point and makes Spring configuration both Read more…

Ben Hale

Creating a Spring 2.0 namespace? Use Spring's AbstractBeanDefintionParser hierarchy.

Lately it seems like I've been focusing on creating Spring XML namespaces. It's been a lot of trial and error (both on the XSD and Spring side) to get a good pattern for creating parsers. One of the biggest confusions that I ran into was the AbstractBeanDefinitionParser hierarchy. At this point it isn't documented especially Read more…