You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@servicemix.apache.org by Jie Lee <za...@gmail.com> on 2011/06/09 18:46:19 UTC

Add *Custom Interceptor Chainer* into the interceptor chain of Service Mix for monitoring

Hi,

I'd like to be able to dynamically monitoring different aspects
related to web services (e.g. response time, processing time, availability,
etc). I would like that the set of possible monitoring aspects was an
open end. I mean, I would like to be able to start monitoring something that
wasn't planned before without stopping the service. I did something like
that in the context of DOSGi. In fact, I modified DOSGi  to include a
customized interceptor (that I call the *chainer*) when an endpoint is going
to be published. This interceptor is notified when a new
*monitoring interceptor* (an osgi service) is started and plug it in the
corresponding chain of interceptors. In that way, the next request to this
service will be monitored. Well, I am considering to use the same idea out
of an dosgi environment (however, I am not sure how I could do that). Also,
I plan to plug my chainer interceptor directly to the bus or, add my chainer
interceptor into the interceptor chain of Service Mix, so that the developer
of the services would not be necessarily aware of the monitoring stuff.
Could you please tell me if this idea seems to make sense? Is there some
particular documentation that I could use?

Thank you, very much!

-- 
[]'s

Zan Jie Lee

Re: Add *Custom Interceptor Chainer* into the interceptor chain of Service Mix for monitoring

Posted by "Jamie G." <ja...@gmail.com>.
Try:
http://svn.apache.org/repos/asf/servicemix/smx4/nmr/branches/kernel/examples/interceptors/

It's a bit older, so may be out of date.

Cheers,
Jamie

On Tue, Mar 20, 2012 at 1:59 PM, nathan <su...@gmail.com> wrote:
> Hi Jie,
> I am not able to access
> http://svn.apache.org/repos/asf/servicemix/smx4/nmr/trunk/examples/interceptors/
> has the link being moved.
> Please guide.
>
> Thanks
> Nathan
>
>
> --
> View this message in context: http://servicemix.396122.n5.nabble.com/Add-Custom-Interceptor-Chainer-into-the-interceptor-chain-of-Service-Mix-for-monitoring-tp4473414p5580529.html
> Sent from the ServiceMix - Dev mailing list archive at Nabble.com.

Re: Add *Custom Interceptor Chainer* into the interceptor chain of Service Mix for monitoring

Posted by nathan <su...@gmail.com>.
Hi Jie, 
I am not able to access
http://svn.apache.org/repos/asf/servicemix/smx4/nmr/trunk/examples/interceptors/
has the link being moved.
Please guide.

Thanks
Nathan


--
View this message in context: http://servicemix.396122.n5.nabble.com/Add-Custom-Interceptor-Chainer-into-the-interceptor-chain-of-Service-Mix-for-monitoring-tp4473414p5580529.html
Sent from the ServiceMix - Dev mailing list archive at Nabble.com.

Re: Add *Custom Interceptor Chainer* into the interceptor chain of Service Mix for monitoring

Posted by nathan <su...@gmail.com>.
Is there any example demonstrating use of custom CXF interceptors ?
Also is there is a way of calling a cxf web service from NMR interceptors
exahange methods.(any way to dynamically register and retrieve)
I am very new to servicemix. Please help as I cannot get any right tutorials
to work with. I am using ServiceMix 4.3.0.
Thanks
Nathan

--
View this message in context: http://servicemix.396122.n5.nabble.com/Add-Custom-Interceptor-Chainer-into-the-interceptor-chain-of-Service-Mix-for-monitoring-tp4473414p5580493.html
Sent from the ServiceMix - Dev mailing list archive at Nabble.com.

Re: Add *Custom Interceptor Chainer* into the interceptor chain of Service Mix for monitoring

Posted by Jie Lee <za...@gmail.com>.
So, in the case he doesn't remember to add interceptors in the file, the
service would not be monitored. Another point is that I would like to
configure my chain of interceptors at runtime, and not just at deployment
time, and the webservice must be aware.

Thank you, again!

On Fri, Jun 10, 2011 at 1:43 AM, Freeman Fang <fr...@gmail.com>wrote:

> Hi,
>
> cxf-osgi example doesn't use NMR, it use cxf http-osgi transport(pax-web
> underlying), so NMR interceptor is useless here.
> You can add outgoing/incoming interceptor for the cxf endpoint, just edit
> examples/cxf-osgi/src/main/resources/META-INF/spring/beans.xml
> add
> jaxws:inInterceptors
> or
> jaxws:outInterceptors
> there, you can do everything you want in your customer interceptors, take a
> look at [1] to get more details.
>
> [1]http://cxf.apache.org/docs/jax-ws-configuration.html
> Freeman
>
> On 2011-6-10, at 上午11:59, Jie Lee wrote:
>
>  The interceptor is not called when I call the CXF OSGI example from a
>> browser or a custom client, It seems that it doesn't pass through the nmr.
>> How can I add an interceptor using cxf webservices that are called outside
>> off the servicemix.
>>
>> thanks a lot.
>>
>>
>> On Thu, Jun 9, 2011 at 6:43 PM, Jie Lee <za...@gmail.com> wrote:
>>
>>  SOLVED
>>>
>>>
>>> On Thu, Jun 9, 2011 at 5:10 PM, Jie Lee <za...@gmail.com> wrote:
>>>
>>>  I'm trying to run the example but got this: Error executing command:
>>>> Unresolved constraint in bundle exchange [214]: Unable to resolve 214.0:
>>>> missing requirement [214.0] package;
>>>> (&(package=org.apache.servicemix.nmr.api)(version>=1.5.0))
>>>>
>>>>
>>>> On Thu, Jun 9, 2011 at 1:54 PM, Jean-Baptiste Onofré <jb@nanthrax.net
>>>> >wrote:
>>>>
>>>>  Hi Jie,
>>>>>
>>>>> you have an example of custom interceptor (for both endpoint and
>>>>> exchange), in the ServiceMix NMR module:
>>>>>
>>>>>
>>>>>
>>>>> http://svn.apache.org/repos/asf/servicemix/smx4/nmr/trunk/examples/interceptors/
>>>>>
>>>>> With that you can implement interceptor for auditing or whatever you
>>>>> want.
>>>>>
>>>>> regards
>>>>> JB
>>>>>
>>>>>
>>>>> On 06/09/2011 06:46 PM, Jie Lee wrote:
>>>>>
>>>>>  Hi,
>>>>>>
>>>>>> I'd like to be able to dynamically monitoring different aspects
>>>>>> related to web services (e.g. response time, processing time,
>>>>>> availability,
>>>>>> etc). I would like that the set of possible monitoring aspects was an
>>>>>> open end. I mean, I would like to be able to start monitoring
>>>>>> something
>>>>>> that
>>>>>> wasn't planned before without stopping the service. I did something
>>>>>> like
>>>>>> that in the context of DOSGi. In fact, I modified DOSGi  to include a
>>>>>> customized interceptor (that I call the *chainer*) when an endpoint is
>>>>>> going
>>>>>> to be published. This interceptor is notified when a new
>>>>>> *monitoring interceptor* (an osgi service) is started and plug it in
>>>>>> the
>>>>>> corresponding chain of interceptors. In that way, the next request to
>>>>>> this
>>>>>> service will be monitored. Well, I am considering to use the same idea
>>>>>> out
>>>>>> of an dosgi environment (however, I am not sure how I could do that).
>>>>>> Also,
>>>>>> I plan to plug my chainer interceptor directly to the bus or, add my
>>>>>> chainer
>>>>>> interceptor into the interceptor chain of Service Mix, so that the
>>>>>> developer
>>>>>> of the services would not be necessarily aware of the monitoring
>>>>>> stuff.
>>>>>> Could you please tell me if this idea seems to make sense? Is there
>>>>>> some
>>>>>> particular documentation that I could use?
>>>>>>
>>>>>> Thank you, very much!
>>>>>>
>>>>>>
>>>>>>
>>>>
>>>> --
>>>> []'s
>>>>
>>>> Zan Jie Lee
>>>>
>>>>
>>>
>>>
>>> --
>>> []'s
>>>
>>> Zan Jie Lee
>>>
>>>
>>
>>
>> --
>> []'s
>>
>> Zan Jie Lee
>>
>
> ---------------------------------------------
> Freeman Fang
>
> FuseSource
> Email:ffang@fusesource.com
> Web: fusesource.com
> Twitter: freemanfang
> Blog: http://freemanfang.blogspot.com
>
>
>
>
>
>
>
>
>
>


-- 
[]'s

Zan Jie Lee

Re: Add *Custom Interceptor Chainer* into the interceptor chain of Service Mix for monitoring

Posted by Freeman Fang <fr...@gmail.com>.
Hi,

