You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by Thomas TERMIN <tt...@blue-elephant-systems.com> on 2006/10/17 14:23:02 UTC

component.properties

Hello Guillaume,

it would be good if the component.properties file could be also
available in servicemix_home/conf. I would change the MBean so that if
no component.properties file is available in workspace then the MBean
searches for occurrences in the conf directory. The problem is that we
copy the file in the workspace directory before the servicemix is
started the first time. But if you then start servicemix the complete
directory structure will be newly created.

What do you think?

Cheers,
Thomas Termin

Re: component.properties

Posted by Thomas TERMIN <tt...@blue-elephant-systems.com>.
Guillaume Nodet wrote:
> On 10/18/06, Thomas TERMIN <tt...@blue-elephant-systems.com> wrote:
>> Hello Guillaume,
>>
>> I finished the work on it. So should I raise a JIRA issue with the patch
>> appended?
> 
> Yes please
I did it.

>> So first time you have a component.properties in the conf directory. If
>> it is available it will be loaded and  the specific properties will be
>> set. If you change something via JMX it is saved just in the file in the
>> workspace directory. So your original values are not changed then in the
>> conf directory. Hope it is ok! We need it this way.
> 
> Did you prefix the properties with the component name ? In case
> several components use the same property but you need different
> values ...
Indeed I did! ;-)

If I have some time I will look in the other components to implement the
same function.



> 
>>
>> Cheers,
>> Thomas Termin
>>
>> Guillaume Nodet wrote:
>> > If you have any time, go for it !
>> >
>> > On 10/17/06, Thomas TERMIN <tt...@blue-elephant-systems.com> wrote:
>> >> Ok! Who should change it you or I ;-)
>> >>
>> >> Guillaume Nodet wrote:
>> >> > Sounds good.
>> >> > I think that the component could check for a "components.properties"
>> >> > in the classpath and use it to load default properties.  However,
>> >> > properties
>> >> > should be prefixed by the component name:
>> >> >  servicemix-http.connectorMaxIdleTime = 60000
>> >> > These properties should be overriden by the usual property file
>> which
>> >> > can be update dynamically using jmx.
>> >> >
>> >> > Another way would be to use JNDI to retrieve the values, but I think
>> >> the
>> >> > "components.properties" is an easier way to go.
>> >> >
>> >> >
>> >> >
>> >> > On 10/17/06, Thomas TERMIN <tt...@blue-elephant-systems.com> wrote:
>> >> >> Hello Guillaume,
>> >> >>
>> >> >> it would be good if the component.properties file could be also
>> >> >> available in servicemix_home/conf. I would change the MBean so
>> that if
>> >> >> no component.properties file is available in workspace then the
>> MBean
>> >> >> searches for occurrences in the conf directory. The problem is
>> that we
>> >> >> copy the file in the workspace directory before the servicemix is
>> >> >> started the first time. But if you then start servicemix the
>> complete
>> >> >> directory structure will be newly created.
>> >> >>
>> >> >> What do you think?
>> >> >>
>> >> >> Cheers,
>> >> >> Thomas Termin
>> >> >>
>> >> >
>> >> >
>> >>
>> >>
>> >
>> >
>>
>>
> 
> 


Re: component.properties

Posted by Guillaume Nodet <gn...@gmail.com>.
On 10/18/06, Thomas TERMIN <tt...@blue-elephant-systems.com> wrote:
> Hello Guillaume,
>
> I finished the work on it. So should I raise a JIRA issue with the patch
> appended?

Yes please

>
> I don't know if it is good enough for you so please have look at it
> then. To find the file in the classpath I used the
> this.getClass().getClassLoader().getResourceAsStream() mechanism.
>
> So please let me know then if it is allright.

Sounds good

>
> So first time you have a component.properties in the conf directory. If
> it is available it will be loaded and  the specific properties will be
> set. If you change something via JMX it is saved just in the file in the
> workspace directory. So your original values are not changed then in the
> conf directory. Hope it is ok! We need it this way.

Did you prefix the properties with the component name ? In case
several components use the same property but you need different
values ...

>
> Cheers,
> Thomas Termin
>
> Guillaume Nodet wrote:
> > If you have any time, go for it !
> >
> > On 10/17/06, Thomas TERMIN <tt...@blue-elephant-systems.com> wrote:
> >> Ok! Who should change it you or I ;-)
> >>
> >> Guillaume Nodet wrote:
> >> > Sounds good.
> >> > I think that the component could check for a "components.properties"
> >> > in the classpath and use it to load default properties.  However,
> >> > properties
> >> > should be prefixed by the component name:
> >> >  servicemix-http.connectorMaxIdleTime = 60000
> >> > These properties should be overriden by the usual property file which
> >> > can be update dynamically using jmx.
> >> >
> >> > Another way would be to use JNDI to retrieve the values, but I think
> >> the
> >> > "components.properties" is an easier way to go.
> >> >
> >> >
> >> >
> >> > On 10/17/06, Thomas TERMIN <tt...@blue-elephant-systems.com> wrote:
> >> >> Hello Guillaume,
> >> >>
> >> >> it would be good if the component.properties file could be also
> >> >> available in servicemix_home/conf. I would change the MBean so that if
> >> >> no component.properties file is available in workspace then the MBean
> >> >> searches for occurrences in the conf directory. The problem is that we
> >> >> copy the file in the workspace directory before the servicemix is
> >> >> started the first time. But if you then start servicemix the complete
> >> >> directory structure will be newly created.
> >> >>
> >> >> What do you think?
> >> >>
> >> >> Cheers,
> >> >> Thomas Termin
> >> >>
> >> >
> >> >
> >>
> >>
> >
> >
>
>


-- 
Cheers,
Guillaume Nodet

Re: component.properties

