You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@servicemix.apache.org by Guillaume Nodet <gn...@gmail.com> on 2007/01/11 16:00:03 UTC

Re: log4j

Forwarding to the dev list ...

I think you may want to take a look at how the
JdbcAuditor, DotViewService or StatisticsService
are implemented.  They all inherit the o.a.s.jbi.management.BaseSystemService
abstract class.  They come in different flavous wrt configuration however.
I would recommend to look at the StatisticsService, which can be configured
that way:

   <sm:container ...>
     <sm:services>
       <sm:statistics .. />
     </sm:services>
   </sm:container>

This way, the service is automatically registered in JMX and has its own
lifecycle (which is tied to the container), so that you can stop / start the
service from jmx.

On 1/11/07, Thomas TERMIN <tt...@blue-elephant-systems.com> wrote:
> What I want to do is to implement a MBean which configure the log4j
> system periodicaly with a scheduler. But before I will look if there is
> a log4j.xml or log4j.properties in the conf directory if there is
> nothing in it then I assume that there is no log4j system and don't
> reconfigure log4j (I will give you a better explanation later ;-) ).
>
> The Problem what I have is to register a MBean in conf/servicemix.xml.
> How do I have to do this? I tried this with the spring MBeanExporter but
> it doesn't work for me.
>
> Cheers,
> Thomas
>
> >
> > Btw, if you don't mind, i'd rather have such discussion on
> > servicemix-dev / servicemix-users ;-)
> No problem at all! If you open the thread...
>
> >
> >>
> >> Cheers,
> >> Thomas
> >>
> >> Guillaume Nodet wrote:
> >> > Did you implement something useful ?  Would you
> >> > consider giving it back to ServiceMix ?
> >> >
> >> > On 10/20/06, Thomas TERMIN <tt...@blue-elephant-systems.com> wrote:
> >> >> Sorry I did not mean a servicemix component. I use allways the word
> >> >> component ;-) since I started working with servicemix. What you
> >> said is
> >> >> exactly what I meant. So I will have a look on it!
> >> >>
> >> >> Thanks,
> >> >> Thomas
> >> >>
> >> >> Guillaume Nodet wrote:
> >> >> > I would rather use a ServiceMix service instead of
> >> >> > a component, as this is more related to management /
> >> >> > configuration than a component if I understand you
> >> >> > correctly.  ... and use a timer to reload the log4j config.
> >> >> > But iirc, log4j already has this feature, we just need to
> >> >> > enable it.
> >> >> >
> >> >> > On 10/20/06, Thomas TERMIN <tt...@blue-elephant-systems.com> wrote:
> >> >> >> Hello Guillaume,
> >> >> >>
> >> >> >> We would need a log4j Component where you can change the debug
> >> >> level at
> >> >> >> runtime. I would implement a MBean which initialise the log4j
> >> >> system at
> >> >> >> startup and also have a scheduler which looks if the log4j.xml has
> >> >> >> changed and then reinitialise the log4j system.
> >> >> >>
> >> >> >> If I would provide you a patch would you accept this in servicemix?
> >> >> >>
> >> >> >> Cheers,
> >> >> >> Thomas Termin
> >> >> >>
> >> >> >
> >> >> >
> >> >>
> >> >>
> >> >
> >> >
> >>
> >>
> >
> >
>
>


-- 
Cheers,
Guillaume Nodet
------------------------
Architect, LogicBlaze (http://www.logicblaze.com/)
Blog: http://gnodet.blogspot.com/

Fwd: log4j

Posted by Guillaume Nodet <gn...@gmail.com>.
Forgot to foward to dev ...

---------- Forwarded message ----------
From: Guillaume Nodet <gn...@gmail.com>
Date: Jan 12, 2007 2:42 PM
Subject: Re: log4j
To: Thomas TERMIN <tt...@blue-elephant-systems.com>


Yeah, looks good. I will try it now.
What about using a spring Resource instead of a String ?
I think it would enable using classpath: notation, which is very
handy ...  Hum, i guess it would not work with JMX ;-)
I guess we could simulate that by checking if the url begins
with classpath:  and use a getClass().getClassLoader().getResource() ?