cxf-osgi example doesn't use NMR, it use cxf http-osgi transport(pax- 
web underlying), so NMR interceptor is useless here.
You can add outgoing/incoming interceptor for the cxf endpoint, just  
edit
examples/cxf-osgi/src/main/resources/META-INF/spring/beans.xml
add
jaxws:inInterceptors
or
jaxws:outInterceptors
there, you can do everything you want in your customer interceptors,  
take a look at [1] to get more details.

[1]http://cxf.apache.org/docs/jax-ws-configuration.html
Freeman
On 2011-6-10, at 上午11:59, Jie Lee wrote:

> The interceptor is not called when I call the CXF OSGI example from a
> browser or a custom client, It seems that it doesn't pass through  
> the nmr.
> How can I add an interceptor using cxf webservices that are called  
> outside
> off the servicemix.
>
> thanks a lot.
>
>
> On Thu, Jun 9, 2011 at 6:43 PM, Jie Lee <za...@gmail.com> wrote:
>
>> SOLVED
>>
>>
>> On Thu, Jun 9, 2011 at 5:10 PM, Jie Lee <za...@gmail.com>  
>> wrote:
>>
>>> I'm trying to run the example but got this: Error executing command:
>>> Unresolved constraint in bundle exchange [214]: Unable to resolve  
>>> 214.0:
>>> missing requirement [214.0] package;
>>> (&(package=org.apache.servicemix.nmr.api)(version>=1.5.0))
>>>
>>>
>>> On Thu, Jun 9, 2011 at 1:54 PM, Jean-Baptiste Onofré <jb@nanthrax.ne 
>>> t>wrote:
>>>
>>>> Hi Jie,
>>>>
>>>> you have an example of custom interceptor (for both endpoint and
>>>> exchange), in the ServiceMix NMR module:
>>>>
>>>>
>>>> http://svn.apache.org/repos/asf/servicemix/smx4/nmr/trunk/examples/interceptors/
>>>>
>>>> With that you can implement interceptor for auditing or whatever  
>>>> you
>>>> want.
>>>>
>>>> regards
>>>> JB
>>>>
>>>>
>>>> On 06/09/2011 06:46 PM, Jie Lee wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>> I'd like to be able to dynamically monitoring different aspects
>>>>> related to web services (e.g. response time, processing time,
>>>>> availability,
>>>>> etc). I would like that the set of possible monitoring aspects  
>>>>> was an
>>>>> open end. I mean, I would like to be able to start monitoring  
>>>>> something
>>>>> that
>>>>> wasn't planned before without stopping the service. I did  
>>>>> something like
>>>>> that in the context of DOSGi. In fact, I modified DOSGi  to  
>>>>> include a
>>>>> customized interceptor (that I call the *chainer*) when an  
>>>>> endpoint is
>>>>> going
>>>>> to be published. This interceptor is notified when a new
>>>>> *monitoring interceptor* (an osgi service) is started and plug  
>>>>> it in the
>>>>> corresponding chain of interceptors. In that way, the next  
>>>>> request to
>>>>> this
>>>>> service will be monitored. Well, I am considering to use the  
>>>>> same idea
>>>>> out
>>>>> of an dosgi environment (however, I am not sure how I could do  
>>>>> that).
>>>>> Also,
>>>>> I plan to plug my chainer interceptor directly to the bus or,  
>>>>> add my
>>>>> chainer
>>>>> interceptor into the interceptor chain of Service Mix, so that the
>>>>> developer
>>>>> of the services would not be necessarily aware of the monitoring  
>>>>> stuff.
>>>>> Could you please tell me if this idea seems to make sense? Is  
>>>>> there some
>>>>> particular documentation that I could use?
>>>>>
>>>>> Thank you, very much!
>>>>>
>>>>>
>>>
>>>
>>> --
>>> []'s
>>>
>>> Zan Jie Lee
>>>
>>
>>
>>
>> --
>> []'s
>>
>> Zan Jie Lee
>>
>
>
>
> -- 
> []'s
>
> Zan Jie Lee

---------------------------------------------
Freeman Fang

FuseSource
Email:ffang@fusesource.com
Web: fusesource.com
Twitter: freemanfang
Blog: http://freemanfang.blogspot.com










Re: Add *Custom Interceptor Chainer* into the interceptor chain of Service Mix for monitoring

Posted by Jie Lee <za...@gmail.com>.
The interceptor is not called when I call the CXF OSGI example from a
browser or a custom client, It seems that it doesn't pass through the nmr.
How can I add an interceptor using cxf webservices that are called outside
off the servicemix.

