DI/IoC in Java for a .NET'er used to Castle.Windsor

Posted by Ciddan on Programmers See other posts from Programmers or by Ciddan
Published on 2012-03-29T08:25:13Z Indexed on 2012/03/29 11:42 UTC
Read the original article Hit count: 334

Filed under:
|

Is there a Java DI container that works in a similar way to the most excellent Castle.Windsor container on the .NET side?

The Java containers I've had a look at all seem to rely on annotations (Guice) within my services, which I don't dig all that much - I'd like to go POJO all the way if possible. Spring on the other hand can do without the annotations, but it requires a lot of XML. XML configuration != maintainability.

One of the really nice things about Castle.Windsor is the wiring you're able to set up in code with Installers, auto wiring based on naming conventions and whatnot.

Ideally the container should also support lifecycle management and configuration; i.e. registering components as transient, singleton, pooled etc.

Another bonus would be support for interceptors.

Any tips would be greatly appreciated.

© Programmers or respective owner

Related posts about java

Related posts about ioc