Hi Nick,
Which properties do you want to put in the properties file? The
"configurationLocation" can already be used to put the config outside
the application.
Regards,
Bart
[EMAIL PROTECTED] wrote:
I've created a patch to include in the serverManager a properties file, which
then is used to resolve variables inside the configuration.
Instead of
<bean id="serverManager" class="nl.hippo.servermanager.ServerManager" init-method="initialize">
<property name="configurationLocation">
%maven.cocoon.servermanager.configurationlocation%
</property>
<property name="workLocation">
%maven.cocoon.servermanager.worklocation%
</property>
<property name="logger">
<ref local="serverManagerLogger"/>
</property>
</bean>
You can add a property:
<property
name="propertyLocation">classpath://props/cms.properties</property>
Which listens to context://, classpath:// or an absolute path.
Is it possible to integrate this in the module?
With regards,
Nick Stolwijk
-----Original Message-----
From: [EMAIL PROTECTED] on behalf of [EMAIL PROTECTED]
Sent: Mon 1/14/2008 4:25 PM
To: Hippo CMS development public mailinglist
Subject: RE: [HippoCMS-dev] Reading domain name in
sampleDomains.xmlfromproperty file
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
------------------------------------------------------------------------
********************************************
Hippocms-dev: Hippo CMS development public mailinglist
--
Hippo
Oosteinde 11
1017WT Amsterdam
The Netherlands
Tel +31 (0)20 5224466
-------------------------------------------------------------
[EMAIL PROTECTED] / http://www.hippo.nl
--------------------------------------------------------------
********************************************
Hippocms-dev: Hippo CMS development public mailinglist