I guess I've found out why it isn't working.
This comment on [1]:
May be you are using BeanFactory, rather than ApplicationContext, which extends
BeanFactory? ApplicationContext will detect automatically
PropertyPlaceHolderConfigurer as one of itÂ’s beans, but BeanFactory will not.
And this part of ServerFactory.java [2]:
Resource beansResource =
m_factoryHelper.createBeansResource(SERVER_BEANS_TEMPLATE_LOCATION, context,
serverStructure.getBeansWorkLocation());
BeanFactory beanFactory = new XmlBeanFactory(beansResource,
m_container);
Is there some other way to include properties in the ServerManager?
With regards,
Nick Stolwijk
[1]
http://almaer.com/blog/spring-propertyplaceholderconfigurer-a-nice-clean-way-to-share
[2]
https://svn.hippocms.org/repos/hippo/hippo-components/server-manager/trunk/src/java/nl/hippo/servermanager/ServerFactory.java
-----Original Message-----
From: [EMAIL PROTECTED] on behalf of [EMAIL PROTECTED]
Sent: Mon 1/14/2008 4:11 PM
To: [email protected]
Subject: [HippoCMS-dev] Reading domain name in sampleDomains.xml fromproperty
file
Hi folks,
I'm trying to run the CMS on JBoss and now I'm having the requirement to keep
properties outside of the jar file. Is it possible to read in the domain name
in de sampleDomain.xml from a property file.
I already tried adding a PropertyPlaceholderConfigurer to sampleDomains.xml but
it doesn't seem to work.
I've added:
<bean id="placeholderConfig"
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="locations">
<list>
<value>
classpath:props/cms.properties
</value>
</list>
</property>
</bean>
And changed the domain to ${cms.domain}
And my property file is in <server-instance>conf/props/cms.properties and
contains:
cms.domain=cms-ontw-cocoon
Can someone help me?
With regards,
Nick Stolwijk
********************************************
Hippocms-dev: Hippo CMS development public mailinglist
********************************************
Hippocms-dev: Hippo CMS development public mailinglist