Hi Stephen,

>>May I'm stupid, but I don't find how to access to sub-component of a
>>container. Could you provide some examples.
>>
>>
>
> You can do some stuff within a component declared as a container by
> getting the context classloader - however - this is very likely to
> change in favour of some sort of declared appliance listener.  Can you
> give me some more information on what you want to do?

in block.xml something like :

  <container name="foo" class="MyContainer">
    <component name="subbar-a" class="BarClass"/>
    <component name="subtoto-b" class="TotoBClass"/>
    <component name="subtoto-c" class="TotoCClass"/>
  </container>

where TotoBClass and TotoCClass implement TotoInterface (and service).

in MyContainer, I need a way to have instance "subbar-a", "subtoto-b",
"subtoto-c" when they were ready.
foo depends of subxxx, when stuff is requested to foo, foo use subxxx to do
stuff. foo is like a facade for sibbling component.

>>Is it possible to find component with its path (partitionName)?

> Yes, providing you have access to a parent appliance.

snippet of code, please.

Thanks.

>>PS :
>>In EngineClassLoader.createAppliance(ApplianceContext, boolean)
>>  appliance = factory.createAppliance(...)
>>In DefaultApplianceFactory.createAppliance(...) for custom appliance
>>  appliance = engine.createAppliance(...)
>>is it normal ?
>>
>>If CustomAppliance is define, no lifecycle method is called.
>>
>
> Because a custom appliance is a component and is deployed by another
> appliance.
> (its kind of incestuous).
>
>>Why don't use in DefaultApplianceFactory.createAppliance(...),
>>ContainerUtil ?
>>
>
> No reason.

By example your CustomAppliance implements Initializable but this method is
never call if CustomApplianceFactory don't do it explicitly.

>>Why don't share boostrap code of Appliance between custom and default ?
>
> Because the bootstrap cycle is known for DefaultAppliance wheras a
> custom appliance can have its own depedencies - could have extensdions,
>  could even have its own deployment lifecycle.  That's why we use an
> appliance to deploy a custom appliance.

If you use ContainerUtil you could share code.

--------------------------------------------------------------
David "Dwayne" Bernard             Freelance Developer (Java)
                                   mailto:[EMAIL PROTECTED]
      \|/                          http://dwayne.java-fan.com/
--o0O @.@ O0o-------------------------------------------------



----------------------------------------------------------------
Ce service de mailing vous est offert par http://www.freesurf.fr.
FreeSurf, votre acces ADSL a partir de 29 euros/mois
http://www.freesurf.fr/adsl/



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to