struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Don Brown <>
Subject Re: No mapping found for dependency
Date Thu, 28 Dec 2006 23:18:11 GMT
Ted Husted wrote:
> On 12/19/06, Don Brown <> wrote:
>> Ok, the problem here is a misunderstanding how the configuration
>> providers work.  A configuration provider creates packageconfigs
>> populated with the appropriate information.  Once all configuration
>> providers have provided their packages, the configuration instance
>> will create the runtime configuration, which is a processed version of
>> the packages and their action configs.
>> The method configuration provider tries to access the runtime
>> configuration when it is still in the stage of collecting new packages
>> and actions.  Currently, there is no way to inject logic between the
>> Configuration object being populated with packages and the building of
>> the runtime configuration.  One option could be to create our own
>> Configuration subclass, which may perform this additional processing
>> of actionconfigs before the runtime config is built.  In fact, I would
>> think this new process would be part of the runtime config processing.
>>  Perhaps the patch should go in xwork 2's DefaultConfiguration object.>
>> In summary, what you want can't be done in a configuration provider.
>> We need to look at the configuration object itself.
> Is the Configuration object going to have access to the Struts 
> ObjectFactory?
> The processing needs to inspect whatever classes are being used as
> Actions, which could include injected classes.
Right, but there is no way to iterate over the Actions unless you have 
access to the full Configuration object, which hasn't been built yet by 
the time a configuration provider gets it.
> Is the suggestion that there be an "event" or "hook" method between
> collection of the configuration elements and finalizing the runtime
> configuration that a subclass could override or extend?
Yes, perhaps a configuration provider gets a whack at the actionconfig 
before the runtime configuration is fully built.  I'll look into this, 
as I'd like it for another little improvement I have in mind.

> -Ted.
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message