Posted by Thomas TERMIN <tt...@blue-elephant-systems.com>.
Hello Guillaume,

I finished the work on it. So should I raise a JIRA issue with the patch
appended?

I don't know if it is good enough for you so please have look at it
then. To find the file in the classpath I used the
this.getClass().getClassLoader().getResourceAsStream() mechanism.

So please let me know then if it is allright.

So first time you have a component.properties in the conf directory. If
it is available it will be loaded and  the specific properties will be
set. If you change something via JMX it is saved just in the file in the
workspace directory. So your original values are not changed then in the
conf directory. Hope it is ok! We need it this way.

Cheers,
Thomas Termin

Guillaume Nodet wrote:
> If you have any time, go for it !
> 
> On 10/17/06, Thomas TERMIN <tt...@blue-elephant-systems.com> wrote:
>> Ok! Who should change it you or I ;-)
>>
>> Guillaume Nodet wrote:
>> > Sounds good.
>> > I think that the component could check for a "components.properties"
>> > in the classpath and use it to load default properties.  However,
>> > properties
>> > should be prefixed by the component name:
>> >  servicemix-http.connectorMaxIdleTime = 60000
>> > These properties should be overriden by the usual property file which
>> > can be update dynamically using jmx.
>> >
>> > Another way would be to use JNDI to retrieve the values, but I think
>> the
>> > "components.properties" is an easier way to go.
>> >
>> >
>> >
>> > On 10/17/06, Thomas TERMIN <tt...@blue-elephant-systems.com> wrote:
>> >> Hello Guillaume,
>> >>
>> >> it would be good if the component.properties file could be also
>> >> available in servicemix_home/conf. I would change the MBean so that if
>> >> no component.properties file is available in workspace then the MBean
>> >> searches for occurrences in the conf directory. The problem is that we
>> >> copy the file in the workspace directory before the servicemix is
>> >> started the first time. But if you then start servicemix the complete
>> >> directory structure will be newly created.
>> >>
>> >> What do you think?
>> >>
>> >> Cheers,
>> >> Thomas Termin
>> >>
>> >
>> >
>>
>>
> 
> 


Re: component.properties

Posted by Guillaume Nodet <gn...@gmail.com>.
If you have any time, go for it !

On 10/17/06, Thomas TERMIN <tt...@blue-elephant-systems.com> wrote:
> Ok! Who should change it you or I ;-)
>
> Guillaume Nodet wrote:
> > Sounds good.
> > I think that the component could check for a "components.properties"
> > in the classpath and use it to load default properties.  However,
> > properties
> > should be prefixed by the component name:
> >  servicemix-http.connectorMaxIdleTime = 60000
> > These properties should be overriden by the usual property file which
> > can be update dynamically using jmx.
> >
> > Another way would be to use JNDI to retrieve the values, but I think the
> > "components.properties" is an easier way to go.
> >
> >
> >
> > On 10/17/06, Thomas TERMIN <tt...@blue-elephant-systems.com> wrote:
> >> Hello Guillaume,
> >>
> >> it would be good if the component.properties file could be also
> >> available in servicemix_home/conf. I would change the MBean so that if
> >> no component.properties file is available in workspace then the MBean
> >> searches for occurrences in the conf directory. The problem is that we
> >> copy the file in the workspace directory before the servicemix is
> >> started the first time. But if you then start servicemix the complete
> >> directory structure will be newly created.
> >>
> >> What do you think?
> >>
> >> Cheers,
> >> Thomas Termin
> >>
> >
> >
>
>


-- 
Cheers,
Guillaume Nodet

Re: component.properties

Posted by Thomas TERMIN <tt...@blue-elephant-systems.com>.
Ok! Who should change it you or I ;-)

Guillaume Nodet wrote:
> Sounds good.
> I think that the component could check for a "components.properties"
> in the classpath and use it to load default properties.  However,
> properties
> should be prefixed by the component name:
>  servicemix-http.connectorMaxIdleTime = 60000
> These properties should be overriden by the usual property file which
> can be update dynamically using jmx.
> 
> Another way would be to use JNDI to retrieve the values, but I think the
> "components.properties" is an easier way to go.
> 
> 
> 
> On 10/17/06, Thomas TERMIN <tt...@blue-elephant-systems.com> wrote:
>> Hello Guillaume,
>>
>> it would be good if the component.properties file could be also
>> available in servicemix_home/conf. I would change the MBean so that if
>> no component.properties file is available in workspace then the MBean
>> searches for occurrences in the conf directory. The problem is that we
>> copy the file in the workspace directory before the servicemix is
>> started the first time. But if you then start servicemix the complete
>> directory structure will be newly created.
>>
>> What do you think?
>>
>> Cheers,
>> Thomas Termin
>>
> 
> 


Re: component.properties

Posted by Guillaume Nodet <gn...@gmail.com>.
Sounds good.
I think that the component could check for a "components.properties"
in the classpath and use it to load default properties.  However, properties
should be prefixed by the component name:
  servicemix-http.connectorMaxIdleTime = 60000
These properties should be overriden by the usual property file which
can be update dynamically using jmx.

Another way would be to use JNDI to retrieve the values, but I think the
"components.properties" is an easier way to go.



On 10/17/06, Thomas TERMIN <tt...@blue-elephant-systems.com> wrote:
> Hello Guillaume,
>
> it would be good if the component.properties file could be also
> available in servicemix_home/conf. I would change the MBean so that if
> no component.properties file is available in workspace then the MBean
> searches for occurrences in the conf directory. The problem is that we
> copy the file in the workspace directory before the servicemix is
> started the first time. But if you then start servicemix the complete
> directory structure will be newly created.
>
> What do you think?
>
> Cheers,
> Thomas Termin
>


-- 
Cheers,
Guillaume Nodet