You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by Benoît Clouet <be...@gmail.com> on 2008/08/06 08:20:33 UTC

Extending the FileAuditor

Hello and sorry for my previous mail I fired a bit too fast.

I would like to extend the FileAuditor in a way that would allow it to  
be re-used in the audit page of the servicemix web console. Does  
anybody has some ideas on the way t'on do it? Is there any  
documentation that could help me to achieve this?

Thanks in advance for your ideas.

Benoît 

Re: Extending the FileAuditor

Posted by Gert Vanthienen <ge...@skynet.be>.
Benoit, Manuel,

The FileAuditor was just a very simple, basic implementation of an 
AbstractAuditor that was built more for educational purposes than 
anything else.  It can certainly use a lot of the improvements you 
mentioned in this thread (integration with the web console, filling in 
the missing methods, ...) and we would welcome any contribution here.  
Just raise a JIRA for a particular feature and add a patch and I will 
happily review and commit those.  Also, don't hesitate to ask if you 
need any help...

Regards,

Gert

Benoît Clouet wrote:
>
> Le 6 août 08 à 20:28, "Manuel EVENO" <ma...@gmail.com> a écrit :
>
>> On Wed, Aug 6, 2008 at 8:11 PM, Benoît Clouet 
>> <be...@gmail.com>wrote:
>>
>>> In fact, in an enterprise development I fond much simpler and more 
>>> robust
>>> to have to deal with files than with a db.
>>>
>>> For example, how do you delete some old aged exchanges traces with the
>>> embedded DB to avoid fs saturation and some loss of performance? I 
>>> suppose I
>>> have to write some java program to do so what I don't want to.
>>>
>>
>>
>> Don't you think you will need to make a development to handle the 
>> file purge
>> (probably a shell-script)
>> The db purge can be done with shell scripts too ...
>
> For sure I will have to write a shell script for doing so. But FS 
> access seems much simpler than DB access, at least when done by our 
> overbooked IT operation guys.
>
>>
>>>
>>> Moreover, I had some bad experience while doing some tests on 
>>> servicemix
>>> examples. Servicemix refused some time to start, complaining db wasn't
>>> accessible. An issue easy to solve in dev phase (you just delete the 
>>> data
>>> dir and restart) but what happens if your business user wants to 
>>> keep audit
>>> track?
>>>
>>
>> Yes it is a fact ..
>>
>>>
>>> Maybe you have some alternate idea or experience to share?
>>
>>
>> You can use the same starting point of File and Jdbc Auditor by 
>> extending
>> BaseSystemService (which gives you JMX exposition)
>> and implements ExchangeListener interface to be aware of message 
>> exchange.
> I had a quick look a this and in the last version (3.2.2) it seems 
> that JMX exposition is already present, there are just a few 
> modification to do in the applicationContext.xml and 
> servicemix-webconsole.properties to expose all these JMX stuff.
>
> The point is that most interresting methods are just stubs throwing a 
> non-implemented exception and that I would like to fill the gaps to 
> make this work. Thus our business users would gain a nice execution 
> flow monitoring interface at a very fair price.
>
> Maybe someone on the list has got any figures on the way the creator 
> of this nice tool would like it to be done. By the way, I also noticed 
> a Lucene entry point. Do these things could be combined? This way, one 
> would have best of both worlds, fast search capabilities and 
> enterprise class robustness.
>
> Benoît
>>
>> This is what I've done to implement my custom needs but we keep the db
>> storage as we are used to handle this.
>>
>> Manuel
>>
>>>
>>> Benoît
>>>
>>> Le 6 août 08 à 19:42, "Manuel EVENO" <ma...@gmail.com> a écrit :
>>>
>>>
>>> Can't you use the JdbcAuditor instead ?
>>>>
>>>> Manuel
>>>>
>>>> On Wed, Aug 6, 2008 at 8:20 AM, Benoît Clouet <benoit.clouet@gmail.com
>>>>> wrote:
>>>>
>>>> Hello and sorry for my previous mail I fired a bit too fast.
>>>>>
>>>>> I would like to extend the FileAuditor in a way that would allow 
>>>>> it to be
>>>>> re-used in the audit page of the servicemix web console. Does 
>>>>> anybody has
>>>>> some ideas on the way t'on do it? Is there any documentation that 
>>>>> could
>>>>> help
>>>>> me to achieve this?
>>>>>
>>>>> Thanks in advance for your ideas.
>>>>>
>>>>> Benoît
>>>>>
>>>>
>


