11

I want to write a simple Java Desktop Application using Java Swing. Usually I use Spring Framework to do the dependency injection and build the whole class structure. However, I've seen that CDI is becoming more and more popular and want to give it a try.

I would like to do the Dependency Injection of my project using CDI, but I don't know if this is possible without a Servlet container (as it is using Spring). Every single tutorial seems to be related with servlet containers or application servers.

Aritz
  • 30,971
  • 16
  • 136
  • 217
  • Searching for "CDI without container" directly revealed some very interesting articles for your topic. – Seelenvirtuose Aug 01 '13 at 09:28
  • Not for me @Seelenvirtuose can you give any reference? – Aritz Aug 01 '13 at 09:31
  • First hit was [Bootstrapping CDI](http://antoniogoncalves.org/2011/01/12/bootstrapping-cdi-in-several-environments/). Second hit was [Control CDI containers](http://struberg.wordpress.com/2012/03/17/controlling-cdi-containers-in-se-and-ee/). Maybe these links help you. – Seelenvirtuose Aug 01 '13 at 10:26

0 Answers0