thanks a lot.


On Thu, Jun 9, 2011 at 6:43 PM, Jie Lee <za...@gmail.com> wrote:

> SOLVED
>
>
> On Thu, Jun 9, 2011 at 5:10 PM, Jie Lee <za...@gmail.com> wrote:
>
>> I'm trying to run the example but got this: Error executing command:
>> Unresolved constraint in bundle exchange [214]: Unable to resolve 214.0:
>> missing requirement [214.0] package;
>> (&(package=org.apache.servicemix.nmr.api)(version>=1.5.0))
>>
>>
>> On Thu, Jun 9, 2011 at 1:54 PM, Jean-Baptiste Onofré <jb...@nanthrax.net>wrote:
>>
>>> Hi Jie,
>>>
>>> you have an example of custom interceptor (for both endpoint and
>>> exchange), in the ServiceMix NMR module:
>>>
>>>
>>> http://svn.apache.org/repos/asf/servicemix/smx4/nmr/trunk/examples/interceptors/
>>>
>>> With that you can implement interceptor for auditing or whatever you
>>> want.
>>>
>>> regards
>>> JB
>>>
>>>
>>> On 06/09/2011 06:46 PM, Jie Lee wrote:
>>>
>>>> Hi,
>>>>
>>>> I'd like to be able to dynamically monitoring different aspects
>>>> related to web services (e.g. response time, processing time,
>>>> availability,
>>>> etc). I would like that the set of possible monitoring aspects was an
>>>> open end. I mean, I would like to be able to start monitoring something
>>>> that
>>>> wasn't planned before without stopping the service. I did something like
>>>> that in the context of DOSGi. In fact, I modified DOSGi  to include a
>>>> customized interceptor (that I call the *chainer*) when an endpoint is
>>>> going
>>>> to be published. This interceptor is notified when a new
>>>> *monitoring interceptor* (an osgi service) is started and plug it in the
>>>> corresponding chain of interceptors. In that way, the next request to
>>>> this
>>>> service will be monitored. Well, I am considering to use the same idea
>>>> out
>>>> of an dosgi environment (however, I am not sure how I could do that).
>>>> Also,
>>>> I plan to plug my chainer interceptor directly to the bus or, add my
>>>> chainer
>>>> interceptor into the interceptor chain of Service Mix, so that the
>>>> developer
>>>> of the services would not be necessarily aware of the monitoring stuff.
>>>> Could you please tell me if this idea seems to make sense? Is there some
>>>> particular documentation that I could use?
>>>>
>>>> Thank you, very much!
>>>>
>>>>
>>
>>
>> --
>> []'s
>>
>> Zan Jie Lee
>>
>
>
>
> --
> []'s
>
> Zan Jie Lee
>



-- 
[]'s

Zan Jie Lee

Re: Add *Custom Interceptor Chainer* into the interceptor chain of Service Mix for monitoring

Posted by Jie Lee <za...@gmail.com>.
SOLVED

On Thu, Jun 9, 2011 at 5:10 PM, Jie Lee <za...@gmail.com> wrote:

> I'm trying to run the example but got this: Error executing command:
> Unresolved constraint in bundle exchange [214]: Unable to resolve 214.0:
> missing requirement [214.0] package;
> (&(package=org.apache.servicemix.nmr.api)(version>=1.5.0))
>
>
> On Thu, Jun 9, 2011 at 1:54 PM, Jean-Baptiste Onofré <jb...@nanthrax.net>wrote:
>
>> Hi Jie,
>>
>> you have an example of custom interceptor (for both endpoint and
>> exchange), in the ServiceMix NMR module:
>>
>>
>> http://svn.apache.org/repos/asf/servicemix/smx4/nmr/trunk/examples/interceptors/
>>
>> With that you can implement interceptor for auditing or whatever you want.
>>
>> regards
>> JB
>>
>>
>> On 06/09/2011 06:46 PM, Jie Lee wrote:
>>
>>> Hi,
>>>
>>> I'd like to be able to dynamically monitoring different aspects
>>> related to web services (e.g. response time, processing time,
>>> availability,
>>> etc). I would like that the set of possible monitoring aspects was an
>>> open end. I mean, I would like to be able to start monitoring something
>>> that
>>> wasn't planned before without stopping the service. I did something like
>>> that in the context of DOSGi. In fact, I modified DOSGi  to include a
>>> customized interceptor (that I call the *chainer*) when an endpoint is
>>> going
>>> to be published. This interceptor is notified when a new
>>> *monitoring interceptor* (an osgi service) is started and plug it in the
>>> corresponding chain of interceptors. In that way, the next request to
>>> this
>>> service will be monitored. Well, I am considering to use the same idea
>>> out
>>> of an dosgi environment (however, I am not sure how I could do that).
>>> Also,
>>> I plan to plug my chainer interceptor directly to the bus or, add my
>>> chainer
>>> interceptor into the interceptor chain of Service Mix, so that the
>>> developer
>>> of the services would not be necessarily aware of the monitoring stuff.
>>> Could you please tell me if this idea seems to make sense? Is there some
>>> particular documentation that I could use?
>>>
>>> Thank you, very much!
>>>
>>>
>
>
> --
> []'s
>
> Zan Jie Lee
>