What do you think ?

On 1/12/07, Thomas TERMIN <tt...@blue-elephant-systems.com> wrote:
> Hello,
>
> attached the patch for the new logging service. Please have a look at it
> if it is ok this way (if it is please let me know I will raise a JIRA
> issue then and will attach the patch). If there are any improvements on
> it I will change that.
>
> Cheers,
> Thomas
>
> Guillaume Nodet wrote:
> > Forwarding to the dev list ...
> >
> > I think you may want to take a look at how the
> > JdbcAuditor, DotViewService or StatisticsService
> > are implemented.  They all inherit the
> > o.a.s.jbi.management.BaseSystemService
> > abstract class.  They come in different flavous wrt configuration however.
> > I would recommend to look at the StatisticsService, which can be configured
> > that way:
> >
> >   <sm:container ...>
> >     <sm:services>
> >       <sm:statistics .. />
> >     </sm:services>
> >   </sm:container>
> >
> > This way, the service is automatically registered in JMX and has its own
> > lifecycle (which is tied to the container), so that you can stop / start
> > the
> > service from jmx.
> >
> > On 1/11/07, Thomas TERMIN <tt...@blue-elephant-systems.com> wrote:
> >> What I want to do is to implement a MBean which configure the log4j
> >> system periodicaly with a scheduler. But before I will look if there is
> >> a log4j.xml or log4j.properties in the conf directory if there is
> >> nothing in it then I assume that there is no log4j system and don't
> >> reconfigure log4j (I will give you a better explanation later ;-) ).
> >>
> >> The Problem what I have is to register a MBean in conf/servicemix.xml.
> >> How do I have to do this? I tried this with the spring MBeanExporter but
> >> it doesn't work for me.
> >>
> >> Cheers,
> >> Thomas
> >>
> >> >
> >> > Btw, if you don't mind, i'd rather have such discussion on
> >> > servicemix-dev / servicemix-users ;-)
> >> No problem at all! If you open the thread...
> >>
> >> >
> >> >>
> >> >> Cheers,
> >> >> Thomas
> >> >>
> >> >> Guillaume Nodet wrote:
> >> >> > Did you implement something useful ?  Would you
> >> >> > consider giving it back to ServiceMix ?
> >> >> >
> >> >> > On 10/20/06, Thomas TERMIN <tt...@blue-elephant-systems.com> wrote:
> >> >> >> Sorry I did not mean a servicemix component. I use allways the word
> >> >> >> component ;-) since I started working with servicemix. What you
> >> >> said is
> >> >> >> exactly what I meant. So I will have a look on it!
> >> >> >>
> >> >> >> Thanks,
> >> >> >> Thomas
> >> >> >>
> >> >> >> Guillaume Nodet wrote:
> >> >> >> > I would rather use a ServiceMix service instead of
> >> >> >> > a component, as this is more related to management /
> >> >> >> > configuration than a component if I understand you
> >> >> >> > correctly.  ... and use a timer to reload the log4j config.
> >> >> >> > But iirc, log4j already has this feature, we just need to
> >> >> >> > enable it.
> >> >> >> >
> >> >> >> > On 10/20/06, Thomas TERMIN <tt...@blue-elephant-systems.com> wrote:
> >> >> >> >> Hello Guillaume,
> >> >> >> >>
> >> >> >> >> We would need a log4j Component where you can change the debug
> >> >> >> level at
> >> >> >> >> runtime. I would implement a MBean which initialise the log4j
> >> >> >> system at
> >> >> >> >> startup and also have a scheduler which looks if the
> >> log4j.xml has
> >> >> >> >> changed and then reinitialise the log4j system.
> >> >> >> >>
> >> >> >> >> If I would provide you a patch would you accept this in
> >> servicemix?
> >> >> >> >>
> >> >> >> >> Cheers,
> >> >> >> >> Thomas Termin
> >> >> >> >>
> >> >> >> >
> >> >> >> >
> >> >> >>
> >> >> >>
> >> >> >
> >> >> >
> >> >>
> >> >>
> >> >
> >> >
> >>
> >>
> >
> >
>
>
>
>


