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 <[EMAIL PROTECTED]> 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 <[EMAIL PROTECTED]> 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 <[EMAIL PROTECTED]> 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 >>>>>>>>> >>>>>>>> >>>>>>> >>>>>> >>>>> >>>> >>> >> > >