Re: Extending the FileAuditor

Posted by Benoît Clouet <be...@gmail.com>.
Le 6 août 08 à 20:28, "Manuel EVENO" <ma...@gmail.com> a  
écrit :

> On Wed, Aug 6, 2008 at 8:11 PM, Benoît Clouet <benoit.clouet@gmail.c 
> om>wrote:
>
>> In fact, in an enterprise development I fond much simpler and more  
>> robust
>> to have to deal with files than with a db.
>>
>> For example, how do you delete some old aged exchanges traces with  
>> the
>> embedded DB to avoid fs saturation and some loss of performance? I  
>> suppose I
>> have to write some java program to do so what I don't want to.
>>
>
>
> Don't you think you will need to make a development to handle the  
> file purge
> (probably a shell-script)
> The db purge can be done with shell scripts too ...

For sure I will have to write a shell script for doing so. But FS  
access seems much simpler than DB access, at least when done by our  
overbooked IT operation guys.

>
>>
>> Moreover, I had some bad experience while doing some tests on  
>> servicemix
>> examples. Servicemix refused some time to start, complaining db  
>> wasn't
>> accessible. An issue easy to solve in dev phase (you just delete  
>> the data
>> dir and restart) but what happens if your business user wants to  
>> keep audit
>> track?
>>
>
> Yes it is a fact ..
>
>>
>> Maybe you have some alternate idea or experience to share?
>
>
> You can use the same starting point of File and Jdbc Auditor by  
> extending
> BaseSystemService (which gives you JMX exposition)
> and implements ExchangeListener interface to be aware of message  
> exchange.
I had a quick look a this and in the last version (3.2.2) it seems  
that JMX exposition is already present, there are just a few  
modification to do in the applicationContext.xml and servicemix- 
webconsole.properties to expose all these JMX stuff.

The point is that most interresting methods are just stubs throwing a  
non-implemented exception and that I would like to fill the gaps to  
make this work. Thus our business users would gain a nice execution  
flow monitoring interface at a very fair price.

Maybe someone on the list has got any figures on the way the creator  
of this nice tool would like it to be done. By the way, I also noticed  
a Lucene entry point. Do these things could be combined? This way, one  
would have best of both worlds, fast search capabilities and  
enterprise class robustness.

Benoît
>
> This is what I've done to implement my custom needs but we keep the db
> storage as we are used to handle this.
>
> Manuel
>
>>
>> Benoît
>>
>> Le 6 août 08 à 19:42, "Manuel EVENO" <ma...@gmail.com> a éc 
>> rit :
>>
>>
>> Can't you use the JdbcAuditor instead ?
>>>
>>> Manuel
>>>
>>> On Wed, Aug 6, 2008 at 8:20 AM, Benoît Clouet <benoit.clouet@gmail.co 
>>> m
>>>> wrote:
>>>
>>> Hello and sorry for my previous mail I fired a bit too fast.
>>>>
>>>> I would like to extend the FileAuditor in a way that would allow  
>>>> it to be
>>>> re-used in the audit page of the servicemix web console. Does  
>>>> anybody has
>>>> some ideas on the way t'on do it? Is there any documentation that  
>>>> could
>>>> help
>>>> me to achieve this?
>>>>
>>>> Thanks in advance for your ideas.
>>>>
>>>> Benoît
>>>>
>>>

Re: Extending the FileAuditor