--
Cheers,
Guillaume Nodet
------------------------
Architect, LogicBlaze (http://www.logicblaze.com/)
Blog: http://gnodet.blogspot.com/


-- 
Cheers,
Guillaume Nodet
------------------------
Architect, LogicBlaze (http://www.logicblaze.com/)
Blog: http://gnodet.blogspot.com/

Re: log4j

Posted by Thomas TERMIN <tt...@blue-elephant-systems.com>.
Guillaume Nodet wrote:
> Yeah, good point.
> As was only worried to use a relative URL ...
you can set the URL via JMX. That's just a default.


> Let mw try it first.
> Could you raise a JIRA and attach the patch please ?
> 
> On 1/12/07, Thomas TERMIN <tt...@blue-elephant-systems.com> wrote:
>> Guillaume Nodet wrote:
>> > Yeah, looks good. I will try it now.
>> > What about using a spring Resource instead of a String ?
>> Yes would be nice of course but than I have to learn spring. ;-) I'm not
>> that experienced with spring.
>>
>> > I think it would enable using classpath: notation, which is very
>> > handy ...  Hum, i guess it would not work with JMX ;-)
>> It should.
>>
>> > I guess we could simulate that by checking if the url begins
>> > with classpath:  and use a getClass().getClassLoader().getResource() ?
>> >
>> > What do you think ?
>> That should of course work. I did this because DOMConfigurator.configure
>> use the url and because I could check the content type of the config
>> file. So that we could later (if it is needed) extend this service for a
>> normal log4j.properties file. If it is application/xml then use
>> DOMConfigurator and if it is text use PropertyConfigurator.
>>
>> Cheers,
>> Thomas
>>
>> >
>> > On 1/12/07, Thomas TERMIN <tt...@blue-elephant-systems.com> wrote:
>> >> Hello,
>> >>
>> >> attached the patch for the new logging service. Please have a look
>> at it
>> >> if it is ok this way (if it is please let me know I will raise a JIRA
>> >> issue then and will attach the patch). If there are any
>> improvements on
>> >> it I will change that.
>> >>
>> >> Cheers,
>> >> Thomas
>> >>
>> >> Guillaume Nodet wrote:
>> >> > Forwarding to the dev list ...
>> >> >
>> >> > I think you may want to take a look at how the
>> >> > JdbcAuditor, DotViewService or StatisticsService
>> >> > are implemented.  They all inherit the
>> >> > o.a.s.jbi.management.BaseSystemService
>> >> > abstract class.  They come in different flavous wrt configuration
>> >> however.
>> >> > I would recommend to look at the StatisticsService, which can be
>> >> configured
>> >> > that way:
>> >> >
>> >> >   <sm:container ...>
>> >> >     <sm:services>
>> >> >       <sm:statistics .. />
>> >> >     </sm:services>
>> >> >   </sm:container>
>> >> >
>> >> > This way, the service is automatically registered in JMX and has its
>> >> own
>> >> > lifecycle (which is tied to the container), so that you can stop /
>> >> start
>> >> > the
>> >> > service from jmx.
>> >> >
>> >> > On 1/11/07, Thomas TERMIN <tt...@blue-elephant-systems.com> wrote:
>> >> >> What I want to do is to implement a MBean which configure the log4j
>> >> >> system periodicaly with a scheduler. But before I will look if
>> >> there is
>> >> >> a log4j.xml or log4j.properties in the conf directory if there is
>> >> >> nothing in it then I assume that there is no log4j system and don't
>> >> >> reconfigure log4j (I will give you a better explanation later
>> ;-) ).
>> >> >>
>> >> >> The Problem what I have is to register a MBean in
>> conf/servicemix.xml.
>> >> >> How do I have to do this? I tried this with the spring
>> >> MBeanExporter but
>> >> >> it doesn't work for me.
>> >> >>
>> >> >> Cheers,
>> >> >> Thomas
>> >> >>
>> >> >> >
>> >> >> > Btw, if you don't mind, i'd rather have such discussion on
>> >> >> > servicemix-dev / servicemix-users ;-)
>> >> >> No problem at all! If you open the thread...
>> >> >>
>> >> >> >
>> >> >> >>
>> >> >> >> Cheers,
>> >> >> >> Thomas
>> >> >> >>
>> >> >> >> Guillaume Nodet wrote:
>> >> >> >> > Did you implement something useful ?  Would you
>> >> >> >> > consider giving it back to ServiceMix ?
>> >> >> >> >
>> >> >> >> > On 10/20/06, Thomas TERMIN <tt...@blue-elephant-systems.com>
>> wrote:
>> >> >> >> >> Sorry I did not mean a servicemix component. I use allways
>> >> the word
>> >> >> >> >> component ;-) since I started working with servicemix.
>> What you
>> >> >> >> said is
>> >> >> >> >> exactly what I meant. So I will have a look on it!
>> >> >> >> >>
>> >> >> >> >> Thanks,
>> >> >> >> >> Thomas
>> >> >> >> >>
>> >> >> >> >> Guillaume Nodet wrote:
>> >> >> >> >> > I would rather use a ServiceMix service instead of
>> >> >> >> >> > a component, as this is more related to management /
>> >> >> >> >> > configuration than a component if I understand you
>> >> >> >> >> > correctly.  ... and use a timer to reload the log4j config.
>> >> >> >> >> > But iirc, log4j already has this feature, we just need to
>> >> >> >> >> > enable it.
>> >> >> >> >> >
>> >> >> >> >> > On 10/20/06, Thomas TERMIN <tt...@blue-elephant-systems.com>
>> >> wrote:
>> >> >> >> >> >> Hello Guillaume,
>> >> >> >> >> >>
>> >> >> >> >> >> We would need a log4j Component where you can change the
>> >> debug
>> >> >> >> >> level at
>> >> >> >> >> >> runtime. I would implement a MBean which initialise the
>> log4j
>> >> >> >> >> system at
>> >> >> >> >> >> startup and also have a scheduler which looks if the
>> >> >> log4j.xml has
>> >> >> >> >> >> changed and then reinitialise the log4j system.
>> >> >> >> >> >>
>> >> >> >> >> >> If I would provide you a patch would you accept this in
>> >> >> servicemix?
>> >> >> >> >> >>
>> >> >> >> >> >> Cheers,
>> >> >> >> >> >> Thomas Termin
>> >> >> >> >> >>
>> >> >> >> >> >
>> >> >> >> >> >
>> >> >> >> >>
>> >> >> >> >>
>> >> >> >> >
>> >> >> >> >
>> >> >> >>
>> >> >> >>
>> >> >> >
>> >> >> >
>> >> >>
>> >> >>
>> >> >
>> >> >
>> >>
>> >>
>> >>
>> >>
>> >
>> >
>>
>>
> 
> 


