On 11.01.11 10:16, "Bengt Rodehav" <[email protected]> wrote:

>I created the following JIRA ticket:
>
>https://issues.apache.org/jira/browse/FELIX-2773

Thanks,

>
><https://issues.apache.org/jira/browse/FELIX-2773>I'll try experimenting
>with the life cycle controller and see if I can use that as a workaround.
>
>Are you thinking something like this:
>
>- Create an attribute that acts as life cycle controller. Initial value
>would be true.
>- When I detect that a critical property (one that requires restart) is
>updated, I set the life cycle controller to false. I guess I would do this
>in an @Updated method.
>
>When do I set the life cycle controller to true again?


Probably at the end of the @Updated if everything is fine.

Regards,

Clement

>
>/Bengt
>
>2011/1/11 Clement Escoffier <[email protected]>
>
>> Hi,
>>
>> On 10.01.11 14:59, "Bengt Rodehav" <[email protected]> wrote:
>>
>> >I use iPOJO and configuration admin. When certain configuration
>>properties
>> >change, I want to "restart" my iPOJO instance. I e I want the instance
>>to
>> >become invalid and then valid again. Currently I do some
>>initialisation on
>> >the method marked as @Validate and some cleanup in the method marked
>> >as @Invalidate.
>> >
>> >It's very tricky to get this to work. When I start my application it
>>seems
>> >like both the @Validate and the @Updated methods are called which
>>causes
>> >problems. What is the recommended way to accomplish this?
>> >
>> >Ideally I would like to mark my iPOJO properties as requiring the
>>instance
>> >to "restart", e g
>> >
>> >*  @Property(name = "rootUrl", restart = "true")*
>> >
>> >*  private String mRootUrl;*
>>
>> Unfortunately this is not supported. It can be an interesting feature to
>> allow an instance to be invalidated/validated during the
>>reconfiguration.
>> Could you open a jira issue  ?
>>
>> In the meantime, you could try to use the lifecycle controller to force
>> the invalidation / revalidation.
>>
>> Regards,
>>
>> Clement
>>
>> >
>> >
>> >/Bengt
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [email protected]
>> For additional commands, e-mail: [email protected]
>>
>>



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to