[
https://issues.apache.org/jira/browse/ARIES-914?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14546387#comment-14546387
]
Alexandre Cartapanis edited comment on ARIES-914 at 5/21/15 1:18 PM:
---------------------------------------------------------------------
Maybe the solution is to call the inject method with "initial" at false in the
"afterInit" method
(https://github.com/apache/aries/blob/trunk/blueprint/blueprint-cm/src/main/java/org/apache/aries/blueprint/compendium/cm/CmManagedProperties.java#L183),
but this depend on the expected behaviour when both "init-method" and
"managed-properties" are present :
<bean
id="totoEmbeddedServer"
class="toto.EmbeddedServer"
scope="singleton"
init-method="init"
destroy-method="destroy">
<cm:managed-properties persistent-id="toto"
update-strategy="component-managed" update-method="configure"/>
</bean>
is the blueprint specification says something about this ?
was (Author: acartapanis):
Maybe the solution is to call the inject method with "initial" at false in the
"afterInit" method
(https://github.com/apache/aries/blob/trunk/blueprint/blueprint-cm/src/main/java/org/apache/aries/blueprint/compendium/cm/CmManagedProperties.java#L183),
but this depend on the expected behaviour when both "init-method" and
"managed-properties" are present :
<bean
id="totoEmbeddedServer"
class="toto.EmbeddedServer"
scope="singleton"
init-method="init"
destroy-method="destroy">
<cm:managed-properties persistent-id="elasticsearch"
update-strategy="component-managed" update-method="configure"/>
</bean>
is the blueprint specification says something about this ?
> When using component-managed mode for managed-properties the first time
> 'container-managed' mode is used
> --------------------------------------------------------------------------------------------------------
>
> Key: ARIES-914
> URL: https://issues.apache.org/jira/browse/ARIES-914
> Project: Aries
> Issue Type: Bug
> Components: Blueprint
> Affects Versions: 0.2, 0.3, 1.0
> Reporter: Christoph Läubrich
>
> When using the 'managed-properties' in Blueprint with 'component-managed'
> mode, the first time the component start up the blueprint module tries to
> inject properties with the 'container-managed' mode.
> The cause of this seems that in the method 'private void inject(Object bean,
> boolean initial)' because if initial is true it always enter the
> 'container-managed' mode. Should it be an && (logical and) instead of an ||
> (logical or) there?
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)