Re: log4j

Posted by Guillaume Nodet <gn...@gmail.com>.
Yeah, good point.
As was only worried to use a relative URL ...
Let mw try it first.
Could you raise a JIRA and attach the patch please ?

On 1/12/07, Thomas TERMIN <tt...@blue-elephant-systems.com> wrote:
> Guillaume Nodet wrote:
> > Yeah, looks good. I will try it now.
> > What about using a spring Resource instead of a String ?
> Yes would be nice of course but than I have to learn spring. ;-) I'm not
> that experienced with spring.
>
> > I think it would enable using classpath: notation, which is very
> > handy ...  Hum, i guess it would not work with JMX ;-)
> It should.
>
> > I guess we could simulate that by checking if the url begins
> > with classpath:  and use a getClass().getClassLoader().getResource() ?
> >
> > What do you think ?
> That should of course work. I did this because DOMConfigurator.configure
> use the url and because I could check the content type of the config
> file. So that we could later (if it is needed) extend this service for a
> normal log4j.properties file. If it is application/xml then use
> DOMConfigurator and if it is text use PropertyConfigurator.
>
> Cheers,
> Thomas
>
> >
> > On 1/12/07, Thomas TERMIN <tt...@blue-elephant-systems.com> wrote:
> >> Hello,
> >>
> >> attached the patch for the new logging service. Please have a look at it
> >> if it is ok this way (if it is please let me know I will raise a JIRA
> >> issue then and will attach the patch). If there are any improvements on
> >> it I will change that.
> >>
> >> Cheers,
> >> Thomas
> >>
> >> Guillaume Nodet wrote:
> >> > Forwarding to the dev list ...
> >> >
> >> > I think you may want to take a look at how the
> >> > JdbcAuditor, DotViewService or StatisticsService
> >> > are implemented.  They all inherit the
> >> > o.a.s.jbi.management.BaseSystemService
> >> > abstract class.  They come in different flavous wrt configuration
> >> however.
> >> > I would recommend to look at the StatisticsService, which can be
> >> configured
> >> > that way:
> >> >
> >> >   <sm:container ...>
> >> >     <sm:services>
> >> >       <sm:statistics .. />
> >> >     </sm:services>
> >> >   </sm:container>
> >> >
> >> > This way, the service is automatically registered in JMX and has its
> >> own
> >> > lifecycle (which is tied to the container), so that you can stop /
> >> start
> >> > the
> >> > service from jmx.
> >> >
> >> > On 1/11/07, Thomas TERMIN <tt...@blue-elephant-systems.com> wrote:
> >> >> What I want to do is to implement a MBean which configure the log4j
> >> >> system periodicaly with a scheduler. But before I will look if
> >> there is
> >> >> a log4j.xml or log4j.properties in the conf directory if there is
> >> >> nothing in it then I assume that there is no log4j system and don't
> >> >> reconfigure log4j (I will give you a better explanation later ;-) ).
> >> >>
> >> >> The Problem what I have is to register a MBean in conf/servicemix.xml.
> >> >> How do I have to do this? I tried this with the spring
> >> MBeanExporter but
> >> >> it doesn't work for me.
> >> >>
> >> >> Cheers,
> >> >> Thomas
> >> >>
> >> >> >
> >> >> > Btw, if you don't mind, i'd rather have such discussion on
> >> >> > servicemix-dev / servicemix-users ;-)
> >> >> No problem at all! If you open the thread...
> >> >>
> >> >> >
> >> >> >>
> >> >> >> Cheers,
> >> >> >> Thomas
> >> >> >>
> >> >> >> Guillaume Nodet wrote:
> >> >> >> > Did you implement something useful ?  Would you
> >> >> >> > consider giving it back to ServiceMix ?
> >> >> >> >
> >> >> >> > On 10/20/06, Thomas TERMIN <tt...@blue-elephant-systems.com> wrote:
> >> >> >> >> Sorry I did not mean a servicemix component. I use allways
> >> the word
> >> >> >> >> component ;-) since I started working with servicemix. What you
> >> >> >> said is
> >> >> >> >> exactly what I meant. So I will have a look on it!
> >> >> >> >>
> >> >> >> >> Thanks,
> >> >> >> >> Thomas
> >> >> >> >>
> >> >> >> >> Guillaume Nodet wrote:
> >> >> >> >> > I would rather use a ServiceMix service instead of
> >> >> >> >> > a component, as this is more related to management /
> >> >> >> >> > configuration than a component if I understand you
> >> >> >> >> > correctly.  ... and use a timer to reload the log4j config.
> >> >> >> >> > But iirc, log4j already has this feature, we just need to
> >> >> >> >> > enable it.
> >> >> >> >> >
> >> >> >> >> > On 10/20/06, Thomas TERMIN <tt...@blue-elephant-systems.com>
> >> wrote:
> >> >> >> >> >> Hello Guillaume,
> >> >> >> >> >>
> >> >> >> >> >> We would need a log4j Component where you can change the
> >> debug
> >> >> >> >> level at
> >> >> >> >> >> runtime. I would implement a MBean which initialise the log4j
> >> >> >> >> system at
> >> >> >> >> >> startup and also have a scheduler which looks if the
> >> >> log4j.xml has
> >> >> >> >> >> changed and then reinitialise the log4j system.
> >> >> >> >> >>
> >> >> >> >> >> If I would provide you a patch would you accept this in
> >> >> servicemix?
> >> >> >> >> >>
> >> >> >> >> >> Cheers,
> >> >> >> >> >> Thomas Termin
> >> >> >> >> >>
> >> >> >> >> >
> >> >> >> >> >
> >> >> >> >>
> >> >> >> >>
> >> >> >> >
> >> >> >> >
> >> >> >>
> >> >> >>
> >> >> >
> >> >> >
> >> >>
> >> >>
> >> >
> >> >
> >>
> >>
> >>
> >>
> >
> >
>
>


