mraible wrote:
> 
> On Wed, Aug 6, 2008 at 3:33 AM, Martin Homik <[EMAIL PROTECTED]> wrote:
>>
>> Injection of beans outside Spring does not work, that's clear. But I was
>> surprised to learn that it is not possible to inject beans in
>> *ManagerImpl
>> and *Action classes. Am I completely wrong?
> 
> Yes, you are wrong. ;-) This should work.
> 

Good to know.


mraible wrote:
> 
>> In my app, I have a competency action class which is in charge of putting
>> a
>> competency's names on the valueStack. The retrieval is done via a
>> NameManager instead of a CompetencyManager. However, while it is possible
>> to
>> inject the CompetencyManager in CompetencyAction, the NameManager is not
>> set
>> all. I've checked my Name* classes and everything seems to be fine. Also,
>> my
>> applicationContext.properties looks correct. All NameDao tests and
>> NameManager tests go through, but the CompetencyAction tests throw a
>> NullPointerException as the nameManager has not been set/injected.
> 
> Do you have a setNameManager method and is your Action in the
> packageName specified in web.xml for Zero Configuration?
> 
> http://struts.apache.org/2.0.9/docs/zero-configuration.html
> 

Things, I have learned.
1. *ActionTest classes inherit the appplication context from
BaseActionTestCase.
    => Managers need a programmatical wiring in *ActionTest classes.
         That was missing in my case.
2. Once more, for some reason, dependency injection in *ActionClasses works
again
    when run in jetty. Either I do something wrong, or something behaves
non-deterministically.

Martin
 
-- 
View this message in context: 
http://www.nabble.com/No-injection-of-beans-into-Manager-Action-classes--tp18847481s2369p18868401.html
Sent from the AppFuse - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to