Re: Modularized Spring Modules

2013-10-24 Thread Darren Shepherd
Yes avoid ComponentContext.inject() at all costs. It is really bad. The problem with ComponentContext.inject(), besides that it is a bad programming pattern, is that it doesn't know which spring context you are in. So ComponentContext.inject() will inject only beans that are defined in the "core"

Re: Modularized Spring Modules

2013-10-24 Thread SuichII, Christopher
Wow, this was really helpful! I was able to get my extension set up and thing seem to be injecting just fine. -- Chris Suich chris.su...@netapp.com NetApp Software Engineer Data Center Platforms – Cloud Solutions Citrix, Cisco & Red Hat On Oct 24, 2013, at 5:00 PM, Darren Shepherd wrote: > L

Re: Modularized Spring Modules

2013-10-24 Thread Darren Shepherd
Let me clarify some terms first, this might be confusing. There is instantiation and then there is initialization. Instantiation is calling the constructor. Initialization is calling the @PostConstruct. Beyond that there is what I've been calling "CloudStack Extended Lifecycle," This for bean

Re: Modularized Spring Modules

2013-10-24 Thread SuichII, Christopher
So, I kind of figured it out… In the past, I was creating my DataStoreLifeCycle with ComponentContext.inject() and it had some members which were @Injecte(d) - those were the guys that were failing to be instantiated. When I switched to simply @Inject my DataStoreLifeCycle into my DataStoreProv

Modularized Spring Modules

2013-10-24 Thread SuichII, Christopher
Darren, I’m switching my plugin over to use the new modularized Spring stuff you just merged and there is something I’m still battling with. I have other beans that were previously instantiated before my DataStoreProvider which get injected into the provider, lifecycle, etc. So, those beans nee