-- 
Cheers,
Guillaume Nodet
------------------------
Architect, LogicBlaze (http://www.logicblaze.com/)
Blog: http://gnodet.blogspot.com/

Re: log4j

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

attached the patch for the new logging service. Please have a look at it
if it is ok this way (if it is please let me know I will raise a JIRA
issue then and will attach the patch). If there are any improvements on
it I will change that.

Cheers,
Thomas

Guillaume Nodet wrote:
> Forwarding to the dev list ...
> 
> I think you may want to take a look at how the
> JdbcAuditor, DotViewService or StatisticsService
> are implemented.  They all inherit the
> o.a.s.jbi.management.BaseSystemService
> abstract class.  They come in different flavous wrt configuration however.
> I would recommend to look at the StatisticsService, which can be configured
> that way:
> 
>   <sm:container ...>
>     <sm:services>
>       <sm:statistics .. />
>     </sm:services>
>   </sm:container>
> 
> This way, the service is automatically registered in JMX and has its own
> lifecycle (which is tied to the container), so that you can stop / start
> the
> service from jmx.
> 
> On 1/11/07, Thomas TERMIN <tt...@blue-elephant-systems.com> wrote:
>> What I want to do is to implement a MBean which configure the log4j
>> system periodicaly with a scheduler. But before I will look if there is
>> a log4j.xml or log4j.properties in the conf directory if there is
>> nothing in it then I assume that there is no log4j system and don't
>> reconfigure log4j (I will give you a better explanation later ;-) ).
>>
>> The Problem what I have is to register a MBean in conf/servicemix.xml.
>> How do I have to do this? I tried this with the spring MBeanExporter but
>> it doesn't work for me.
>>
>> Cheers,
>> Thomas
>>
>> >
>> > Btw, if you don't mind, i'd rather have such discussion on
>> > servicemix-dev / servicemix-users ;-)
>> No problem at all! If you open the thread...
>>
>> >
>> >>
>> >> Cheers,
>> >> Thomas
>> >>
>> >> Guillaume Nodet wrote:
>> >> > Did you implement something useful ?  Would you
>> >> > consider giving it back to ServiceMix ?
>> >> >
>> >> > On 10/20/06, Thomas TERMIN <tt...@blue-elephant-systems.com> wrote:
>> >> >> Sorry I did not mean a servicemix component. I use allways the word
>> >> >> component ;-) since I started working with servicemix. What you
>> >> said is
>> >> >> exactly what I meant. So I will have a look on it!
>> >> >>
>> >> >> Thanks,
>> >> >> Thomas
>> >> >>
>> >> >> Guillaume Nodet wrote:
>> >> >> > I would rather use a ServiceMix service instead of
>> >> >> > a component, as this is more related to management /
>> >> >> > configuration than a component if I understand you
>> >> >> > correctly.  ... and use a timer to reload the log4j config.
>> >> >> > But iirc, log4j already has this feature, we just need to
>> >> >> > enable it.
>> >> >> >
>> >> >> > On 10/20/06, Thomas TERMIN <tt...@blue-elephant-systems.com> wrote:
>> >> >> >> Hello Guillaume,
>> >> >> >>
>> >> >> >> We would need a log4j Component where you can change the debug
>> >> >> level at
>> >> >> >> runtime. I would implement a MBean which initialise the log4j
>> >> >> system at
>> >> >> >> startup and also have a scheduler which looks if the
>> log4j.xml has
>> >> >> >> changed and then reinitialise the log4j system.
>> >> >> >>
>> >> >> >> If I would provide you a patch would you accept this in
>> servicemix?
>> >> >> >>
>> >> >> >> Cheers,
>> >> >> >> Thomas Termin
>> >> >> >>
>> >> >> >
>> >> >> >
>> >> >>
>> >> >>
>> >> >
>> >> >
>> >>
>> >>
>> >
>> >
>>
>>
> 
> 


