You are viewing a plain text version of this content. The canonical link for it is here.
Posted to slide-dev@jakarta.apache.org by Stefan Lützkendorf <lu...@apache.org> on 2004/10/29 16:49:55 UTC

properties expansion in domain.xml

Hi Folks,

I have added a small change in the conf package that allows the use
of ant like variable expansion in the domain.xml. (As proposed in issue 31335)

Now you can write some thing like
<parameter name="path">${a.system.property}/bla</parameter>.

The webdav servlet sets a system property "org.apache.slide.webapp.rootpath"
that contains the path where the webapp is installed. Using this you
can place the file store inside the webapp directory, e.g.

<nodestore classname="org.apache.slide.store.txfile.TxXMLFileDescriptorsStore">
   <parameter name="rootpath">${org.apache.slide.webapp.rootpath}/store/metadata</parameter>
   <parameter name="workpath">${org.apache.slide.webapp.rootpath}/work/metadata</parameter>
   <parameter name="defer-saving">true</parameter>
   <parameter name="timeout">120</parameter>
</nodestore>

I think this would be a good default configuration. The place of the store
no longer depends from the directory where you start your tomcat.

Currently only system properties can be used. Do you think that
we need any other source of properties to be used?

Regards, Stefan

-- 
Stefan Lützkendorf  -- luetzkendorf@apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-dev-help@jakarta.apache.org


Re: properties expansion in domain.xml

Posted by Oliver Zeigermann <ol...@gmail.com>.
Nice feature :)

Oliver


On Fri, 29 Oct 2004 16:49:55 +0200, Stefan Lützkendorf
<lu...@apache.org> wrote:
> Hi Folks,
> 
> I have added a small change in the conf package that allows the use
> of ant like variable expansion in the domain.xml. (As proposed in issue 31335)
> 
> Now you can write some thing like
> <parameter name="path">${a.system.property}/bla</parameter>.
> 
> The webdav servlet sets a system property "org.apache.slide.webapp.rootpath"
> that contains the path where the webapp is installed. Using this you
> can place the file store inside the webapp directory, e.g.
> 
> <nodestore classname="org.apache.slide.store.txfile.TxXMLFileDescriptorsStore">
>    <parameter name="rootpath">${org.apache.slide.webapp.rootpath}/store/metadata</parameter>
>    <parameter name="workpath">${org.apache.slide.webapp.rootpath}/work/metadata</parameter>
>    <parameter name="defer-saving">true</parameter>
>    <parameter name="timeout">120</parameter>
> </nodestore>
> 
> I think this would be a good default configuration. The place of the store
> no longer depends from the directory where you start your tomcat.
> 
> Currently only system properties can be used. Do you think that
> we need any other source of properties to be used?
> 
> Regards, Stefan
> 
> --
> Stefan Lützkendorf  -- luetzkendorf@apache.org
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: slide-dev-help@jakarta.apache.org
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-dev-help@jakarta.apache.org


Re: properties expansion in domain.xml

Posted by James Mason <ma...@apache.org>.
Excellent work. Thank you muchly :).

-James

