
Exploring Roo's Architecture
Last month we discovered how easy it is to build a fully-fledged enterprise application in just a few minutes using Spring Roo – our new productivity tool for Java developers. While many Java developers have already started evaluating Roo to help save time on their projects, I've received a lot of questions from people curious [...]

Proxies in OSGi
Over the past couple of months, we've had a number of customers report issues to us regarding
ClassNotFoundException
s and proxies in dm Server. The issue actually has to do with type visibility in OSGi and is explained very well by Peter Kriens over at the OSGi Alliance Blog. Please take a look at his [...]

Spring 2.5's Comprehensive Annotation Support
One of the central themes behind Spring 2.5 is comprehensive annotation-based configuration. We've been talking and blogging a lot about @Autowired, about Spring MVC's @RequestMapping and also about the new support for annotated tests written with JUnit4 or TestNG. @Autowired is certainly the central one of Spring 2.5's annotations, being available for use in service [...]

New Improvements in Domain Object Dependency Injection Feature
Spring's dependency injection (DI) mechanism allows configuring beans defined in application context. What if you want to extend the same idea to non-beans? Spring's support for domain object DI utilizes AspectJ weaving to extend DI to any object, even if it is created by, say, a web or an ORM framework. This enables creating domain [...]

The new bean() pointcut
Spring 2.5 features a new pointcut designator — bean() that allows selecting join points in beans with a matching name pattern. Now it is possible to use the auto-proxy mechanism along with Spring-AspectJ integration to select a specific bean even when there are more than one beans of a type. Earlier, you could use BeanNameAutoProxyCreator [...]

Source for demos shown at NL-JUG session June 13th 2007
Yesterday, Joris and I gave a session at the Dutch Java Users Group. We did the session twice and had about 250 people in total attending the sessions. A lot of people asked for the code for the demos we did during the sessions. Attached you'll find the code for the AOP and Dependency Injection [...]

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 bit [...]

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 a repository (a.k.a. Data Access [...]

AOP Context Binding With Named Pointcuts
There a a ton of new features in Spring AOP including the AspectJ pointcut language, the <aop:*/> namespace, and the @AspectJ syntax support. But by far one of the most powerful aspects (forgive the pun) is the AOP context binding.
For example, let's say you want to advise a method that takes a String as [...]

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 [...]