Daniel Frey wrote:

Stephen McConnell wrote:

Does you component directive assert activation on startup - e.g.:

<component name="fred" class="WhateverImpl" activation="startup"/>


It didn't. When adding this, it works! But strange that I had to add this
now. Before, it worked without any explicit activation. Has the default
behaviour changed?

There was a bug that I fixed but managed to break a couple of days later. The default behavior from before was not exactly what the default behavior should have been.



Just a note concerning activation - the default behaviour is then any component declared using <component> will have activation on startup enabeld by default - unless the component type is transient.


Sounds like the default changes for all components in the system... This is
certainly true for WhateverImpl when using the activation attribute. What
about other components not using the activation attribute? Does the default
change for any component declaration within the same block.xml
(<container>), or even for any component running in the system? I would
expect that each component has its default which may be overridden by the
activation attribute for the component meant by the name attribute, so in:

<container>
    <component name="fred" class="WhateverImpl" activation="startup"/>
    <component name="alf" class="WhatelseImpl"/>
</container>

That fred is activated on startup and alf is default.

That's what happens.



So for example, if WhateverImpl class contains a component tag looks like:

@avalon.component name="xyz"

then the component will default to a "transient" lifestyle in which case activation on startup will be false - however, this can be overriden by declaring the activation="startup" policy in the component directive.


So transient is default, which may be overridden in the component
configuration within block.xml

No. The lifestyle of a component is declared by the component implementation. I.e. to use a different lifestyle you need to declare this as part of the @avalon.component tag using the lifestyle attribute.


-- for that component (and no others). I
suppose the lifestyle attribute of the avalon.component javadoc tag has
nothing to do with the activation?

Given either of the following equivalent declarations:


@avalon.component name="widget"

@avalon.component name="widget" lifestyle="transient"

The the lifestyle will be set to TRANSIENT and the default activation on startup policy will be false. For any other lifestyle, if the component is actually declared in a block, the default activation on startup is enabled.


You updated the version of merlin-unit to 3.3-SNAPSHOT?


I did.

I just started thinking we will never sort these issues out. Now I can start
developing... hopefully. Or at least start running into the next issues.

Sorry about the problems - but the feedback is definely appreciated.


Cheers, Steve.

Thanks,
Daniel


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




--

|------------------------------------------------|
| Magic by Merlin                                |
| Production by Avalon                           |
|                                                |
| http://avalon.apache.org/merlin                |
| http://dpml.net/merlin/distributions/latest    |
|------------------------------------------------|

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



Reply via email to