On Mon, 2004-11-08 at 11:10 +0100, Stefan Lützkendorf wrote:
> Well, I now updated the properties expansion feature.
> 
> Now you can define properties in the domain.xml as children of the slide 
> element.
> <slide>
>    <property name="datapath">/user/local/files</property>
>    <property name="store1">${datapath}/store1</property>
>    ...
> </slide>
> 
> additionally properties defined in the slide.properties file are 
> expanded too.
> 
> properties have the folloging precedence
> 
> 1. property defined in domain.xml
> 2. property defined in slide.properties
> 3. system property defined by -D
> 
> I commited a modified Domain.xml that makes usage of this and places the 
> filestore in the webapp directory by default.
> 
> Cheers, Stefan
> 
> James Mason wrote:
> 
> > You da' man!
> > 
> > I think being able to define custom properties in Domain.xml would be
> > useful. Common paths, database usernames, parameters shared among
> > multiple stores... I can foresee several potentially useful scenarios.
> > 
> > I think you hit the most pressing need, though.
> > 
> > -James
> > 
> > On Fri, 2004-10-29 at 16:49 +0200, Stefan Lützkendorf wrote:
> > 
> >>Hi Folks,
> >>
> >>I have added a small change in the conf package that allows the use
> >>of ant like variable expansion in the domain.xml. (As proposed in issue 31335)
> >>
> >>Now you can write some thing like
> >><parameter name="path">${a.system.property}/bla</parameter>.
> >>
> >>The webdav servlet sets a system property "org.apache.slide.webapp.rootpath"
> >>that contains the path where the webapp is installed. Using this you
> >>can place the file store inside the webapp directory, e.g.
> >>
> >><nodestore classname="org.apache.slide.store.txfile.TxXMLFileDescriptorsStore">
> >>   <parameter name="rootpath">${org.apache.slide.webapp.rootpath}/store/metadata</parameter>
> >>   <parameter name="workpath">${org.apache.slide.webapp.rootpath}/work/metadata</parameter>
> >>   <parameter name="defer-saving">true</parameter>
> >>   <parameter name="timeout">120</parameter>
> >></nodestore>
> >>
> >>I think this would be a good default configuration. The place of the store
> >>no longer depends from the directory where you start your tomcat.
> >>
> >>Currently only system properties can be used. Do you think that
> >>we need any other source of properties to be used?
> >>
> >>Regards, Stefan
> >>
> > 
> > 
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: slide-dev-help@jakarta.apache.org
> > 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-dev-help@jakarta.apache.org


Re: properties expansion in domain.xml

Posted by Oliver Zeigermann <ol...@gmail.com>.
Great, I really like that :)

Oliver


On Mon, 08 Nov 2004 11:10:55 +0100, Stefan Lützkendorf
<lu...@apache.org> wrote:
> Well, I now updated the properties expansion feature.
> 
> Now you can define properties in the domain.xml as children of the slide
> element.
> <slide>
>    <property name="datapath">/user/local/files</property>
>    <property name="store1">${datapath}/store1</property>
>    ...
> </slide>
> 
> additionally properties defined in the slide.properties file are
> expanded too.
> 
> properties have the folloging precedence
> 
> 1. property defined in domain.xml
> 2. property defined in slide.properties
> 3. system property defined by -D
> 
> I commited a modified Domain.xml that makes usage of this and places the
> filestore in the webapp directory by default.
> 
> Cheers, Stefan
> 
> 
> 
> James Mason wrote:
> 
> > You da' man!
> >
> > I think being able to define custom properties in Domain.xml would be
> > useful. Common paths, database usernames, parameters shared among
> > multiple stores... I can foresee several potentially useful scenarios.
> >
> > I think you hit the most pressing need, though.
> >
> > -James
> >
> > On Fri, 2004-10-29 at 16:49 +0200, Stefan Lützkendorf wrote:
> >
> >>Hi Folks,
> >>
> >>I have added a small change in the conf package that allows the use
> >>of ant like variable expansion in the domain.xml. (As proposed in issue 31335)
> >>
> >>Now you can write some thing like
> >><parameter name="path">${a.system.property}/bla</parameter>.
> >>
> >>The webdav servlet sets a system property "org.apache.slide.webapp.rootpath"
> >>that contains the path where the webapp is installed. Using this you
> >>can place the file store inside the webapp directory, e.g.
> >>
> >><nodestore classname="org.apache.slide.store.txfile.TxXMLFileDescriptorsStore">
> >>   <parameter name="rootpath">${org.apache.slide.webapp.rootpath}/store/metadata</parameter>
> >>   <parameter name="workpath">${org.apache.slide.webapp.rootpath}/work/metadata</parameter>
> >>   <parameter name="defer-saving">true</parameter>
> >>   <parameter name="timeout">120</parameter>
> >></nodestore>
> >>
> >>I think this would be a good default configuration. The place of the store
> >>no longer depends from the directory where you start your tomcat.
> >>
> >>Currently only system properties can be used. Do you think that
> >>we need any other source of properties to be used?
> >>
> >>Regards, Stefan
> >>
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: slide-dev-help@jakarta.apache.org
> >
> 
> --
> Stefan Lützkendorf  --  luetzkendorf@apache.org
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: slide-dev-help@jakarta.apache.org
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-dev-help@jakarta.apache.org


