You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by Thushara Seneviratne <th...@gmail.com> on 2010/01/15 11:09:12 UTC

Create multiple instance of a component with different Endponts

Hi ,

We have a business requirement to create a multiple instance of
same component and each instance should have different endpoints , one
possible scenario is give below

 1.) Implement  my component ( can be a BC or a SE)
 2.) Create a installer and deploy the component ( I think now my component
is registered with NMR with a endpoint)
 3.) Create a second instance of a component and register it with
a different endpoint ( for external world it appears like two components )

My problem is how can i create /mange multiple instance of a
single component and how to register separate endpoint for each of these
instances , is there any Servicemix API or any workaround for this ?

I tried with AdminCommandsService API but seems like it's doesn't supports
for that extend.


Thanks,

Thushara

Re: Create multiple instance of a component with different Endponts

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Sorry for the late feedback.

But multiple component instance, you mean that you want to deploy the 
same installer zip file several time in the deploy/hotdeploy directory ?

If it's the case:
1/ it's not possible or you need to change the component name in the RMI 
registry (or you will have duplicate name exception).
2/ a component can manage a large number of SU: a SU define an endpoint 
on the component. It's multithreaded (manager by the executor 
configuration) and can manage large number of messages/endpoints.

Are you sure that it's really the "same" component ? When you talk about 
multiple instance of the same component, are you sure that you don't 
talk about different endpoints ?

Regards
JB

Thushara Seneviratne wrote:
> Any pointer for this ..?
> 
> Thanks ,
> 
> On Fri, Jan 15, 2010 at 3:39 PM, Thushara Seneviratne <
> thushara.sen@gmail.com> wrote:
> 
>> Hi ,
>>
>> We have a business requirement to create a multiple instance of
>> same component and each instance should have different endpoints , one
>> possible scenario is give below
>>
>>  1.) Implement  my component ( can be a BC or a SE)
>>  2.) Create a installer and deploy the component ( I think now my component
>> is registered with NMR with a endpoint)
>>  3.) Create a second instance of a component and register it with
>> a different endpoint ( for external world it appears like two components )
>>
>> My problem is how can i create /mange multiple instance of a
>> single component and how to register separate endpoint for each of these
>> instances , is there any Servicemix API or any workaround for this ?
>>
>> I tried with AdminCommandsService API but seems like it's doesn't supports
>> for that extend.
>>
>>
>> Thanks,
>>
>> Thushara
>>
>>
> 

-- 
Jean-Baptiste Onofré (Nanthrax)
BuildProcess/AutoDeploy Project Leader
http://buildprocess.sourceforge.net
jb@nanthrax.net
PGP : 17D4F086

Re: Create multiple instance of a component with different Endponts

Posted by Giampaolo Tranchida <gi...@tranchida.ch>.
Hello,

What do you mean by component ?

By example with the a servicemix-bean you can expose the same pojo 
(singleton) with different endpoint

<beans xmlns:bean="http://servicemix.apache.org/bean/1.0"
       xmlns:demo="http://www.tranchida.ch/demo">

  <bean:endpoint service="demo:bean1" endpoint="bean" bean="#bean1"/>
  <bean:endpoint service="demo:bean1bis" endpoint="bean1bis" bean="#bean1"/>

  <bean:endpoint service="demo:bean2" endpoint="bean" bean="#bean2"/>
  <bean:endpoint service="demo:bean2bis" endpoint="bean2bis" bean="#bean2"/>

  <bean:endpoint service="demo:bean3" endpoint="bean" bean="#bean3"/>

  <bean id="bean1" class="ch.tranchida.demo.Bean1"/>

  <bean id="bean2" class="ch.tranchida.demo.Bean2">
       <property name="info" value="1234"/>
  </bean>

  <bean id="bean3" class="ch.tranchida.demo.Bean2">
      <property name="info"  value="5678"/>
  </bean>
</beans>



Thushara Seneviratne a écrit :
> Any pointer for this ..?
>
> Thanks ,
>
> On Fri, Jan 15, 2010 at 3:39 PM, Thushara Seneviratne <
> thushara.sen@gmail.com> wrote:
>
>   
>> Hi ,
>>
>> We have a business requirement to create a multiple instance of
>> same component and each instance should have different endpoints , one
>> possible scenario is give below
>>
>>  1.) Implement  my component ( can be a BC or a SE)
>>  2.) Create a installer and deploy the component ( I think now my component
>> is registered with NMR with a endpoint)
>>  3.) Create a second instance of a component and register it with
>> a different endpoint ( for external world it appears like two components )
>>
>> My problem is how can i create /mange multiple instance of a
>> single component and how to register separate endpoint for each of these
>> instances , is there any Servicemix API or any workaround for this ?
>>
>> I tried with AdminCommandsService API but seems like it's doesn't supports
>> for that extend.
>>
>>
>> Thanks,
>>
>> Thushara
>>
>>
>>     
>
>   


Re: Create multiple instance of a component with different Endponts

Posted by Thushara Seneviratne <th...@gmail.com>.
Any pointer for this ..?

Thanks ,

On Fri, Jan 15, 2010 at 3:39 PM, Thushara Seneviratne <
thushara.sen@gmail.com> wrote:

>
> Hi ,
>
> We have a business requirement to create a multiple instance of
> same component and each instance should have different endpoints , one
> possible scenario is give below
>
>  1.) Implement  my component ( can be a BC or a SE)
>  2.) Create a installer and deploy the component ( I think now my component
> is registered with NMR with a endpoint)
>  3.) Create a second instance of a component and register it with
> a different endpoint ( for external world it appears like two components )
>
> My problem is how can i create /mange multiple instance of a
> single component and how to register separate endpoint for each of these
> instances , is there any Servicemix API or any workaround for this ?
>
> I tried with AdminCommandsService API but seems like it's doesn't supports
> for that extend.
>
>
> Thanks,
>
> Thushara
>
>