-- 
[]'s

Zan Jie Lee

Re: Add *Custom Interceptor Chainer* into the interceptor chain of Service Mix for monitoring

Posted by Jie Lee <za...@gmail.com>.
I'm trying to run the example but got this: Error executing command:
Unresolved constraint in bundle exchange [214]: Unable to resolve 214.0:
missing requirement [214.0] package;
(&(package=org.apache.servicemix.nmr.api)(version>=1.5.0))

On Thu, Jun 9, 2011 at 1:54 PM, Jean-Baptiste Onofré <jb...@nanthrax.net>wrote:

> Hi Jie,
>
> you have an example of custom interceptor (for both endpoint and exchange),
> in the ServiceMix NMR module:
>
>
> http://svn.apache.org/repos/asf/servicemix/smx4/nmr/trunk/examples/interceptors/
>
> With that you can implement interceptor for auditing or whatever you want.
>
> regards
> JB
>
>
> On 06/09/2011 06:46 PM, Jie Lee wrote:
>
>> Hi,
>>
>> I'd like to be able to dynamically monitoring different aspects
>> related to web services (e.g. response time, processing time,
>> availability,
>> etc). I would like that the set of possible monitoring aspects was an
>> open end. I mean, I would like to be able to start monitoring something
>> that
>> wasn't planned before without stopping the service. I did something like
>> that in the context of DOSGi. In fact, I modified DOSGi  to include a
>> customized interceptor (that I call the *chainer*) when an endpoint is
>> going
>> to be published. This interceptor is notified when a new
>> *monitoring interceptor* (an osgi service) is started and plug it in the
>> corresponding chain of interceptors. In that way, the next request to this
>> service will be monitored. Well, I am considering to use the same idea out
>> of an dosgi environment (however, I am not sure how I could do that).
>> Also,
>> I plan to plug my chainer interceptor directly to the bus or, add my
>> chainer
>> interceptor into the interceptor chain of Service Mix, so that the
>> developer
>> of the services would not be necessarily aware of the monitoring stuff.
>> Could you please tell me if this idea seems to make sense? Is there some
>> particular documentation that I could use?
>>
>> Thank you, very much!
>>
>>


-- 
[]'s

Zan Jie Lee

Re: Add *Custom Interceptor Chainer* into the interceptor chain of Service Mix for monitoring

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi Jie,

you have an example of custom interceptor (for both endpoint and 
exchange), in the ServiceMix NMR module:

http://svn.apache.org/repos/asf/servicemix/smx4/nmr/trunk/examples/interceptors/

With that you can implement interceptor for auditing or whatever you want.

regards
JB

On 06/09/2011 06:46 PM, Jie Lee wrote:
> Hi,
>
> I'd like to be able to dynamically monitoring different aspects
> related to web services (e.g. response time, processing time, availability,
> etc). I would like that the set of possible monitoring aspects was an
> open end. I mean, I would like to be able to start monitoring something that
> wasn't planned before without stopping the service. I did something like
> that in the context of DOSGi. In fact, I modified DOSGi  to include a
> customized interceptor (that I call the *chainer*) when an endpoint is going
> to be published. This interceptor is notified when a new
> *monitoring interceptor* (an osgi service) is started and plug it in the
> corresponding chain of interceptors. In that way, the next request to this
> service will be monitored. Well, I am considering to use the same idea out
> of an dosgi environment (however, I am not sure how I could do that). Also,
> I plan to plug my chainer interceptor directly to the bus or, add my chainer
> interceptor into the interceptor chain of Service Mix, so that the developer
> of the services would not be necessarily aware of the monitoring stuff.
> Could you please tell me if this idea seems to make sense? Is there some
> particular documentation that I could use?
>
> Thank you, very much!
>