You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by bquenin <bq...@axway.com> on 2009/08/13 16:07:42 UTC

Questions on DeliveryChannels & Endpoints

Hey,

  I have a design question about the nmr.core.
  
  In JBI specifications, it's stated that a JBI component has only 1
delivery channel to exchange with the NMR, it's the only way to communicate
with the NMR.
  In a regular JBI component lifecycle, on the init() call, the
ComponentContext is given to the component. then the component asks for its
delivery channel, which is created by the NMR behind the scene.
  At this point, no endpoints are created/activated at all (from a JBI
component standpoint).
  
  However, in the implementation, the ComponentContextImpl constructor
creates an endpoint, and registers it. That implicitly creates a Channel,
and this channel is then wrapped into the DeliveryChannel and given to the
component when it asks for it.

  First question, why does the channel creation is endpoint driven ? At this
point in the lifecycle we shouldn't we have no endpoints ?

  Then, still in a regular JBI component lifecycle, the JBI component
activate the service endpoints it provides (if any) by calling
activateEndpoint on the ComponentContext.
  In this case, the underneath code registers this endpoint into the
endpointregistry, but it creates a new Channel as well.
  At this point, from a JBI component standpoint, we should have 1
deliveryChannel and 1 endpoint associated to this channel.

  Second question: In reality, we have 2 channels (internal ones) and 2
endpoints (the one created in the constructor and the one we activated). Is
this normal ? If yes, could you please give me some details ?

Thanks,
BQ.



-- 
View this message in context: http://www.nabble.com/Questions-on-DeliveryChannels---Endpoints-tp24954695p24954695.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.