Re: log4j

Posted by Thomas TERMIN <tt...@blue-elephant-systems.com>.
So I implemted it. It works fine until now. I still have to do some
improvements on it but I guess I can provide it to you tomorrow.

Cheers,
Thomas

Thomas TERMIN wrote:
> I found it. ;-)
> 
> I'm implementing at the moment the new service.
> 
> Guillaume Nodet wrote:
>> Forwarding to the dev list ...
>>
>> I think you may want to take a look at how the
>> JdbcAuditor, DotViewService or StatisticsService
>> are implemented.  They all inherit the
>> o.a.s.jbi.management.BaseSystemService
>> abstract class.  They come in different flavous wrt configuration however.
>> I would recommend to look at the StatisticsService, which can be configured
>> that way:
>>
>>   <sm:container ...>
>>     <sm:services>
>>       <sm:statistics .. />
>>     </sm:services>
>>   </sm:container>
>>
>> This way, the service is automatically registered in JMX and has its own
>> lifecycle (which is tied to the container), so that you can stop / start
>> the
>> service from jmx.
>>
>> On 1/11/07, Thomas TERMIN <tt...@blue-elephant-systems.com> wrote:
>>> What I want to do is to implement a MBean which configure the log4j
>>> system periodicaly with a scheduler. But before I will look if there is
>>> a log4j.xml or log4j.properties in the conf directory if there is
>>> nothing in it then I assume that there is no log4j system and don't
>>> reconfigure log4j (I will give you a better explanation later ;-) ).
>>>
>>> The Problem what I have is to register a MBean in conf/servicemix.xml.
>>> How do I have to do this? I tried this with the spring MBeanExporter but
>>> it doesn't work for me.
>>>
>>> Cheers,
>>> Thomas
>>>
>>>> Btw, if you don't mind, i'd rather have such discussion on
>>>> servicemix-dev / servicemix-users ;-)
>>> No problem at all! If you open the thread...
>>>
>>>>> Cheers,
>>>>> Thomas
>>>>>
>>>>> Guillaume Nodet wrote:
>>>>>> Did you implement something useful ?  Would you
>>>>>> consider giving it back to ServiceMix ?
>>>>>>
>>>>>> On 10/20/06, Thomas TERMIN <tt...@blue-elephant-systems.com> wrote:
>>>>>>> Sorry I did not mean a servicemix component. I use allways the word
>>>>>>> component ;-) since I started working with servicemix. What you
>>>>> said is
>>>>>>> exactly what I meant. So I will have a look on it!
>>>>>>>
>>>>>>> Thanks,
>>>>>>> Thomas
>>>>>>>
>>>>>>> Guillaume Nodet wrote:
>>>>>>>> I would rather use a ServiceMix service instead of
>>>>>>>> a component, as this is more related to management /
>>>>>>>> configuration than a component if I understand you
>>>>>>>> correctly.  ... and use a timer to reload the log4j config.
>>>>>>>> But iirc, log4j already has this feature, we just need to
>>>>>>>> enable it.
>>>>>>>>
>>>>>>>> On 10/20/06, Thomas TERMIN <tt...@blue-elephant-systems.com> wrote:
>>>>>>>>> Hello Guillaume,
>>>>>>>>>
>>>>>>>>> We would need a log4j Component where you can change the debug
>>>>>>> level at
>>>>>>>>> runtime. I would implement a MBean which initialise the log4j
>>>>>>> system at
>>>>>>>>> startup and also have a scheduler which looks if the
>>> log4j.xml has
>>>>>>>>> changed and then reinitialise the log4j system.
>>>>>>>>>
>>>>>>>>> If I would provide you a patch would you accept this in
>>> servicemix?
>>>>>>>>> Cheers,
>>>>>>>>> Thomas Termin
>>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>
> 
> 