Re: properties expansion in domain.xml

Posted by Stefan Lützkendorf <lu...@apache.org>.
Well, I now updated the properties expansion feature.

Now you can define properties in the domain.xml as children of the slide 
element.
<slide>
   <property name="datapath">/user/local/files</property>
   <property name="store1">${datapath}/store1</property>
   ...
</slide>

additionally properties defined in the slide.properties file are 
expanded too.

properties have the folloging precedence

1. property defined in domain.xml
2. property defined in slide.properties
3. system property defined by -D

I commited a modified Domain.xml that makes usage of this and places the 
filestore in the webapp directory by default.

Cheers, Stefan

James Mason wrote:

> You da' man!
> 
> I think being able to define custom properties in Domain.xml would be
> useful. Common paths, database usernames, parameters shared among
> multiple stores... I can foresee several potentially useful scenarios.
> 
> I think you hit the most pressing need, though.
> 
> -James
> 
> On Fri, 2004-10-29 at 16:49 +0200, Stefan Lützkendorf wrote:
> 
>>Hi Folks,
>>
>>I have added a small change in the conf package that allows the use
>>of ant like variable expansion in the domain.xml. (As proposed in issue 31335)
>>
>>Now you can write some thing like
>><parameter name="path">${a.system.property}/bla</parameter>.
>>
>>The webdav servlet sets a system property "org.apache.slide.webapp.rootpath"
>>that contains the path where the webapp is installed. Using this you
>>can place the file store inside the webapp directory, e.g.
>>
>><nodestore classname="org.apache.slide.store.txfile.TxXMLFileDescriptorsStore">
>>   <parameter name="rootpath">${org.apache.slide.webapp.rootpath}/store/metadata</parameter>
>>   <parameter name="workpath">${org.apache.slide.webapp.rootpath}/work/metadata</parameter>
>>   <parameter name="defer-saving">true</parameter>
>>   <parameter name="timeout">120</parameter>
>></nodestore>
>>
>>I think this would be a good default configuration. The place of the store
>>no longer depends from the directory where you start your tomcat.
>>
>>Currently only system properties can be used. Do you think that
>>we need any other source of properties to be used?
>>
>>Regards, Stefan
>>
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: slide-dev-help@jakarta.apache.org
> 

-- 
Stefan Lützkendorf  --  luetzkendorf@apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-dev-help@jakarta.apache.org


Re: properties expansion in domain.xml

Posted by James Mason <ma...@apache.org>.
You da' man!

I think being able to define custom properties in Domain.xml would be
useful. Common paths, database usernames, parameters shared among
multiple stores... I can foresee several potentially useful scenarios.

I think you hit the most pressing need, though.

-James

On Fri, 2004-10-29 at 16:49 +0200, Stefan Lützkendorf wrote:
> Hi Folks,
> 
> I have added a small change in the conf package that allows the use
> of ant like variable expansion in the domain.xml. (As proposed in issue 31335)
> 
> Now you can write some thing like
> <parameter name="path">${a.system.property}/bla</parameter>.
> 
> The webdav servlet sets a system property "org.apache.slide.webapp.rootpath"
> that contains the path where the webapp is installed. Using this you
> can place the file store inside the webapp directory, e.g.
> 
> <nodestore classname="org.apache.slide.store.txfile.TxXMLFileDescriptorsStore">
>    <parameter name="rootpath">${org.apache.slide.webapp.rootpath}/store/metadata</parameter>
>    <parameter name="workpath">${org.apache.slide.webapp.rootpath}/work/metadata</parameter>
>    <parameter name="defer-saving">true</parameter>
>    <parameter name="timeout">120</parameter>
> </nodestore>
> 
> I think this would be a good default configuration. The place of the store
> no longer depends from the directory where you start your tomcat.
> 
> Currently only system properties can be used. Do you think that
> we need any other source of properties to be used?
> 
> Regards, Stefan
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-dev-help@jakarta.apache.org