Posted by Manuel EVENO <ma...@gmail.com>.
On Wed, Aug 6, 2008 at 8:11 PM, Benoît Clouet <be...@gmail.com>wrote:

> In fact, in an enterprise development I fond much simpler and more robust
> to have to deal with files than with a db.
>
> For example, how do you delete some old aged exchanges traces with the
> embedded DB to avoid fs saturation and some loss of performance? I suppose I
> have to write some java program to do so what I don't want to.
>


Don't you think you will need to make a development to handle the file purge
(probably a shell-script)
The db purge can be done with shell scripts too ...

>
>  Moreover, I had some bad experience while doing some tests on servicemix
> examples. Servicemix refused some time to start, complaining db wasn't
> accessible. An issue easy to solve in dev phase (you just delete the data
> dir and restart) but what happens if your business user wants to keep audit
> track?
>

Yes it is a fact ..

>
> Maybe you have some alternate idea or experience to share?


You can use the same starting point of File and Jdbc Auditor by extending
BaseSystemService (which gives you JMX exposition)
and implements ExchangeListener interface to be aware of message exchange.
This is what I've done to implement my custom needs but we keep the db
storage as we are used to handle this.

Manuel

>
> Benoît
>
> Le 6 août 08 à 19:42, "Manuel EVENO" <ma...@gmail.com> a écrit :
>
>
>  Can't you use the JdbcAuditor instead ?
>>
>> Manuel
>>
>> On Wed, Aug 6, 2008 at 8:20 AM, Benoît Clouet <benoit.clouet@gmail.com
>> >wrote:
>>
>>  Hello and sorry for my previous mail I fired a bit too fast.
>>>
>>> I would like to extend the FileAuditor in a way that would allow it to be
>>> re-used in the audit page of the servicemix web console. Does anybody has
>>> some ideas on the way t'on do it? Is there any documentation that could
>>> help
>>> me to achieve this?
>>>
>>> Thanks in advance for your ideas.
>>>
>>> Benoît
>>>
>>

Re: Extending the FileAuditor

Posted by Benoît Clouet <be...@gmail.com>.
In fact, in an enterprise development I fond much simpler and more  
robust to have to deal with files than with a db.

For example, how do you delete some old aged exchanges traces with the  
embedded DB to avoid fs saturation and some loss of performance? I  
suppose I have to write some java program to do so what I don't want to.

  Moreover, I had some bad experience while doing some tests on  
servicemix examples. Servicemix refused some time to start,  
complaining db wasn't accessible. An issue easy to solve in dev phase  
(you just delete the data dir and restart) but what happens if your  
business user wants to keep audit track?

Maybe you have some alternate idea or experience to share?
Benoît

Le 6 août 08 à 19:42, "Manuel EVENO" <ma...@gmail.com> a  
écrit :

> Can't you use the JdbcAuditor instead ?
>
> Manuel
>
> On Wed, Aug 6, 2008 at 8:20 AM, Benoît Clouet <benoit.clouet@gmail.c 
> om>wrote:
>
>> Hello and sorry for my previous mail I fired a bit too fast.
>>
>> I would like to extend the FileAuditor in a way that would allow it  
>> to be
>> re-used in the audit page of the servicemix web console. Does  
>> anybody has
>> some ideas on the way t'on do it? Is there any documentation that  
>> could help
>> me to achieve this?
>>
>> Thanks in advance for your ideas.
>>
>> Benoît

Re: Extending the FileAuditor

Posted by Manuel EVENO <ma...@gmail.com>.
Can't you use the JdbcAuditor instead ?

Manuel

On Wed, Aug 6, 2008 at 8:20 AM, Benoît Clouet <be...@gmail.com>wrote:

> Hello and sorry for my previous mail I fired a bit too fast.
>
> I would like to extend the FileAuditor in a way that would allow it to be
> re-used in the audit page of the servicemix web console. Does anybody has
> some ideas on the way t'on do it? Is there any documentation that could help
> me to achieve this?
>
> Thanks in advance for your ideas.
>
> Benoît