You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by Ri...@directline.com on 2006/04/21 15:25:11 UTC

Component Instances


Hi,
When a component is created is there only on instance or can you have 
multiple instances created on request like a servlet?

The reason I ask is I am using my classes to extend the TransformComponent 
class, but it seems to only create the one instance and objects are 
overwriting themselves as the component gets requested multiple times.

If it were not possible to have multi distinct instances, what would be 
the alternative approach, pooling of objects? synchronized code?


Regards Rick

Direct Line Group Limited, registered in England 
with number 2811437, registered office 3 Edridge 
Road, Croydon, Surrey  CR9 1AG.  The following 
companies are members of the Direct Line Group: 
Direct Line Insurance plc, Direct Line Life 
Insurance Company Limited, Direct Line Unit 
Trusts Limited and Direct Line Financial Services 
Limited, all of which are authorised and regulated 
by the Financial Services Authority.  All are 
members of The Royal Bank of Scotland Group.

This email is intended for the addressee only and 
may contain confidential, proprietary or legally 
privileged information.  If you are not the 
intended recipient of this email you should 
notify us immediately and delete it.  You should 
not copy, print, distribute, disclose or use any 
part of it.  We reserve the right to monitor and 
record all electronic communications through our 
networks.  We cannot accept any liability for 
viruses transmitted via this e-mail once it has 
left our networks.

Re: Component Instances

Posted by Guillaume Nodet <gn...@gmail.com>.
There is currently no threading mechanism implemented.
JBI components have to be thread safe and you will have to implement
that yourself at the moment.  You may use spring features for that.

Cheers,
Guillaume Nodet

On 4/21/06, Rick.Jones@directline.com <Ri...@directline.com> wrote:
>
>
> Hi,
> When a component is created is there only on instance or can you have
> multiple instances created on request like a servlet?
>
> The reason I ask is I am using my classes to extend the TransformComponent
> class, but it seems to only create the one instance and objects are
> overwriting themselves as the component gets requested multiple times.
>
> If it were not possible to have multi distinct instances, what would be
> the alternative approach, pooling of objects? synchronized code?
>
>
> Regards Rick
>
> Direct Line Group Limited, registered in England
> with number 2811437, registered office 3 Edridge
> Road, Croydon, Surrey  CR9 1AG.  The following
> companies are members of the Direct Line Group:
> Direct Line Insurance plc, Direct Line Life
> Insurance Company Limited, Direct Line Unit
> Trusts Limited and Direct Line Financial Services
> Limited, all of which are authorised and regulated
> by the Financial Services Authority.  All are
> members of The Royal Bank of Scotland Group.
>
> This email is intended for the addressee only and
> may contain confidential, proprietary or legally
> privileged information.  If you are not the
> intended recipient of this email you should
> notify us immediately and delete it.  You should
> not copy, print, distribute, disclose or use any
> part of it.  We reserve the right to monitor and
> record all electronic communications through our
> networks.  We cannot accept any liability for
> viruses transmitted via this e-mail once it has
> left our networks.
>