cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Felix Knecht <fe...@otego.com>
Subject Re: Restructuring directory structure[was [Vote] Block artifact directory structure]
Date Mon, 06 Nov 2006 13:32:53 GMT
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Leszek Gawron schrieb:
> Leszek Gawron wrote:
>> Felix Knecht wrote:
>>> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
>>>
>>> Giacomo Pati schrieb:
>>>>
>>>> Leszek Gawron wrote:
>>>>> with cocoon modes enabled for spring you can do something
>>>>> like this:
>>> I always get the error: Embedded error: Cannot invoke listener
>>> org.springframework.web.context.ContextLoaderListener@ef2e7c No
>>> bean named 'myDao' is defined
>>>
>>> Putting the 'myDao' bean definition into the myContext.xml it
>>> works. Maybe I need to enable cocoon modes for spring, but
>>> where do I enable cocoon modes for spring?
>>
>> Let me test that...
> This is another question to Carsten (SettingsElementParser):
>
>> public BeanDefinition parse(Element element, ParserContext
>> parserContext) { final String springConfigLocation =
>> this.getAttributeValue(element, "location",
>> Constants.DEFAULT_SPRING_CONFIGURATION_LOCATION);
>>
>> // create bean definition for settings object final String
>> componentClassName = this.getAttributeValue(element,
>> PROCESSOR_CLASS_NAME_ATTR,
>> SettingsBeanFactoryPostProcessor.class.getName()); final
>> RootBeanDefinition beanDef =
>> this.createBeanDefinition(componentClassName, "init", false); //
>> if running mode is specified add it as a property final String
>> runningMode = this.getAttributeValue(element, RUNNING_MODE_ATTR,
>> null); if (runningMode != null) {
>> beanDef.getPropertyValues().addPropertyValue("runningMode",
>> runningMode); }
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ This
> code does not take into consideration the fact that cocoon running
> mode may be passed using system property

Attached path.txt will take consideration of this fact.

>
>> // register settings bean this.register(beanDef, Settings.ROLE,
>> parserContext.getRegistry());
>>
>> // register a PropertyPlaceholderConfigurer
>> this.registerPropertyOverrideConfigurer(parserContext,
>> springConfigLocation);
>>
>> // add the servlet context as a bean
>> this.addComponent(ServletContextFactoryBean.class.getName(),
>> ServletContext.class.getName(), null, false,
>> parserContext.getRegistry());
>>
>> // handle includes try { this.handleBeanInclude(parserContext,
>> null, Constants.DEFAULT_SPRING_CONFIGURATION_LOCATION, "*.xml",
>> true); this.handleBeanInclude(parserContext, null,
>> Constants.DEFAULT_SPRING_CONFIGURATION_LOCATION + "/" +
>> runningMode, "*.xml", true);
>
> when running mode is set with system property the runningMode
> variable is null here.
>
>> } catch (Exception e) { throw new
>> BeanDefinitionStoreException("Unable to read spring
>> configurations from " +
>> Constants.DEFAULT_SPRING_CONFIGURATION_LOCATION, e); } return
>> null; }
>

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFTzmF2lZVCB08qHERAvx6AKChw/2wHZw8UFIJWBhbrhHOwXF7CACdGGrI
4hf6llnM16ZDlKROdeN1cgs=
=uyI8
-----END PGP SIGNATURE-----


Mime
View raw message