Re: log4j

Posted by Thomas TERMIN <tt...@blue-elephant-systems.com>.
I found it. ;-)

I'm implementing at the moment the new service.

Guillaume Nodet wrote:
> Forwarding to the dev list ...
> 
> I think you may want to take a look at how the
> JdbcAuditor, DotViewService or StatisticsService
> are implemented.  They all inherit the
> o.a.s.jbi.management.BaseSystemService
> abstract class.  They come in different flavous wrt configuration however.
> I would recommend to look at the StatisticsService, which can be configured
> that way:
> 
>   <sm:container ...>
>     <sm:services>
>       <sm:statistics .. />
>     </sm:services>
>   </sm:container>
> 
> This way, the service is automatically registered in JMX and has its own
> lifecycle (which is tied to the container), so that you can stop / start
> the
> service from jmx.
> 
> On 1/11/07, Thomas TERMIN <tt...@blue-elephant-systems.com> wrote:
>> What I want to do is to implement a MBean which configure the log4j
>> system periodicaly with a scheduler. But before I will look if there is
>> a log4j.xml or log4j.properties in the conf directory if there is
>> nothing in it then I assume that there is no log4j system and don't
>> reconfigure log4j (I will give you a better explanation later ;-) ).
>>
>> The Problem what I have is to register a MBean in conf/servicemix.xml.
>> How do I have to do this? I tried this with the spring MBeanExporter but
>> it doesn't work for me.
>>
>> Cheers,
>> Thomas
>>
>> >
>> > Btw, if you don't mind, i'd rather have such discussion on
>> > servicemix-dev / servicemix-users ;-)
>> No problem at all! If you open the thread...
>>
>> >
>> >>
>> >> Cheers,
>> >> Thomas
>> >>
>> >> Guillaume Nodet wrote:
>> >> > Did you implement something useful ?  Would you
>> >> > consider giving it back to ServiceMix ?
>> >> >
>> >> > On 10/20/06, Thomas TERMIN <tt...@blue-elephant-systems.com> wrote:
>> >> >> Sorry I did not mean a servicemix component. I use allways the word
>> >> >> component ;-) since I started working with servicemix. What you
>> >> said is
>> >> >> exactly what I meant. So I will have a look on it!
>> >> >>
>> >> >> Thanks,
>> >> >> Thomas
>> >> >>
>> >> >> Guillaume Nodet wrote:
>> >> >> > I would rather use a ServiceMix service instead of
>> >> >> > a component, as this is more related to management /
>> >> >> > configuration than a component if I understand you
>> >> >> > correctly.  ... and use a timer to reload the log4j config.
>> >> >> > But iirc, log4j already has this feature, we just need to
>> >> >> > enable it.
>> >> >> >
>> >> >> > On 10/20/06, Thomas TERMIN <tt...@blue-elephant-systems.com> wrote:
>> >> >> >> Hello Guillaume,
>> >> >> >>
>> >> >> >> We would need a log4j Component where you can change the debug
>> >> >> level at
>> >> >> >> runtime. I would implement a MBean which initialise the log4j
>> >> >> system at
>> >> >> >> startup and also have a scheduler which looks if the
>> log4j.xml has
>> >> >> >> changed and then reinitialise the log4j system.
>> >> >> >>
>> >> >> >> If I would provide you a patch would you accept this in
>> servicemix?
>> >> >> >>
>> >> >> >> Cheers,
>> >> >> >> Thomas Termin
>> >> >> >>
>> >> >> >
>> >> >> >
>> >> >>
>> >> >>
>> >> >
>> >> >
>> >>
>> >>
>> >
>> >
>>
>>
> 
>