You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@servicemix.apache.org by Thomas Termin <tt...@blue-elephant-systems.com> on 2008/09/04 17:55:18 UTC

Re: question about implementation

Hello Guillaume,

Checked the implementation again. When servicemix is used as we use it
than we have for each component e.g. eip, ftp, file and so on one thread
who is polling every second and never get an exchange because of seda
but consumes cpu every second. Would you agree to say that we can avoid
this with the Long.MAX_VALUE. I tested id and it worked. So it might be
not to bad to make this configurable, doesn't it?

Cheers
Thomas

Guillaume Nodet wrote:
> Yes, but the threads are created by the SEDA flow, and each message is
> given directly to the JBI components.
> 
> On Thu, Aug 28, 2008 at 1:58 PM, Thomas Termin
> <tt...@blue-elephant-systems.com> wrote:
> 
>>Guillaume Nodet wrote:
>>
>>>Yes, you're right.  We may want to increase this timeout.
>>>However, when deployed in ServiceMix 3, the components do not use this
>>>code, as exchanges are given directly to the components through the
>>>MessageExchangeListener interface.  So such code is only executed in
>>>ServiceMix 4 and in other JBI containers.
>>
>>Are you sure? You know we still use servicemix 3 and we have lot of
>>threads polling.
>>
>>Cheers
>>Thomas
>>
>>
>>>On Thu, Aug 28, 2008 at 10:50 AM, Thomas Termin
>>><tt...@blue-elephant-systems.com> wrote:
>>>
>>>
>>>>Hello,
>>>>
>>>>Is there a special reason, that the polling timeout in
>>>>AsyncBaseLifeCycle.pollDeliveryChannel is just a second? That sounds a
>>>>bit like busy waiting, doesn't it.
>>>>
>>>>AsyncBaseLifeCycle
>>>>
>>>>protected void pollDeliveryChannel() {
>>>>      synchronized (polling) {
>>>>          polling.set(true);
>>>>          polling.notify();
>>>>      }
>>>>      while (running.get()) {
>>>>      ........
>>>>              final MessageExchange exchange = channel.accept(1000L);
>>>>      ........
>>>>
>>>>in DeliveryChannelImpl
>>>>
>>>> public MessageExchange accept(long timeoutMS) throws MessagingException {
>>>>      .......
>>>>          MessageExchangeImpl me = queue.poll(timeoutMS,
>>>>TimeUnit.MILLISECONDS);
>>>>      .......
>>>>
>>>>Could it not be blocked for a longer time in poll? If there are no
>>>>exchanges we don't have to do anything there, right?
>>>>
>>>>Cheers,
>>>>Thomas
>>>>--
>>>>Thomas Termin
>>>>_______________________________
>>>>blue elephant systems GmbH
>>>>Wollgrasweg 49
>>>>D-70599 Stuttgart
>>>>
>>>>Tel    :  (+49) 0711 - 45 10 17 676
>>>>Fax    :  (+49) 0711 - 45 10 17 573
>>>>WWW    :  http://www.blue-elephant-systems.com
>>>>Email  :  Thomas.Termin@blue-elephant-systems.com
>>>>
>>>>blue elephant systems GmbH
>>>>Firmensitz      : Wollgrasweg 49, D-70599 Stuttgart
>>>>Registergericht : Amtsgericht Stuttgart, HRB 24106
>>>>Geschäftsführer : Holger Dietrich, Thomas Gentsch, Joachim Hoernle
>>>>
>>>>
>>>>
>>>
>>>
>>>
>>>
>>
>>--
>>Thomas Termin
>>_______________________________
>>blue elephant systems GmbH
>>Wollgrasweg 49
>>D-70599 Stuttgart
>>
>>Tel    :  (+49) 0711 - 45 10 17 676
>>Fax    :  (+49) 0711 - 45 10 17 573
>>WWW    :  http://www.blue-elephant-systems.com
>>Email  :  Thomas.Termin@blue-elephant-systems.com
>>
>>blue elephant systems GmbH
>>Firmensitz      : Wollgrasweg 49, D-70599 Stuttgart
>>Registergericht : Amtsgericht Stuttgart, HRB 24106
>>Geschäftsführer : Holger Dietrich, Thomas Gentsch, Joachim Hoernle
>>
>>
> 
> 
> 
> 


-- 
Thomas Termin
_______________________________
blue elephant systems GmbH
Wollgrasweg 49
D-70599 Stuttgart

Tel    :  (+49) 0711 - 45 10 17 676
Fax    :  (+49) 0711 - 45 10 17 573
WWW    :  http://www.blue-elephant-systems.com
Email  :  Thomas.Termin@blue-elephant-systems.com

blue elephant systems GmbH
Firmensitz      : Wollgrasweg 49, D-70599 Stuttgart
Registergericht : Amtsgericht Stuttgart, HRB 24106
Geschäftsführer : Holger Dietrich, Thomas Gentsch, Joachim Hoernle


Re: question about implementation

Posted by Guillaume Nodet <gn...@gmail.com>.
The behavior is not specific to the SEDA flow, but rather for
ServiceMix 3 in general.  What could be done is to test in the
AsyncBasLifeCycle#doStart() method if the container is servicemix 3:
   if (container.getType() != Container.Type.ServiceMix3) {
      // start polling
  }
The container stuff is only available in the latest servicemix-common
that has been moved out of the smx3 trunk.

On Tue, Sep 9, 2008 at 9:34 AM, Thomas Termin
<tt...@blue-elephant-systems.com> wrote:
> What do you think should we use for the timeout. What I would like is to
> don't create the threads if seda is used. Is it possible to access the
> flow name in AbstractBaseLifeCyle somehow?
>
> Cheers
> Thomas
>
> Guillaume Nodet wrote:
>> You're right !
>>
>> On Thu, Sep 4, 2008 at 5:55 PM, Thomas Termin
>> <tt...@blue-elephant-systems.com> wrote:
>>
>>>Hello Guillaume,
>>>
>>>Checked the implementation again. When servicemix is used as we use it
>>>than we have for each component e.g. eip, ftp, file and so on one thread
>>>who is polling every second and never get an exchange because of seda
>>>but consumes cpu every second. Would you agree to say that we can avoid
>>>this with the Long.MAX_VALUE. I tested id and it worked. So it might be
>>>not to bad to make this configurable, doesn't it?
>>>
>>>Cheers
>>>Thomas
>>>
>>>Guillaume Nodet wrote:
>>>
>>>>Yes, but the threads are created by the SEDA flow, and each message is
>>>>given directly to the JBI components.
>>>>
>>>>On Thu, Aug 28, 2008 at 1:58 PM, Thomas Termin
>>>><tt...@blue-elephant-systems.com> wrote:
>>>>
>>>>
>>>>>Guillaume Nodet wrote:
>>>>>
>>>>>
>>>>>>Yes, you're right.  We may want to increase this timeout.
>>>>>>However, when deployed in ServiceMix 3, the components do not use this
>>>>>>code, as exchanges are given directly to the components through the
>>>>>>MessageExchangeListener interface.  So such code is only executed in
>>>>>>ServiceMix 4 and in other JBI containers.
>>>>>
>>>>>Are you sure? You know we still use servicemix 3 and we have lot of
>>>>>threads polling.
>>>>>
>>>>>Cheers
>>>>>Thomas
>>>>>
>>>>>
>>>>>
>>>>>>On Thu, Aug 28, 2008 at 10:50 AM, Thomas Termin
>>>>>><tt...@blue-elephant-systems.com> wrote:
>>>>>>
>>>>>>
>>>>>>
>>>>>>>Hello,
>>>>>>>
>>>>>>>Is there a special reason, that the polling timeout in
>>>>>>>AsyncBaseLifeCycle.pollDeliveryChannel is just a second? That sounds a
>>>>>>>bit like busy waiting, doesn't it.
>>>>>>>
>>>>>>>AsyncBaseLifeCycle
>>>>>>>
>>>>>>>protected void pollDeliveryChannel() {
>>>>>>>     synchronized (polling) {
>>>>>>>         polling.set(true);
>>>>>>>         polling.notify();
>>>>>>>     }
>>>>>>>     while (running.get()) {
>>>>>>>     ........
>>>>>>>             final MessageExchange exchange = channel.accept(1000L);
>>>>>>>     ........
>>>>>>>
>>>>>>>in DeliveryChannelImpl
>>>>>>>
>>>>>>>public MessageExchange accept(long timeoutMS) throws MessagingException {
>>>>>>>     .......
>>>>>>>         MessageExchangeImpl me = queue.poll(timeoutMS,
>>>>>>>TimeUnit.MILLISECONDS);
>>>>>>>     .......
>>>>>>>
>>>>>>>Could it not be blocked for a longer time in poll? If there are no
>>>>>>>exchanges we don't have to do anything there, right?
>>>>>>>
>>>>>>>Cheers,
>>>>>>>Thomas
>>>>>>>--
>>>>>>>Thomas Termin
>>>>>>>_______________________________
>>>>>>>blue elephant systems GmbH
>>>>>>>Wollgrasweg 49
>>>>>>>D-70599 Stuttgart
>>>>>>>
>>>>>>>Tel    :  (+49) 0711 - 45 10 17 676
>>>>>>>Fax    :  (+49) 0711 - 45 10 17 573
>>>>>>>WWW    :  http://www.blue-elephant-systems.com
>>>>>>>Email  :  Thomas.Termin@blue-elephant-systems.com
>>>>>>>
>>>>>>>blue elephant systems GmbH
>>>>>>>Firmensitz      : Wollgrasweg 49, D-70599 Stuttgart
>>>>>>>Registergericht : Amtsgericht Stuttgart, HRB 24106
>>>>>>>Geschäftsführer : Holger Dietrich, Thomas Gentsch, Joachim Hoernle
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>--
>>>>>Thomas Termin
>>>>>_______________________________
>>>>>blue elephant systems GmbH
>>>>>Wollgrasweg 49
>>>>>D-70599 Stuttgart
>>>>>
>>>>>Tel    :  (+49) 0711 - 45 10 17 676
>>>>>Fax    :  (+49) 0711 - 45 10 17 573
>>>>>WWW    :  http://www.blue-elephant-systems.com
>>>>>Email  :  Thomas.Termin@blue-elephant-systems.com
>>>>>
>>>>>blue elephant systems GmbH
>>>>>Firmensitz      : Wollgrasweg 49, D-70599 Stuttgart
>>>>>Registergericht : Amtsgericht Stuttgart, HRB 24106
>>>>>Geschäftsführer : Holger Dietrich, Thomas Gentsch, Joachim Hoernle
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>>
>>>
>>>--
>>>Thomas Termin
>>>_______________________________
>>>blue elephant systems GmbH
>>>Wollgrasweg 49
>>>D-70599 Stuttgart
>>>
>>>Tel    :  (+49) 0711 - 45 10 17 676
>>>Fax    :  (+49) 0711 - 45 10 17 573
>>>WWW    :  http://www.blue-elephant-systems.com
>>>Email  :  Thomas.Termin@blue-elephant-systems.com
>>>
>>>blue elephant systems GmbH
>>>Firmensitz      : Wollgrasweg 49, D-70599 Stuttgart
>>>Registergericht : Amtsgericht Stuttgart, HRB 24106
>>>Geschäftsführer : Holger Dietrich, Thomas Gentsch, Joachim Hoernle
>>>
>>>
>>
>>
>>
>>
>
>
> --
> Thomas Termin
> _______________________________
> blue elephant systems GmbH
> Wollgrasweg 49
> D-70599 Stuttgart
>
> Tel    :  (+49) 0711 - 45 10 17 676
> Fax    :  (+49) 0711 - 45 10 17 573
> WWW    :  http://www.blue-elephant-systems.com
> Email  :  Thomas.Termin@blue-elephant-systems.com
>
> blue elephant systems GmbH
> Firmensitz      : Wollgrasweg 49, D-70599 Stuttgart
> Registergericht : Amtsgericht Stuttgart, HRB 24106
> Geschäftsführer : Holger Dietrich, Thomas Gentsch, Joachim Hoernle
>
>



-- 
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/

Re: question about implementation

Posted by Thomas Termin <tt...@blue-elephant-systems.com>.
What do you think should we use for the timeout. What I would like is to
don't create the threads if seda is used. Is it possible to access the
flow name in AbstractBaseLifeCyle somehow?

Cheers
Thomas

Guillaume Nodet wrote:
> You're right !
> 
> On Thu, Sep 4, 2008 at 5:55 PM, Thomas Termin
> <tt...@blue-elephant-systems.com> wrote:
> 
>>Hello Guillaume,
>>
>>Checked the implementation again. When servicemix is used as we use it
>>than we have for each component e.g. eip, ftp, file and so on one thread
>>who is polling every second and never get an exchange because of seda
>>but consumes cpu every second. Would you agree to say that we can avoid
>>this with the Long.MAX_VALUE. I tested id and it worked. So it might be
>>not to bad to make this configurable, doesn't it?
>>
>>Cheers
>>Thomas
>>
>>Guillaume Nodet wrote:
>>
>>>Yes, but the threads are created by the SEDA flow, and each message is
>>>given directly to the JBI components.
>>>
>>>On Thu, Aug 28, 2008 at 1:58 PM, Thomas Termin
>>><tt...@blue-elephant-systems.com> wrote:
>>>
>>>
>>>>Guillaume Nodet wrote:
>>>>
>>>>
>>>>>Yes, you're right.  We may want to increase this timeout.
>>>>>However, when deployed in ServiceMix 3, the components do not use this
>>>>>code, as exchanges are given directly to the components through the
>>>>>MessageExchangeListener interface.  So such code is only executed in
>>>>>ServiceMix 4 and in other JBI containers.
>>>>
>>>>Are you sure? You know we still use servicemix 3 and we have lot of
>>>>threads polling.
>>>>
>>>>Cheers
>>>>Thomas
>>>>
>>>>
>>>>
>>>>>On Thu, Aug 28, 2008 at 10:50 AM, Thomas Termin
>>>>><tt...@blue-elephant-systems.com> wrote:
>>>>>
>>>>>
>>>>>
>>>>>>Hello,
>>>>>>
>>>>>>Is there a special reason, that the polling timeout in
>>>>>>AsyncBaseLifeCycle.pollDeliveryChannel is just a second? That sounds a
>>>>>>bit like busy waiting, doesn't it.
>>>>>>
>>>>>>AsyncBaseLifeCycle
>>>>>>
>>>>>>protected void pollDeliveryChannel() {
>>>>>>     synchronized (polling) {
>>>>>>         polling.set(true);
>>>>>>         polling.notify();
>>>>>>     }
>>>>>>     while (running.get()) {
>>>>>>     ........
>>>>>>             final MessageExchange exchange = channel.accept(1000L);
>>>>>>     ........
>>>>>>
>>>>>>in DeliveryChannelImpl
>>>>>>
>>>>>>public MessageExchange accept(long timeoutMS) throws MessagingException {
>>>>>>     .......
>>>>>>         MessageExchangeImpl me = queue.poll(timeoutMS,
>>>>>>TimeUnit.MILLISECONDS);
>>>>>>     .......
>>>>>>
>>>>>>Could it not be blocked for a longer time in poll? If there are no
>>>>>>exchanges we don't have to do anything there, right?
>>>>>>
>>>>>>Cheers,
>>>>>>Thomas
>>>>>>--
>>>>>>Thomas Termin
>>>>>>_______________________________
>>>>>>blue elephant systems GmbH
>>>>>>Wollgrasweg 49
>>>>>>D-70599 Stuttgart
>>>>>>
>>>>>>Tel    :  (+49) 0711 - 45 10 17 676
>>>>>>Fax    :  (+49) 0711 - 45 10 17 573
>>>>>>WWW    :  http://www.blue-elephant-systems.com
>>>>>>Email  :  Thomas.Termin@blue-elephant-systems.com
>>>>>>
>>>>>>blue elephant systems GmbH
>>>>>>Firmensitz      : Wollgrasweg 49, D-70599 Stuttgart
>>>>>>Registergericht : Amtsgericht Stuttgart, HRB 24106
>>>>>>Geschäftsführer : Holger Dietrich, Thomas Gentsch, Joachim Hoernle
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>--
>>>>Thomas Termin
>>>>_______________________________
>>>>blue elephant systems GmbH
>>>>Wollgrasweg 49
>>>>D-70599 Stuttgart
>>>>
>>>>Tel    :  (+49) 0711 - 45 10 17 676
>>>>Fax    :  (+49) 0711 - 45 10 17 573
>>>>WWW    :  http://www.blue-elephant-systems.com
>>>>Email  :  Thomas.Termin@blue-elephant-systems.com
>>>>
>>>>blue elephant systems GmbH
>>>>Firmensitz      : Wollgrasweg 49, D-70599 Stuttgart
>>>>Registergericht : Amtsgericht Stuttgart, HRB 24106
>>>>Geschäftsführer : Holger Dietrich, Thomas Gentsch, Joachim Hoernle
>>>>
>>>>
>>>
>>>
>>>
>>>
>>
>>--
>>Thomas Termin
>>_______________________________
>>blue elephant systems GmbH
>>Wollgrasweg 49
>>D-70599 Stuttgart
>>
>>Tel    :  (+49) 0711 - 45 10 17 676
>>Fax    :  (+49) 0711 - 45 10 17 573
>>WWW    :  http://www.blue-elephant-systems.com
>>Email  :  Thomas.Termin@blue-elephant-systems.com
>>
>>blue elephant systems GmbH
>>Firmensitz      : Wollgrasweg 49, D-70599 Stuttgart
>>Registergericht : Amtsgericht Stuttgart, HRB 24106
>>Geschäftsführer : Holger Dietrich, Thomas Gentsch, Joachim Hoernle
>>
>>
> 
> 
> 
> 


-- 
Thomas Termin
_______________________________
blue elephant systems GmbH
Wollgrasweg 49
D-70599 Stuttgart

Tel    :  (+49) 0711 - 45 10 17 676
Fax    :  (+49) 0711 - 45 10 17 573
WWW    :  http://www.blue-elephant-systems.com
Email  :  Thomas.Termin@blue-elephant-systems.com

blue elephant systems GmbH
Firmensitz      : Wollgrasweg 49, D-70599 Stuttgart
Registergericht : Amtsgericht Stuttgart, HRB 24106
Geschäftsführer : Holger Dietrich, Thomas Gentsch, Joachim Hoernle


integrate jetty and servicemix

Posted by quan tran <qu...@yahoo.com>.
All,
I wonder if someone has some ideas on this.  Any advices or document are appriciated.
Thanks
Quan


--- On Thu, 9/4/08, Guillaume Nodet <gn...@gmail.com> wrote:

> From: Guillaume Nodet <gn...@gmail.com>
> Subject: Re: question about implementation
> To: dev@servicemix.apache.org
> Date: Thursday, September 4, 2008, 10:57 PM
> You're right !
> 
> On Thu, Sep 4, 2008 at 5:55 PM, Thomas Termin
> <tt...@blue-elephant-systems.com> wrote:
> > Hello Guillaume,
> >
> > Checked the implementation again. When servicemix is
> used as we use it
> > than we have for each component e.g. eip, ftp, file
> and so on one thread
> > who is polling every second and never get an exchange
> because of seda
> > but consumes cpu every second. Would you agree to say
> that we can avoid
> > this with the Long.MAX_VALUE. I tested id and it
> worked. So it might be
> > not to bad to make this configurable, doesn't it?
> >
> > Cheers
> > Thomas
> >
> > Guillaume Nodet wrote:
> >> Yes, but the threads are created by the SEDA flow,
> and each message is
> >> given directly to the JBI components.
> >>
> >> On Thu, Aug 28, 2008 at 1:58 PM, Thomas Termin
> >> <tt...@blue-elephant-systems.com> wrote:
> >>
> >>>Guillaume Nodet wrote:
> >>>
> >>>>Yes, you're right.  We may want to
> increase this timeout.
> >>>>However, when deployed in ServiceMix 3, the
> components do not use this
> >>>>code, as exchanges are given directly to
> the components through the
> >>>>MessageExchangeListener interface.  So such
> code is only executed in
> >>>>ServiceMix 4 and in other JBI containers.
> >>>
> >>>Are you sure? You know we still use servicemix
> 3 and we have lot of
> >>>threads polling.
> >>>
> >>>Cheers
> >>>Thomas
> >>>
> >>>
> >>>>On Thu, Aug 28, 2008 at 10:50 AM, Thomas
> Termin
> >>>><tt...@blue-elephant-systems.com>
> wrote:
> >>>>
> >>>>
> >>>>>Hello,
> >>>>>
> >>>>>Is there a special reason, that the
> polling timeout in
> >>>>>AsyncBaseLifeCycle.pollDeliveryChannel
> is just a second? That sounds a
> >>>>>bit like busy waiting, doesn't it.
> >>>>>
> >>>>>AsyncBaseLifeCycle
> >>>>>
> >>>>>protected void pollDeliveryChannel() {
> >>>>>      synchronized (polling) {
> >>>>>          polling.set(true);
> >>>>>          polling.notify();
> >>>>>      }
> >>>>>      while (running.get()) {
> >>>>>      ........
> >>>>>              final MessageExchange
> exchange = channel.accept(1000L);
> >>>>>      ........
> >>>>>
> >>>>>in DeliveryChannelImpl
> >>>>>
> >>>>> public MessageExchange accept(long
> timeoutMS) throws MessagingException {
> >>>>>      .......
> >>>>>          MessageExchangeImpl me =
> queue.poll(timeoutMS,
> >>>>>TimeUnit.MILLISECONDS);
> >>>>>      .......
> >>>>>
> >>>>>Could it not be blocked for a longer
> time in poll? If there are no
> >>>>>exchanges we don't have to do
> anything there, right?
> >>>>>
> >>>>>Cheers,
> >>>>>Thomas
> >>>>>--
> >>>>>Thomas Termin
> >>>>>_______________________________
> >>>>>blue elephant systems GmbH
> >>>>>Wollgrasweg 49
> >>>>>D-70599 Stuttgart
> >>>>>
> >>>>>Tel    :  (+49) 0711 - 45 10 17 676
> >>>>>Fax    :  (+49) 0711 - 45 10 17 573
> >>>>>WWW    : 
> http://www.blue-elephant-systems.com
> >>>>>Email  : 
> Thomas.Termin@blue-elephant-systems.com
> >>>>>
> >>>>>blue elephant systems GmbH
> >>>>>Firmensitz      : Wollgrasweg 49,
> D-70599 Stuttgart
> >>>>>Registergericht : Amtsgericht
> Stuttgart, HRB 24106
> >>>>>Geschäftsführer : Holger Dietrich,
> Thomas Gentsch, Joachim Hoernle
> >>>>>
> >>>>>
> >>>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>
> >>>--
> >>>Thomas Termin
> >>>_______________________________
> >>>blue elephant systems GmbH
> >>>Wollgrasweg 49
> >>>D-70599 Stuttgart
> >>>
> >>>Tel    :  (+49) 0711 - 45 10 17 676
> >>>Fax    :  (+49) 0711 - 45 10 17 573
> >>>WWW    :  http://www.blue-elephant-systems.com
> >>>Email  : 
> Thomas.Termin@blue-elephant-systems.com
> >>>
> >>>blue elephant systems GmbH
> >>>Firmensitz      : Wollgrasweg 49, D-70599
> Stuttgart
> >>>Registergericht : Amtsgericht Stuttgart, HRB
> 24106
> >>>Geschäftsführer : Holger Dietrich, Thomas
> Gentsch, Joachim Hoernle
> >>>
> >>>
> >>
> >>
> >>
> >>
> >
> >
> > --
> > Thomas Termin
> > _______________________________
> > blue elephant systems GmbH
> > Wollgrasweg 49
> > D-70599 Stuttgart
> >
> > Tel    :  (+49) 0711 - 45 10 17 676
> > Fax    :  (+49) 0711 - 45 10 17 573
> > WWW    :  http://www.blue-elephant-systems.com
> > Email  :  Thomas.Termin@blue-elephant-systems.com
> >
> > blue elephant systems GmbH
> > Firmensitz      : Wollgrasweg 49, D-70599 Stuttgart
> > Registergericht : Amtsgericht Stuttgart, HRB 24106
> > Geschäftsführer : Holger Dietrich, Thomas Gentsch,
> Joachim Hoernle
> >
> >
> 
> 
> 
> -- 
> Cheers,
> Guillaume Nodet
> ------------------------
> Blog: http://gnodet.blogspot.com/


      

Re: question about implementation

Posted by Guillaume Nodet <gn...@gmail.com>.
You're right !

On Thu, Sep 4, 2008 at 5:55 PM, Thomas Termin
<tt...@blue-elephant-systems.com> wrote:
> Hello Guillaume,
>
> Checked the implementation again. When servicemix is used as we use it
> than we have for each component e.g. eip, ftp, file and so on one thread
> who is polling every second and never get an exchange because of seda
> but consumes cpu every second. Would you agree to say that we can avoid
> this with the Long.MAX_VALUE. I tested id and it worked. So it might be
> not to bad to make this configurable, doesn't it?
>
> Cheers
> Thomas
>
> Guillaume Nodet wrote:
>> Yes, but the threads are created by the SEDA flow, and each message is
>> given directly to the JBI components.
>>
>> On Thu, Aug 28, 2008 at 1:58 PM, Thomas Termin
>> <tt...@blue-elephant-systems.com> wrote:
>>
>>>Guillaume Nodet wrote:
>>>
>>>>Yes, you're right.  We may want to increase this timeout.
>>>>However, when deployed in ServiceMix 3, the components do not use this
>>>>code, as exchanges are given directly to the components through the
>>>>MessageExchangeListener interface.  So such code is only executed in
>>>>ServiceMix 4 and in other JBI containers.
>>>
>>>Are you sure? You know we still use servicemix 3 and we have lot of
>>>threads polling.
>>>
>>>Cheers
>>>Thomas
>>>
>>>
>>>>On Thu, Aug 28, 2008 at 10:50 AM, Thomas Termin
>>>><tt...@blue-elephant-systems.com> wrote:
>>>>
>>>>
>>>>>Hello,
>>>>>
>>>>>Is there a special reason, that the polling timeout in
>>>>>AsyncBaseLifeCycle.pollDeliveryChannel is just a second? That sounds a
>>>>>bit like busy waiting, doesn't it.
>>>>>
>>>>>AsyncBaseLifeCycle
>>>>>
>>>>>protected void pollDeliveryChannel() {
>>>>>      synchronized (polling) {
>>>>>          polling.set(true);
>>>>>          polling.notify();
>>>>>      }
>>>>>      while (running.get()) {
>>>>>      ........
>>>>>              final MessageExchange exchange = channel.accept(1000L);
>>>>>      ........
>>>>>
>>>>>in DeliveryChannelImpl
>>>>>
>>>>> public MessageExchange accept(long timeoutMS) throws MessagingException {
>>>>>      .......
>>>>>          MessageExchangeImpl me = queue.poll(timeoutMS,
>>>>>TimeUnit.MILLISECONDS);
>>>>>      .......
>>>>>
>>>>>Could it not be blocked for a longer time in poll? If there are no
>>>>>exchanges we don't have to do anything there, right?
>>>>>
>>>>>Cheers,
>>>>>Thomas
>>>>>--
>>>>>Thomas Termin
>>>>>_______________________________
>>>>>blue elephant systems GmbH
>>>>>Wollgrasweg 49
>>>>>D-70599 Stuttgart
>>>>>
>>>>>Tel    :  (+49) 0711 - 45 10 17 676
>>>>>Fax    :  (+49) 0711 - 45 10 17 573
>>>>>WWW    :  http://www.blue-elephant-systems.com
>>>>>Email  :  Thomas.Termin@blue-elephant-systems.com
>>>>>
>>>>>blue elephant systems GmbH
>>>>>Firmensitz      : Wollgrasweg 49, D-70599 Stuttgart
>>>>>Registergericht : Amtsgericht Stuttgart, HRB 24106
>>>>>Geschäftsführer : Holger Dietrich, Thomas Gentsch, Joachim Hoernle
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>>
>>>
>>>--
>>>Thomas Termin
>>>_______________________________
>>>blue elephant systems GmbH
>>>Wollgrasweg 49
>>>D-70599 Stuttgart
>>>
>>>Tel    :  (+49) 0711 - 45 10 17 676
>>>Fax    :  (+49) 0711 - 45 10 17 573
>>>WWW    :  http://www.blue-elephant-systems.com
>>>Email  :  Thomas.Termin@blue-elephant-systems.com
>>>
>>>blue elephant systems GmbH
>>>Firmensitz      : Wollgrasweg 49, D-70599 Stuttgart
>>>Registergericht : Amtsgericht Stuttgart, HRB 24106
>>>Geschäftsführer : Holger Dietrich, Thomas Gentsch, Joachim Hoernle
>>>
>>>
>>
>>
>>
>>
>
>
> --
> Thomas Termin
> _______________________________
> blue elephant systems GmbH
> Wollgrasweg 49
> D-70599 Stuttgart
>
> Tel    :  (+49) 0711 - 45 10 17 676
> Fax    :  (+49) 0711 - 45 10 17 573
> WWW    :  http://www.blue-elephant-systems.com
> Email  :  Thomas.Termin@blue-elephant-systems.com
>
> blue elephant systems GmbH
> Firmensitz      : Wollgrasweg 49, D-70599 Stuttgart
> Registergericht : Amtsgericht Stuttgart, HRB 24106
> Geschäftsführer : Holger Dietrich, Thomas Gentsch, Joachim Hoernle
>
>



-- 
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/